aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-11-04 13:08:15 -0400
committerJens Axboe <axboe@fb.com>2016-11-04 16:34:47 -0400
commite64855c6cfaa0a80c1b71c5f647cb792dc436668 (patch)
tree751d56f17914506a5e54a380f9a4d4519cadfa18 /fs/ufs
parent69a9bea146b185be8ec50e80eaecd8e487e689f8 (diff)
fs: Add helper to clean bdev aliases under a bh and use it
Add a helper function that clears buffer heads from a block device aliasing passed bh. Use this helper function from filesystems instead of the original unmap_underlying_metadata() to save some boiler plate code and also have a better name for the functionalily since it is not unmapping anything for a *long* time. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/balloc.c3
-rw-r--r--fs/ufs/inode.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index b035af54f538..a0376a2c1c29 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -307,8 +307,7 @@ static void ufs_change_blocknr(struct inode *inode, sector_t beg,
307 (unsigned long long)(pos + newb), pos); 307 (unsigned long long)(pos + newb), pos);
308 308
309 bh->b_blocknr = newb + pos; 309 bh->b_blocknr = newb + pos;
310 unmap_underlying_metadata(bh->b_bdev, 310 clean_bdev_bh_alias(bh);
311 bh->b_blocknr);
312 mark_buffer_dirty(bh); 311 mark_buffer_dirty(bh);
313 ++j; 312 ++j;
314 bh = bh->b_this_page; 313 bh = bh->b_this_page;
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index 190d64be22ed..45ceb94e89e4 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -1070,8 +1070,7 @@ static int ufs_alloc_lastblock(struct inode *inode, loff_t size)
1070 1070
1071 if (buffer_new(bh)) { 1071 if (buffer_new(bh)) {
1072 clear_buffer_new(bh); 1072 clear_buffer_new(bh);
1073 unmap_underlying_metadata(bh->b_bdev, 1073 clean_bdev_bh_alias(bh);
1074 bh->b_blocknr);
1075 /* 1074 /*
1076 * we do not zeroize fragment, because of 1075 * we do not zeroize fragment, because of
1077 * if it maped to hole, it already contains zeroes 1076 * if it maped to hole, it already contains zeroes