Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69a9bea1 authored by Jan Kara's avatar Jan Kara Committed by Jens Axboe
Browse files

ext2: Use clean_bdev_aliases() instead of iteration



Use clean_bdev_aliases() instead of iterating through blocks one by one.

Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 64e1c57f
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -732,16 +732,13 @@ static int ext2_get_blocks(struct inode *inode,
	}

	if (IS_DAX(inode)) {
		int i;

		/*
		 * We must unmap blocks before zeroing so that writeback cannot
		 * overwrite zeros with stale data from block device page cache.
		 */
		for (i = 0; i < count; i++) {
			unmap_underlying_metadata(inode->i_sb->s_bdev,
					le32_to_cpu(chain[depth-1].key) + i);
		}
		clean_bdev_aliases(inode->i_sb->s_bdev,
				   le32_to_cpu(chain[depth-1].key),
				   count);
		/*
		 * block must be initialised before we put it in the tree
		 * so that it's not found by another thread before it's