aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-11-04 13:08:14 -0400
committerJens Axboe <axboe@fb.com>2016-11-04 16:34:47 -0400
commit69a9bea146b185be8ec50e80eaecd8e487e689f8 (patch)
tree45258ccc796aa3c77be120c55712ad575fb1ef26
parent64e1c57fa4740ac0728afe173e5a025b0e94cd55 (diff)
ext2: Use clean_bdev_aliases() instead of iteration
Use clean_bdev_aliases() instead of iterating through blocks one by one. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--fs/ext2/inode.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index d831e24dc885..eb11f7e2b8aa 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -732,16 +732,13 @@ static int ext2_get_blocks(struct inode *inode,
732 } 732 }
733 733
734 if (IS_DAX(inode)) { 734 if (IS_DAX(inode)) {
735 int i;
736
737 /* 735 /*
738 * We must unmap blocks before zeroing so that writeback cannot 736 * We must unmap blocks before zeroing so that writeback cannot
739 * overwrite zeros with stale data from block device page cache. 737 * overwrite zeros with stale data from block device page cache.
740 */ 738 */
741 for (i = 0; i < count; i++) { 739 clean_bdev_aliases(inode->i_sb->s_bdev,
742 unmap_underlying_metadata(inode->i_sb->s_bdev, 740 le32_to_cpu(chain[depth-1].key),
743 le32_to_cpu(chain[depth-1].key) + i); 741 count);
744 }
745 /* 742 /*
746 * block must be initialised before we put it in the tree 743 * block must be initialised before we put it in the tree
747 * so that it's not found by another thread before it's 744 * so that it's not found by another thread before it's