summaryrefslogtreecommitdiff
path: root/include/linux/buffer_head.h
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cam.ac.uk>2004-11-01 23:09:08 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-01 23:09:08 -0800
commit1723f7f238f904153fa4485dafbc24a21630d36a (patch)
treea709ee0587811d5145532efef2c2fad122d0cabb /include/linux/buffer_head.h
parent1f82f7dddf86b2320a3e9840ecbb8d5ece260a10 (diff)
[PATCH] fs/buffer.c exports for NTFS
I renamed the functions to more descriptive names: create_buffers -> alloc_page_buffers __set_page_buffers -> attach_page_buffers And I added a EXPORT_SYMBOL_GPL for alloc_page_buffers and made attach_page_buffers static inline and moved it to <linux/buffer_head.h>. Signed-off-by: Anton Altaparmakov <aia21@cantab.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r--include/linux/buffer_head.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 856536d9f11b..f388b513df75 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -10,6 +10,7 @@
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/linkage.h>
+#include <linux/pagemap.h>
#include <linux/wait.h>
#include <asm/atomic.h>
@@ -136,6 +137,8 @@ void init_buffer(struct buffer_head *, bh_end_io_t *, void *);
void set_bh_page(struct buffer_head *bh,
struct page *page, unsigned long offset);
int try_to_free_buffers(struct page *);
+struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size,
+ int retry);
void create_empty_buffers(struct page *, unsigned long,
unsigned long b_state);
void end_buffer_read_sync(struct buffer_head *bh, int uptodate);
@@ -205,6 +208,14 @@ int nobh_truncate_page(struct address_space *, loff_t);
* inline definitions
*/
+static inline void attach_page_buffers(struct page *page,
+ struct buffer_head *head)
+{
+ page_cache_get(page);
+ SetPagePrivate(page);
+ page->private = (unsigned long)head;
+}
+
static inline void get_bh(struct buffer_head *bh)
{
atomic_inc(&bh->b_count);