aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/buffer_head.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r--include/linux/buffer_head.h19
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
17enum bh_state_bits { 19enum 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 */
193int try_to_release_page(struct page * page, gfp_t gfp_mask);
194void block_invalidatepage(struct page *page, unsigned long offset); 195void block_invalidatepage(struct page *page, unsigned long offset);
195void do_invalidatepage(struct page *page, unsigned long offset);
196int block_write_full_page(struct page *page, get_block_t *get_block, 196int block_write_full_page(struct page *page, get_block_t *get_block,
197 struct writeback_control *wbc); 197 struct writeback_control *wbc);
198int block_read_full_page(struct page*, get_block_t*); 198int 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
305extern int __set_page_dirty_buffers(struct page *page);
306
307#else /* CONFIG_BLOCK */
308
309static inline void buffer_init(void) {}
310static inline int try_to_free_buffers(struct page *page) { return 1; }
311static inline int sync_blockdev(struct block_device *bdev) { return 0; }
312static inline int inode_has_buffers(struct inode *inode) { return 0; }
313static inline void invalidate_inode_buffers(struct inode *inode) {}
314static inline int remove_inode_buffers(struct inode *inode) { return 1; }
315static inline int sync_mapping_buffers(struct address_space *mapping) { return 0; }
316static 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 */