aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEric Biggers2017-03-25 23:02:18 -0500
committerAl Viro2017-04-26 22:54:06 -0500
commit020c2833dbc76b4069c9a9886b71511052d160df (patch)
tree98f0efdbd2cbce065817de4519e1f6fe5a4ef40a /fs
parentcda37124f4e95ad5ccb11394a5802b0972668b32 (diff)
downloadkernel-020c2833dbc76b4069c9a9886b71511052d160df.tar.gz
kernel-020c2833dbc76b4069c9a9886b71511052d160df.tar.xz
kernel-020c2833dbc76b4069c9a9886b71511052d160df.zip
fs: remove _submit_bh()
_submit_bh() allowed submitting a buffer_head for I/O using custom bio_flags. It used to be used by jbd to set BIO_SNAP_STABLE, introduced by commit 713685111774 ("mm: make snapshotting pages for stable writes a per-bio operation"). However, the code and flag has since been removed and no _submit_bh() users remain. These days, bio_flags are mostly used internally by the block layer to track the state of bio's. As such, it doesn't really make sense for filesystems to use them instead of op_flags when wanting special behavior for block requests. Therefore, remove _submit_bh() and trim the bio_flags argument from submit_bh_wbc(). Cc: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/buffer.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 9196f2a270da..68dc05ce06a5 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -49,7 +49,6 @@
49 49
50static int fsync_buffers_list(spinlock_t *lock, struct list_head *list); 50static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);
51static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, 51static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,
52 unsigned long bio_flags,
53 struct writeback_control *wbc); 52 struct writeback_control *wbc);
54 53
55#define BH_ENTRY(list) list_entry((list), struct buffer_head, b_assoc_buffers) 54#define BH_ENTRY(list) list_entry((list), struct buffer_head, b_assoc_buffers)
@@ -1830,7 +1829,7 @@ int __block_write_full_page(struct inode *inode, struct page *page,
1830 do { 1829 do {
1831 struct buffer_head *next = bh->b_this_page; 1830 struct buffer_head *next = bh->b_this_page;
1832 if (buffer_async_write(bh)) { 1831 if (buffer_async_write(bh)) {
1833 submit_bh_wbc(REQ_OP_WRITE, write_flags, bh, 0, wbc); 1832 submit_bh_wbc(REQ_OP_WRITE, write_flags, bh, wbc);
1834 nr_underway++; 1833 nr_underway++;
1835 } 1834 }
1836 bh = next; 1835 bh = next;
@@ -1884,7 +1883,7 @@ recover:
1884 struct buffer_head *next = bh->b_this_page; 1883 struct buffer_head *next = bh->b_this_page;
1885 if (buffer_async_write(bh)) { 1884 if (buffer_async_write(bh)) {
1886 clear_buffer_dirty(bh); 1885 clear_buffer_dirty(bh);
1887 submit_bh_wbc(REQ_OP_WRITE, write_flags, bh, 0, wbc); 1886 submit_bh_wbc(REQ_OP_WRITE, write_flags, bh, wbc);
1888 nr_underway++; 1887 nr_underway++;
1889 } 1888 }
1890 bh = next; 1889 bh = next;
@@ -3095,7 +3094,7 @@ void guard_bio_eod(int op, struct bio *bio)
3095} 3094}
3096 3095
3097static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, 3096static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,
3098 unsigned long bio_flags, struct writeback_control *wbc) 3097 struct writeback_control *wbc)
3099{ 3098{
3100 struct bio *bio; 3099 struct bio *bio;
3101 3100
@@ -3130,7 +3129,6 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,
3130 3129
3131 bio->bi_end_io = end_bio_bh_io_sync; 3130 bio->bi_end_io = end_bio_bh_io_sync;
3132 bio->bi_private = bh; 3131 bio->bi_private = bh;
3133 bio->bi_flags |= bio_flags;
3134 3132
3135 /* Take care of bh's that straddle the end of the device */ 3133 /* Take care of bh's that straddle the end of the device */
3136 guard_bio_eod(op, bio); 3134 guard_bio_eod(op, bio);
@@ -3145,16 +3143,9 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,
3145 return 0; 3143 return 0;
3146} 3144}
3147 3145
3148int _submit_bh(int op, int op_flags, struct buffer_head *bh, 3146int submit_bh(int op, int op_flags, struct buffer_head *bh)
3149 unsigned long bio_flags)
3150{ 3147{
3151 return submit_bh_wbc(op, op_flags, bh, bio_flags, NULL); 3148 return submit_bh_wbc(op, op_flags, bh, NULL);
3152}
3153EXPORT_SYMBOL_GPL(_submit_bh);
3154
3155int submit_bh(int op, int op_flags, struct buffer_head *bh)
3156{
3157 return submit_bh_wbc(op, op_flags, bh, 0, NULL);
3158} 3149}
3159EXPORT_SYMBOL(submit_bh); 3150EXPORT_SYMBOL(submit_bh);
3160 3151