aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-09 12:12:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-09 12:12:53 -0400
commit11fbf53d66ec302fe50b06bd7cb4863dbb98775a (patch)
tree1e7f8fdb574313b9c1403d2f89386a461c9b2eaa /fs/buffer.c
parent339fbf6796f8e74544091adbf511286768eaf93e (diff)
parent6b4657667ba06cd2e07206c65e630acdf248bfd1 (diff)
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc vfs updates from Al Viro: "Assorted bits and pieces from various people. No common topic in this pile, sorry" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs/affs: add rename exchange fs/affs: add rename2 to prepare multiple methods Make stat/lstat/fstatat pass AT_NO_AUTOMOUNT to vfs_statx() fs: don't set *REFERENCED on single use objects fs: compat: Remove warning from COMPATIBLE_IOCTL remove pointless extern of atime_need_update_rcu() fs: completely ignore unknown open flags fs: add a VALID_OPEN_FLAGS fs: remove _submit_bh() fs: constify tree_descr arrays passed to simple_fill_super() fs: drop duplicate header percpu-rwsem.h fs/affs: bugfix: Write files greater than page size on OFS fs/affs: bugfix: enable writes on OFS disks fs/affs: remove node generation check fs/affs: import amigaffs.h fs/affs: bugfix: make symbolic links work again
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index c3c7455efa3f..161be58c5cb0 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;
@@ -3092,7 +3091,7 @@ void guard_bio_eod(int op, struct bio *bio)
3092} 3091}
3093 3092
3094static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, 3093static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,
3095 unsigned long bio_flags, struct writeback_control *wbc) 3094 struct writeback_control *wbc)
3096{ 3095{
3097 struct bio *bio; 3096 struct bio *bio;
3098 3097
@@ -3127,7 +3126,6 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,
3127 3126
3128 bio->bi_end_io = end_bio_bh_io_sync; 3127 bio->bi_end_io = end_bio_bh_io_sync;
3129 bio->bi_private = bh; 3128 bio->bi_private = bh;
3130 bio->bi_flags |= bio_flags;
3131 3129
3132 /* Take care of bh's that straddle the end of the device */ 3130 /* Take care of bh's that straddle the end of the device */
3133 guard_bio_eod(op, bio); 3131 guard_bio_eod(op, bio);
@@ -3142,16 +3140,9 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,
3142 return 0; 3140 return 0;
3143} 3141}
3144 3142
3145int _submit_bh(int op, int op_flags, struct buffer_head *bh, 3143int submit_bh(int op, int op_flags, struct buffer_head *bh)
3146 unsigned long bio_flags)
3147{ 3144{
3148 return submit_bh_wbc(op, op_flags, bh, bio_flags, NULL); 3145 return submit_bh_wbc(op, op_flags, bh, NULL);
3149}
3150EXPORT_SYMBOL_GPL(_submit_bh);
3151
3152int submit_bh(int op, int op_flags, struct buffer_head *bh)
3153{
3154 return submit_bh_wbc(op, op_flags, bh, 0, NULL);
3155} 3146}
3156EXPORT_SYMBOL(submit_bh); 3147EXPORT_SYMBOL(submit_bh);
3157 3148