From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [patch 14/19] remove set_page_buffers() and clear_page_buffers()
Date: Sun, 16 Jun 2002 23:53:18 -0700 [thread overview]
Message-ID: <3D0D875E.85A7B886@zip.com.au> (raw)
The set_page_buffers() and clear_page_buffers() macros are each used in
only one place. Fold them into their callers.
--- 2.5.22/include/linux/buffer_head.h~move-set_page_buffers Sun Jun 16 23:12:51 2002
+++ 2.5.22-akpm/include/linux/buffer_head.h Sun Jun 16 23:22:44 2002
@@ -117,16 +117,6 @@ BUFFER_FNS(Boundary, boundary)
((struct buffer_head *)(page)->private); \
})
#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 destroy_buffers(dev) __invalidate_buffers((dev), 1)
--- 2.5.22/fs/buffer.c~move-set_page_buffers Sun Jun 16 23:12:51 2002
+++ 2.5.22-akpm/fs/buffer.c Sun Jun 16 23:22:44 2002
@@ -152,14 +152,16 @@ __set_page_buffers(struct page *page, st
{
if (page_has_buffers(page))
buffer_error();
- set_page_buffers(page, head);
page_cache_get(page);
+ SetPagePrivate(page);
+ page->private = (unsigned long)head;
}
static inline void
__clear_page_buffers(struct page *page)
{
- clear_page_buffers(page);
+ ClearPagePrivate(page);
+ page->private = 0;
page_cache_release(page);
}
-
reply other threads:[~2002-06-17 7:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D0D875E.85A7B886@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox