Skip to content

Commit

Permalink
fs/buffer.c: fold init_buffer() into init_page_buffers()
Browse files Browse the repository at this point in the history
Since commit e760040 ("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 <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
ebiggers authored and Al Viro committed Jan 26, 2018
1 parent 4bfd054 commit 01950a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 2 additions & 8 deletions fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,

#define BH_ENTRY(list) list_entry((list), struct buffer_head, b_assoc_buffers)

void init_buffer(struct buffer_head *bh, bh_end_io_t *handler, void *private)
{
bh->b_end_io = handler;
bh->b_private = private;
}
EXPORT_SYMBOL(init_buffer);

inline void touch_buffer(struct buffer_head *bh)
{
trace_block_touch_buffer(bh);
Expand Down Expand Up @@ -922,7 +915,8 @@ init_page_buffers(struct page *page, struct block_device *bdev,

do {
if (!buffer_mapped(bh)) {
init_buffer(bh, NULL, NULL);
bh->b_end_io = NULL;
bh->b_private = NULL;
bh->b_bdev = bdev;
bh->b_blocknr = block;
if (uptodate)
Expand Down
1 change: 0 additions & 1 deletion include/linux/buffer_head.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ void buffer_check_dirty_writeback(struct page *page,

void mark_buffer_dirty(struct buffer_head *bh);
void mark_buffer_write_io_error(struct buffer_head *bh);
void init_buffer(struct buffer_head *, bh_end_io_t *, void *);
void touch_buffer(struct buffer_head *bh);
void set_bh_page(struct buffer_head *bh,
struct page *page, unsigned long offset);
Expand Down

0 comments on commit 01950a3

Please sign in to comment.