diff options
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r-- | include/linux/buffer_head.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 737e407d0cd1..131ffd37e716 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/wait.h> | 14 | #include <linux/wait.h> |
15 | #include <asm/atomic.h> | 15 | #include <asm/atomic.h> |
16 | 16 | ||
17 | #ifdef CONFIG_BLOCK | ||
18 | |||
17 | enum bh_state_bits { | 19 | enum bh_state_bits { |
18 | BH_Uptodate, /* Contains valid data */ | 20 | BH_Uptodate, /* Contains valid data */ |
19 | BH_Dirty, /* Is dirty */ | 21 | BH_Dirty, /* Is dirty */ |
@@ -190,9 +192,7 @@ extern int buffer_heads_over_limit; | |||
190 | * Generic address_space_operations implementations for buffer_head-backed | 192 | * Generic address_space_operations implementations for buffer_head-backed |
191 | * address_spaces. | 193 | * address_spaces. |
192 | */ | 194 | */ |
193 | int try_to_release_page(struct page * page, gfp_t gfp_mask); | ||
194 | void block_invalidatepage(struct page *page, unsigned long offset); | 195 | void block_invalidatepage(struct page *page, unsigned long offset); |
195 | void do_invalidatepage(struct page *page, unsigned long offset); | ||
196 | int block_write_full_page(struct page *page, get_block_t *get_block, | 196 | int block_write_full_page(struct page *page, get_block_t *get_block, |
197 | struct writeback_control *wbc); | 197 | struct writeback_control *wbc); |
198 | int block_read_full_page(struct page*, get_block_t*); | 198 | int block_read_full_page(struct page*, get_block_t*); |
@@ -302,4 +302,19 @@ static inline void lock_buffer(struct buffer_head *bh) | |||
302 | __lock_buffer(bh); | 302 | __lock_buffer(bh); |
303 | } | 303 | } |
304 | 304 | ||
305 | extern int __set_page_dirty_buffers(struct page *page); | ||
306 | |||
307 | #else /* CONFIG_BLOCK */ | ||
308 | |||
309 | static inline void buffer_init(void) {} | ||
310 | static inline int try_to_free_buffers(struct page *page) { return 1; } | ||
311 | static inline int sync_blockdev(struct block_device *bdev) { return 0; } | ||
312 | static inline int inode_has_buffers(struct inode *inode) { return 0; } | ||
313 | static inline void invalidate_inode_buffers(struct inode *inode) {} | ||
314 | static inline int remove_inode_buffers(struct inode *inode) { return 1; } | ||
315 | static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; } | ||
316 | static inline void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers) {} | ||
317 | |||
318 | |||
319 | #endif /* CONFIG_BLOCK */ | ||
305 | #endif /* _LINUX_BUFFER_HEAD_H */ | 320 | #endif /* _LINUX_BUFFER_HEAD_H */ |