Patchwork ext4: remove an unneeded check in ext4_releasepage

login
register
mail settings
Submitter Andrew Perepechko
Date July 2, 2012, 6:18 p.m.
Message ID <1341253117-18679-1-git-send-email-anserper@ya.ru>
Download mbox | patch
Permalink /patch/168625/
State Superseded
Headers show

Comments

Andrew Perepechko - July 2, 2012, 6:18 p.m.
From: Andrew Perepechko <andrew_perepechko@xyratex.com>

The page_has_buffers() checks in ext3/4_releasepage are not
needed, since ->releasepage() is only called if
page_has_private() is positive.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
---
 fs/ext3/inode.c |    2 --
 fs/ext4/inode.c |    2 --
 2 files changed, 4 deletions(-)

Patch

diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 9a4a5c4..ee5ef30 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1841,8 +1841,6 @@  static int ext3_releasepage(struct page *page, gfp_t wait)
 
 	trace_ext3_releasepage(page);
 	WARN_ON(PageChecked(page));
-	if (!page_has_buffers(page))
-		return 0;
 	return journal_try_to_free_buffers(journal, page, wait);
 }
 
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 02bc8cb..bfad0a8 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2796,8 +2796,6 @@  static int ext4_releasepage(struct page *page, gfp_t wait)
 	trace_ext4_releasepage(page);
 
 	WARN_ON(PageChecked(page));
-	if (!page_has_buffers(page))
-		return 0;
 	if (journal)
 		return jbd2_journal_try_to_free_buffers(journal, page, wait);
 	else