Commit 38cb52ca authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] remove set_page_buffers() and clear_page_buffers()

The set_page_buffers() and clear_page_buffers() macros are each used in
only one place.  Fold them into their callers.
parent a28b4d4e
...@@ -152,14 +152,16 @@ __set_page_buffers(struct page *page, struct buffer_head *head) ...@@ -152,14 +152,16 @@ __set_page_buffers(struct page *page, struct buffer_head *head)
{ {
if (page_has_buffers(page)) if (page_has_buffers(page))
buffer_error(); buffer_error();
set_page_buffers(page, head);
page_cache_get(page); page_cache_get(page);
SetPagePrivate(page);
page->private = (unsigned long)head;
} }
static inline void static inline void
__clear_page_buffers(struct page *page) __clear_page_buffers(struct page *page)
{ {
clear_page_buffers(page); ClearPagePrivate(page);
page->private = 0;
page_cache_release(page); page_cache_release(page);
} }
......
...@@ -119,16 +119,6 @@ BUFFER_FNS(Boundary, boundary) ...@@ -119,16 +119,6 @@ BUFFER_FNS(Boundary, boundary)
((struct buffer_head *)(page)->private); \ ((struct buffer_head *)(page)->private); \
}) })
#define page_has_buffers(page) PagePrivate(page) #define page_has_buffers(page) PagePrivate(page)
#define set_page_buffers(page, buffers) \
do { \
SetPagePrivate(page); \
page->private = (unsigned long)buffers; \
} while (0)
#define clear_page_buffers(page) \
do { \
ClearPagePrivate(page); \
page->private = 0; \
} while (0)
#define invalidate_buffers(dev) __invalidate_buffers((dev), 0) #define invalidate_buffers(dev) __invalidate_buffers((dev), 0)
#define destroy_buffers(dev) __invalidate_buffers((dev), 1) #define destroy_buffers(dev) __invalidate_buffers((dev), 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment