From: Christoph Hellwig <hch@infradead.org>
To: dag@bakke.com
Cc: nathans@sgi.com, linux-kernel@vger.kernel.org, linux-xfs@oss.sgi.com
Subject: Re: xfsdump hangs - 2.6.6 && 2.6.7-rc1-bk3
Date: Thu, 27 May 2004 09:18:49 +0100 [thread overview]
Message-ID: <20040527081849.GA12359@infradead.org> (raw)
In-Reply-To: <20040527010946.9778.h018.c000.wm@mail.bakke.com.criticalpath.net>
My patch still wasn't complete, you're still leaking pages, just not
locked ones, this patch should be better and I'll check it in in a few
minutes:
--- 1.111/fs/xfs/linux/xfs_buf.c 2004-04-28 06:45:14 +02:00
+++ edited/fs/xfs/linux/xfs_buf.c 2004-05-27 08:38:46 +02:00
@@ -359,6 +359,7 @@
error = _pagebuf_get_pages(bp, page_count, flags);
if (unlikely(error))
return error;
+ bp->pb_flags |= _PBF_PAGE_CACHE;
offset = bp->pb_offset;
first = bp->pb_file_offset >> PAGE_CACHE_SHIFT;
@@ -370,8 +371,12 @@
retry:
page = find_or_create_page(mapping, first + i, gfp_mask);
if (unlikely(page == NULL)) {
- if (flags & PBF_READ_AHEAD)
+ if (flags & PBF_READ_AHEAD) {
+ bp->pb_page_count = i;
+ for (i = 0; i < bp->pb_page_count; i++)
+ unlock_page(bp->pb_pages[i]);
return -ENOMEM;
+ }
/*
* This could deadlock.
@@ -426,8 +431,6 @@
for (i = 0; i < bp->pb_page_count; i++)
unlock_page(bp->pb_pages[i]);
}
-
- bp->pb_flags |= _PBF_PAGE_CACHE;
if (page_count) {
/* if we have any uptodate pages, mark that in the buffer */
next prev parent reply other threads:[~2004-05-27 8:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-27 8:09 xfsdump hangs - 2.6.6 && 2.6.7-rc1-bk3 dag
2004-05-27 8:18 ` Christoph Hellwig [this message]
2004-05-27 10:05 ` Nathan Scott
-- strict thread matches above, loose matches on Subject: below --
2004-05-26 17:01 dag
2004-05-26 16:13 dag
2004-05-26 20:37 ` Nathan Scott
2004-05-27 5:58 ` Nathan Scott
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=20040527081849.GA12359@infradead.org \
--to=hch@infradead.org \
--cc=dag@bakke.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@oss.sgi.com \
--cc=nathans@sgi.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