diff options
Diffstat (limited to 'fs/buffer.c')
| -rw-r--r-- | fs/buffer.c | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/fs/buffer.c b/fs/buffer.c index 4cc679d5bf58..109f55196866 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -39,7 +39,6 @@  #include <linux/buffer_head.h>  #include <linux/task_io_accounting_ops.h>  #include <linux/bio.h> -#include <linux/notifier.h>  #include <linux/cpu.h>  #include <linux/bitops.h>  #include <linux/mpage.h> @@ -3061,11 +3060,6 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,  	 */  	bio = bio_alloc(GFP_NOIO, 1); -	if (wbc) { -		wbc_init_bio(wbc, bio); -		wbc_account_io(wbc, bh->b_page, bh->b_size); -	} -  	bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9);  	bio_set_dev(bio, bh->b_bdev);  	bio->bi_write_hint = write_hint; @@ -3085,6 +3079,11 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,  		op_flags |= REQ_PRIO;  	bio_set_op_attrs(bio, op, op_flags); +	if (wbc) { +		wbc_init_bio(wbc, bio); +		wbc_account_io(wbc, bh->b_page, bh->b_size); +	} +  	submit_bio(bio);  	return 0;  } |