mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
69a9bea146
commit
e64855c6cf
10 changed files with 16 additions and 19 deletions
|
|
@ -555,8 +555,7 @@ static int __mpage_writepage(struct page *page, struct writeback_control *wbc,
|
|||
if (mpd->get_block(inode, block_in_file, &map_bh, 1))
|
||||
goto confused;
|
||||
if (buffer_new(&map_bh))
|
||||
unmap_underlying_metadata(map_bh.b_bdev,
|
||||
map_bh.b_blocknr);
|
||||
clean_bdev_bh_alias(&map_bh);
|
||||
if (buffer_boundary(&map_bh)) {
|
||||
boundary_block = map_bh.b_blocknr;
|
||||
boundary_bdev = map_bh.b_bdev;
|
||||
|
|
|
|||
Loading…
Reference in a new issue