summaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-07 04:01:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-07 04:01:47 +0200
commit053f78d359953be40043972c98e16b3f1cd9fc27 (patch)
tree80185e1554da6362dd3ca411a3e724864c59dc05 /fs/nfs/dir.c
parentMerge tag 'extcon-fixes-for-4.6-rc3' of git://git.kernel.org/pub/scm/linux/ke... (diff)
parentlkdtm: do not leak free page on kmalloc failure (diff)
downloadlinux-053f78d359953be40043972c98e16b3f1cd9fc27.tar.xz
linux-053f78d359953be40043972c98e16b3f1cd9fc27.zip
Merge tag 'lkdtm-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into char-misc-linus
Kees briefly writes: fixes some possible memory allocation leaks on error paths
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 4bfa7d8bcade..adef506c5786 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -707,7 +707,7 @@ void cache_page_release(nfs_readdir_descriptor_t *desc)
{
if (!desc->page->mapping)
nfs_readdir_clear_array(desc->page);
- page_cache_release(desc->page);
+ put_page(desc->page);
desc->page = NULL;
}
@@ -1923,7 +1923,7 @@ int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
* add_to_page_cache_lru() grabs an extra page refcount.
* Drop it here to avoid leaking this page later.
*/
- page_cache_release(page);
+ put_page(page);
} else
__free_page(page);