diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-06-01 16:54:45 +0200 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-06-01 19:15:52 +0200 |
commit | 06b43672a9e665cab18dc7b77d56d36884b90d45 (patch) | |
tree | 79cc0493370222c074709a0c742ee4209a63e582 /fs | |
parent | Linux 2.6.35-rc1 (diff) | |
download | linux-06b43672a9e665cab18dc7b77d56d36884b90d45.tar.xz linux-06b43672a9e665cab18dc7b77d56d36884b90d45.zip |
cifs: fix page refcount leak
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>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | 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 f1ff785b2292..75541af4b3db 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1952,6 +1952,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); |