fs/buffer.c: do not inline exported function
PATCH 1/2 fs/buffer.c: do not inline exported function
It makes no sense to inlines exported function.
Signed-off-by Yan Hong <[email protected]>
---
init_buffer() is trivial and only get two module users. Maybe we can move it to buffer_head.h.
Remove inline is much more simple to make it clean though.
fs/buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/buffer.c +1 -2
@@ -46,8 +46,7 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);#define BH_ENTRY (list) list_entry((list), struct buffer_head, b_assoc_buffers) -inline void -init_buffer (struct buffer_head *bh,bh_end_io_t *handler,void *private) +void init_buffer (struct buffer_head *bh,bh_end_io_t *handler,void *private) { bh->b_end_io = handler; bh->b_private = private;
Signature · 1 line
1.7.9.5
PATCH 2/2 fs/buffer.c: remove redundant initialization in alloc_page_buffers()
buffer_head comes from kmem_cache_zalloc(), no need to zero its field.
Signed-off-by Yan Hong <[email protected]>
---
init_buffer() can be actually removed too, but I'm afraid someday its semantic will beyond initializing ->b_end_io and ->b_private.
fs/buffer.c | 3 --- 1 file changed, 3 deletions(-)
fs/buffer.c +0 -3
@@ -849,13 +849,10 @@ try_again:if (!bh) goto no_grow; - bh->b_bdev =NULL ; bh->b_this_page = head; bh->b_blocknr =-1 ; head = bh; - bh->b_state =0 ; -atomic_set (&bh->b_count,0 ); bh->b_size = size;/* Link the buffer to its page */
Signature · 1 line
1.7.9.5