mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, cluster-devel@redhat.com
Subject: Re: [PATCH] nfs: Fix nfs_readpages() error path
Date: Mon, 30 Oct 2006 05:40:42 +0900	[thread overview]
Message-ID: <87pscaua7p.fsf@duaron.myhome.or.jp> (raw)
In-Reply-To: <1162149038.5545.37.camel@lade.trondhjem.org> (Trond Myklebust's message of "Sun\, 29 Oct 2006 14\:10\:38 -0500")

Trond Myklebust <Trond.Myklebust@netapp.com> writes:

> On Mon, 2006-10-30 at 00:56 +0900, OGAWA Hirofumi wrote:
>> ------------[ cut here ]------------
>> kernel BUG at /devel/linux/works/linux-2.6/mm/readahead.c:315!
>> 
>> The a_ops->readpages() is nfs_readpages(), and it seems to don't free
>> pages list in error path. So, it hit the
>> BUG_ON(!list_empty(&page_pool)) in __do_page_cache_readahead.
>
> Wait. Why do we have this insane cleanup semantic anyway? I've just
> grepped through the various readpages() methods out there. None of them
> do anything more sophisticated than to call put_pages_list() in case of
> error, and several of them get that wrong (including NFS, and CIFS).
>
> Instead of the BUG_ON(), why can't we just stick a put_pages_list() into
> __do_page_cache_readahead() and then get rid of all that duplicated
> error handling in mpage_readpages(), nfs_readpages(), fuse_readpages(),
> etc?

Yes, I thought it too. Probably, author thought passed pages's owner
is readpages side, and owner can use that list with favorite way.

Well, both seems right things for me. So, the patch was done by
minimum change for -rc. If you want it, I'll do.


BTW, umm.. now I think, gfs2_readpages() seems to have a bug in error
path by different way. unlock_page() is really needed?
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

  parent reply	other threads:[~2006-10-29 20:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-29 15:56 OGAWA Hirofumi
2006-10-29 19:10 ` Trond Myklebust
2006-10-29 20:16   ` Andrew Morton
2006-10-29 20:19     ` Trond Myklebust
2006-10-29 20:40   ` OGAWA Hirofumi [this message]
2006-10-29 21:58     ` Trond Myklebust
2006-10-30 14:57       ` Steven Whitehouse

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=87pscaua7p.fsf@duaron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=Trond.Myklebust@netapp.com \
    --cc=akpm@osdl.org \
    --cc=cluster-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®