diff options
author | Tejun Heo <tj@kernel.org> | 2013-01-11 16:06:35 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-01-14 09:00:36 -0500 |
commit | f0059afd3e6e7aa1a0ffc23468b74c43d47660b8 (patch) | |
tree | fe8f51ff74f725a182f312e1cfb3fea819f33cd6 /include/linux/buffer_head.h | |
parent | 8c1cf6bb02fda79b0a4b9bd121f6be6d4ce7a15a (diff) |
buffer: make touch_buffer() an exported function
We want to add a trace point to touch_buffer() but macros and inline
functions defined in header files can't have tracing points. Move
touch_buffer() to fs/buffer.c and make it a proper function.
The new exported function is also declared inline. As most uses of
touch_buffer() are inside buffer.c with nilfs2 as the only other user,
the effect of this change should be negligible.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r-- | include/linux/buffer_head.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 458f497738a4..5afc4f94d110 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -126,7 +126,6 @@ BUFFER_FNS(Write_EIO, write_io_error) | |||
126 | BUFFER_FNS(Unwritten, unwritten) | 126 | BUFFER_FNS(Unwritten, unwritten) |
127 | 127 | ||
128 | #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) | 128 | #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) |
129 | #define touch_buffer(bh) mark_page_accessed(bh->b_page) | ||
130 | 129 | ||
131 | /* If we *know* page->private refers to buffer_heads */ | 130 | /* If we *know* page->private refers to buffer_heads */ |
132 | #define page_buffers(page) \ | 131 | #define page_buffers(page) \ |
@@ -142,6 +141,7 @@ BUFFER_FNS(Unwritten, unwritten) | |||
142 | 141 | ||
143 | void mark_buffer_dirty(struct buffer_head *bh); | 142 | void mark_buffer_dirty(struct buffer_head *bh); |
144 | void init_buffer(struct buffer_head *, bh_end_io_t *, void *); | 143 | void init_buffer(struct buffer_head *, bh_end_io_t *, void *); |
144 | void touch_buffer(struct buffer_head *bh); | ||
145 | void set_bh_page(struct buffer_head *bh, | 145 | void set_bh_page(struct buffer_head *bh, |
146 | struct page *page, unsigned long offset); | 146 | struct page *page, unsigned long offset); |
147 | int try_to_free_buffers(struct page *); | 147 | int try_to_free_buffers(struct page *); |