diff options
author | Eric Biggers <ebiggers@google.com> | 2018-01-17 01:25:12 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-01-25 19:34:28 -0500 |
commit | 01950a349ec254f28bf9ad06e74a166521d213e1 (patch) | |
tree | 761fb7da7cc373bfe232e3d98839da31f78013cc | |
parent | 4bfd054ae11ea061685c4a2a6234fdc8e92fad41 (diff) |
fs/buffer.c: fold init_buffer() into init_page_buffers()
Since commit e76004093db1 ("fs/buffer.c: remove unnecessary init
operation after allocating buffer_head"), there are no callers of
init_buffer() outside of init_page_buffers(). So just fold it into
init_page_buffers().
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/buffer.c | 10 | ||||
-rw-r--r-- | include/linux/buffer_head.h | 1 |
2 files changed, 2 insertions, 9 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 0736a6a2e2f0..3091801169ce 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -53,13 +53,6 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh, | |||
53 | 53 | ||
54 | #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) |
55 | 55 | ||
56 | void init_buffer(struct buffer_head *bh, bh_end_io_t *handler, void *private) | ||
57 | { | ||
58 | bh->b_end_io = handler; | ||
59 | bh->b_private = private; | ||
60 | } | ||
61 | EXPORT_SYMBOL(init_buffer); | ||
62 | |||
63 | inline void touch_buffer(struct buffer_head *bh) | 56 | inline void touch_buffer(struct buffer_head *bh) |
64 | { | 57 | { |
65 | trace_block_touch_buffer(bh); | 58 | trace_block_touch_buffer(bh); |
@@ -922,7 +915,8 @@ init_page_buffers(struct page *page, struct block_device *bdev, | |||
922 | 915 | ||
923 | do { | 916 | do { |
924 | if (!buffer_mapped(bh)) { | 917 | if (!buffer_mapped(bh)) { |
925 | init_buffer(bh, NULL, NULL); | 918 | bh->b_end_io = NULL; |
919 | bh->b_private = NULL; | ||
926 | bh->b_bdev = bdev; | 920 | bh->b_bdev = bdev; |
927 | bh->b_blocknr = block; | 921 | bh->b_blocknr = block; |
928 | if (uptodate) | 922 | if (uptodate) |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 8b1bf8d3d4a2..58a82f58e44e 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -151,7 +151,6 @@ void buffer_check_dirty_writeback(struct page *page, | |||
151 | 151 | ||
152 | void mark_buffer_dirty(struct buffer_head *bh); | 152 | void mark_buffer_dirty(struct buffer_head *bh); |
153 | void mark_buffer_write_io_error(struct buffer_head *bh); | 153 | void mark_buffer_write_io_error(struct buffer_head *bh); |
154 | void init_buffer(struct buffer_head *, bh_end_io_t *, void *); | ||
155 | void touch_buffer(struct buffer_head *bh); | 154 | void touch_buffer(struct buffer_head *bh); |
156 | void set_bh_page(struct buffer_head *bh, | 155 | void set_bh_page(struct buffer_head *bh, |
157 | struct page *page, unsigned long offset); | 156 | struct page *page, unsigned long offset); |