public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: shmem: convert to using splice instead of sendfile()
Date: Tue, 10 Jul 2007 18:43:47 -0700	[thread overview]
Message-ID: <20070710184347.037b6b3e.akpm@linux-foundation.org> (raw)
In-Reply-To: <200707102300.l6AN0xM4026841@hera.kernel.org>

On Tue, 10 Jul 2007 23:00:59 GMT Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:

> +static int shmem_readpage(struct file *file, struct page *page)
> +{
> +	struct inode *inode = page->mapping->host;
> +	int error = shmem_getpage(inode, page->index, &page, SGP_CACHE, NULL);
> +	unlock_page(page);
> +	return error;
> +}

Worried.  shmem_getpage() does

done:
	if (*pagep != filepage) {
		unlock_page(filepage);
		*pagep = filepage;
	}
	return 0;

so we end up unlocking an unlocked page?

       reply	other threads:[~2007-07-11  1:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200707102300.l6AN0xM4026841@hera.kernel.org>
2007-07-11  1:43 ` Andrew Morton [this message]
2007-07-11  6:20   ` shmem: convert to using splice instead of sendfile() Jens Axboe
2007-07-11 16:33     ` Hugh Dickins

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=20070710184347.037b6b3e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jens.axboe@oracle.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