LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: shaggy@austin.ibm.com (Dave Kleikamp)
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [git pull] jfs update
Date: Wed, 24 May 2006 08:10:08 -0500 (CDT)	[thread overview]
Message-ID: <20060524131008.2D77882E0B@kleikamp.austin.ibm.com> (raw)

Linus, please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6.git for-linus

This will update the following file:

 fs/jfs/jfs_metapage.c |   20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

through these ChangeSets:

JFS: Fix multiple errors in metapage_releasepage

It looks like metapage_releasepage was making in invalid assumption that
the releasepage method would not be called on a dirty page.  Instead of
issuing a warning and releasing the metapage, it should return 0, indicating
that the private data for the page cannot be released.

I also realized that metapage_releasepage had the return code all wrong.  If
it is successful in releasing the private data, it should return 1, otherwise
it needs to return 0.

Lastly, there is no need to call wait_on_page_writeback, since
try_to_release_page will not call us with a page in writback state.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>

---
commit b964638ffd59b61c13f02b81e5118a6e573d91cd
tree 118ab6ba3bceab3ab39d7d22070d03af2ace6f18
parent 387e2b0439026aa738a9edca15a57e5c0bcb4dfc
author Dave Kleikamp <shaggy@austin.ibm.com> Wed, 24 May 2006 07:43:38 -0500
committer Dave Kleikamp <shaggy@austin.ibm.com> Wed, 24 May 2006 07:43:38 -0500

 fs/jfs/jfs_metapage.c |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
index f28696f..2b220dd 100644
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
@@ -542,7 +542,7 @@ add_failed:
 static int metapage_releasepage(struct page *page, gfp_t gfp_mask)
 {
 	struct metapage *mp;
-	int busy = 0;
+	int ret = 1;
 	unsigned int offset;
 
 	for (offset = 0; offset < PAGE_CACHE_SIZE; offset += PSIZE) {
@@ -552,30 +552,20 @@ static int metapage_releasepage(struct p
 			continue;
 
 		jfs_info("metapage_releasepage: mp = 0x%p", mp);
-		if (mp->count || mp->nohomeok) {
+		if (mp->count || mp->nohomeok ||
+		    test_bit(META_dirty, &mp->flag)) {
 			jfs_info("count = %ld, nohomeok = %d", mp->count,
 				 mp->nohomeok);
-			busy = 1;
+			ret = 0;
 			continue;
 		}
-		wait_on_page_writeback(page);
-		//WARN_ON(test_bit(META_dirty, &mp->flag));
-		if (test_bit(META_dirty, &mp->flag)) {
-			dump_mem("dirty mp in metapage_releasepage", mp,
-				 sizeof(struct metapage));
-			dump_mem("page", page, sizeof(struct page));
-			dump_stack();
-		}
 		if (mp->lsn)
 			remove_from_logsync(mp);
 		remove_metapage(page, mp);
 		INCREMENT(mpStat.pagefree);
 		free_metapage(mp);
 	}
-	if (busy)
-		return -1;
-
-	return 0;
+	return ret;
 }
 
 static void metapage_invalidatepage(struct page *page, unsigned long offset)

             reply	other threads:[~2006-05-24 13:10 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 13:10 Dave Kleikamp [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-27 14:55 [GIT PULL] " Dave Kleikamp
2010-04-21 12:42 shaggy
2009-07-23 18:27 shaggy
2009-06-16 19:14 shaggy
2009-06-11 16:58 shaggy
2009-03-25 12:43 [git pull] " shaggy
2008-12-29 16:01 shaggy
2008-07-14 16:48 shaggy
2008-04-17 18:36 shaggy
2008-02-07 21:02 shaggy
2008-01-25 19:27 shaggy
2007-10-10 13:35 shaggy
2007-07-09 19:34 Dave Kleikamp
2007-05-08 14:51 Dave Kleikamp
2007-04-28 13:20 Dave Kleikamp
2007-02-14 23:08 Dave Kleikamp
2007-02-07 13:35 Dave Kleikamp
2006-12-12 15:16 Dave Kleikamp
2006-11-04  3:07 Dave Kleikamp
2006-11-02 14:23 Dave Kleikamp
2006-10-23 12:53 Dave Kleikamp
2006-10-02 15:16 Dave Kleikamp
2006-10-02 15:31 ` Linus Torvalds
2006-10-02 15:41   ` Dave Kleikamp
2006-10-02 16:21     ` Al Viro
2006-09-25 13:04 Dave Kleikamp
2006-08-03 14:37 Dave Kleikamp
2006-07-14  1:45 Dave Kleikamp
2006-07-06 14:20 Dave Kleikamp
2006-03-20 14:57 Dave Kleikamp
2006-03-14 18:47 Dave Kleikamp
2006-03-14 19:33 ` Linus Torvalds
2005-11-09 21:40 Dave Kleikamp
2005-10-28 19:12 Dave Kleikamp
2005-08-04 21:07 Dave Kleikamp
2005-07-27 18:05 Dave Kleikamp
2005-07-27 23:43 ` Linus Torvalds
2005-07-13 14:41 Dave Kleikamp
2005-06-20 16:18 Dave Kleikamp
2005-05-04 20:47 Dave Kleikamp
2005-05-04 21:37 ` Linus Torvalds
2005-05-05 18:16   ` Jeff Garzik
2005-05-05 18:22     ` Linus Torvalds
2005-05-05 18:51       ` Dave Kleikamp
2005-05-05 19:39         ` Andrew Morton
2005-05-06 19:13           ` Dave Kleikamp

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=20060524131008.2D77882E0B@kleikamp.austin.ibm.com \
    --to=shaggy@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --subject='Re: [git pull] jfs update' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).