diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-05-20 03:18:47 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-05-21 14:01:03 -0400 |
commit | c2c4986eddaa7dc3d036cb2bfa5c8c5f1f2492a0 (patch) | |
tree | 4787499c06028f73c770daadae772c9af7c3499c /mm | |
parent | b403a98e260f3a8c7c33f58a07c7ae549852170f (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 'mm')
-rw-r--r-- | mm/page-writeback.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 0d7bbe859550..9886424e1864 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -694,6 +694,7 @@ int dirty_writeback_centisecs_handler(ctl_table *table, int write, | |||
694 | return 0; | 694 | return 0; |
695 | } | 695 | } |
696 | 696 | ||
697 | #ifdef CONFIG_BLOCK | ||
697 | void laptop_mode_timer_fn(unsigned long data) | 698 | void laptop_mode_timer_fn(unsigned long data) |
698 | { | 699 | { |
699 | struct request_queue *q = (struct request_queue *)data; | 700 | struct request_queue *q = (struct request_queue *)data; |
@@ -735,6 +736,7 @@ void laptop_sync_completion(void) | |||
735 | 736 | ||
736 | rcu_read_unlock(); | 737 | rcu_read_unlock(); |
737 | } | 738 | } |
739 | #endif | ||
738 | 740 | ||
739 | /* | 741 | /* |
740 | * If ratelimit_pages is too high then we can get into dirty-data overload | 742 | * If ratelimit_pages is too high then we can get into dirty-data overload |