aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 8e18281b4077..b4dcb34c9635 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -41,6 +41,7 @@
41#include <linux/bitops.h> 41#include <linux/bitops.h>
42#include <linux/mpage.h> 42#include <linux/mpage.h>
43#include <linux/bit_spinlock.h> 43#include <linux/bit_spinlock.h>
44#include <trace/events/block.h>
44 45
45static int fsync_buffers_list(spinlock_t *lock, struct list_head *list); 46static int fsync_buffers_list(spinlock_t *lock, struct list_head *list);
46 47
@@ -53,6 +54,13 @@ void init_buffer(struct buffer_head *bh, bh_end_io_t *handler, void *private)
53} 54}
54EXPORT_SYMBOL(init_buffer); 55EXPORT_SYMBOL(init_buffer);
55 56
57inline void touch_buffer(struct buffer_head *bh)
58{
59 trace_block_touch_buffer(bh);
60 mark_page_accessed(bh->b_page);
61}
62EXPORT_SYMBOL(touch_buffer);
63
56static int sleep_on_buffer(void *word) 64static int sleep_on_buffer(void *word)
57{ 65{
58 io_schedule(); 66 io_schedule();
@@ -1113,6 +1121,8 @@ void mark_buffer_dirty(struct buffer_head *bh)
1113{ 1121{
1114 WARN_ON_ONCE(!buffer_uptodate(bh)); 1122 WARN_ON_ONCE(!buffer_uptodate(bh));
1115 1123
1124 trace_block_dirty_buffer(bh);
1125
1116 /* 1126 /*
1117 * Very *carefully* optimize the it-is-already-dirty case. 1127 * Very *carefully* optimize the it-is-already-dirty case.
1118 * 1128 *