linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Jeff Layton <jlayton@redhat.com>
Cc: sfrench@gmail.com, shaggy@linux.vnet.ibm.com,
	linux-cifs-client@lists.samba.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] cifs: fix page refcount leak
Date: Wed, 26 May 2010 02:54:30 +1000	[thread overview]
Message-ID: <20100525165430.GG20853@laptop> (raw)
In-Reply-To: <1274804917-23814-1-git-send-email-jlayton@redhat.com>

On Tue, May 25, 2010 at 12:28:37PM -0400, Jeff Layton wrote:
> Commit 315e995c63a15cb4d4efdbfd70fe2db191917f7a is causing OOM kills
> when stress-testing a CIFS filesystem. The VFS readpages operation takes
> a page reference. The older code just handed this reference off to the
> page cache, but the new code takes an extra one. The simplest fix is to
> put the new reference after add_to_page_cache_lru.
> 
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> Cc: Nick Piggin <npiggin@suse.de>

Acked-by: Nick Piggin <npiggin@suse.de>

> ---
>  fs/cifs/file.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index 310533d..29ca398 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -1919,6 +1919,7 @@ static void cifs_copy_cache_pages(struct address_space *mapping,
>  			bytes_read -= PAGE_CACHE_SIZE;
>  			continue;
>  		}
> +		page_cache_release(page);
>  
>  		target = kmap_atomic(page, KM_USER0);
>  
> -- 
> 1.6.6.1

      reply	other threads:[~2010-05-25 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 16:28 [PATCH] cifs: fix page refcount leak Jeff Layton
2010-05-25 16:54 ` Nick Piggin [this message]

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=20100525165430.GG20853@laptop \
    --to=npiggin@suse.de \
    --cc=jlayton@redhat.com \
    --cc=linux-cifs-client@lists.samba.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sfrench@gmail.com \
    --cc=shaggy@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).