aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index b4dcb34c9635..10ef81e10b20 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -865,8 +865,6 @@ try_again:
865 865
866 /* Link the buffer to its page */ 866 /* Link the buffer to its page */
867 set_bh_page(bh, page, offset); 867 set_bh_page(bh, page, offset);
868
869 init_buffer(bh, NULL, NULL);
870 } 868 }
871 return head; 869 return head;
872/* 870/*
@@ -2949,7 +2947,7 @@ static void guard_bh_eod(int rw, struct bio *bio, struct buffer_head *bh)
2949 } 2947 }
2950} 2948}
2951 2949
2952int submit_bh(int rw, struct buffer_head * bh) 2950int _submit_bh(int rw, struct buffer_head *bh, unsigned long bio_flags)
2953{ 2951{
2954 struct bio *bio; 2952 struct bio *bio;
2955 int ret = 0; 2953 int ret = 0;
@@ -2984,6 +2982,7 @@ int submit_bh(int rw, struct buffer_head * bh)
2984 2982
2985 bio->bi_end_io = end_bio_bh_io_sync; 2983 bio->bi_end_io = end_bio_bh_io_sync;
2986 bio->bi_private = bh; 2984 bio->bi_private = bh;
2985 bio->bi_flags |= bio_flags;
2987 2986
2988 /* Take care of bh's that straddle the end of the device */ 2987 /* Take care of bh's that straddle the end of the device */
2989 guard_bh_eod(rw, bio, bh); 2988 guard_bh_eod(rw, bio, bh);
@@ -2997,6 +2996,12 @@ int submit_bh(int rw, struct buffer_head * bh)
2997 bio_put(bio); 2996 bio_put(bio);
2998 return ret; 2997 return ret;
2999} 2998}
2999EXPORT_SYMBOL_GPL(_submit_bh);
3000
3001int submit_bh(int rw, struct buffer_head *bh)
3002{
3003 return _submit_bh(rw, bh, 0);
3004}
3000EXPORT_SYMBOL(submit_bh); 3005EXPORT_SYMBOL(submit_bh);
3001 3006
3002/** 3007/**