aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/writeback.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2010-05-20 03:18:47 -0400
committerJens Axboe <jens.axboe@oracle.com>2010-05-21 14:01:03 -0400
commitc2c4986eddaa7dc3d036cb2bfa5c8c5f1f2492a0 (patch)
tree4787499c06028f73c770daadae772c9af7c3499c /include/linux/writeback.h
parentb403a98e260f3a8c7c33f58a07c7ae549852170f (diff)
writeback: fix problem with !CONFIG_BLOCK compilation
When CONFIG_BLOCK isn't enabled: mm/page-writeback.c: In function 'laptop_mode_timer_fn': mm/page-writeback.c:708: error: dereferencing pointer to incomplete type mm/page-writeback.c:709: error: dereferencing pointer to incomplete type Fix this by essentially eliminating the laptop sync handlers when CONFIG_BLOCK isn't set, as most are only used from the block layer code. The exception is laptop_sync_completion() which is used from sys_sync(), make that an empty declaration in that case. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r--include/linux/writeback.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 47e1c686cb02..cc97d6caf2b3 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -106,10 +106,14 @@ static inline void inode_sync_wait(struct inode *inode)
106/* 106/*
107 * mm/page-writeback.c 107 * mm/page-writeback.c
108 */ 108 */
109#ifdef CONFIG_BLOCK
109void laptop_io_completion(struct backing_dev_info *info); 110void laptop_io_completion(struct backing_dev_info *info);
110void laptop_sync_completion(void); 111void laptop_sync_completion(void);
111void laptop_mode_sync(struct work_struct *work); 112void laptop_mode_sync(struct work_struct *work);
112void laptop_mode_timer_fn(unsigned long data); 113void laptop_mode_timer_fn(unsigned long data);
114#else
115static inline void laptop_sync_completion(void) { }
116#endif
113void throttle_vm_writeout(gfp_t gfp_mask); 117void throttle_vm_writeout(gfp_t gfp_mask);
114 118
115/* These are exported to sysctl. */ 119/* These are exported to sysctl. */