Re: [PATCH 1/8] cifs: fix page refcount leak
Steve French <[email protected]> Tue, 1 Jun 2010 12:16:27 -0500
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
merged. Will wait a few days before request upstream. Reviewing and checking the others. On Tue, Jun 1, 2010 at 9:54 AM, Jeff Layton <[email protected]> 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 <[email protected]> > Acked-by: Nick Piggin <[email protected]> > --- > =A0fs/cifs/file.c | =A0 =A01 + > =A01 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/fs/cifs/file.c b/fs/cifs/file.c > index f1ff785..75541af 100644 > --- a/fs/cifs/file.c > +++ b/fs/cifs/file.c > @@ -1952,6 +1952,7 @@ static void cifs_copy_cache_pages(struct address_sp= ace *mapping, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bytes_read -=3D PAGE_CACHE= _SIZE; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0continue; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 page_cache_release(page); > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0target =3D kmap_atomic(page, KM_USER0); > > -- > 1.6.6.1 > > -- = Thanks, Steve