]> Pileus Git - ~andy/linux/blobdiff - fs/nfs/dir.c
Merge remote-tracking branches 'spi/fix/ath79', 'spi/fix/atmel', 'spi/fix/coldfire...
[~andy/linux] / fs / nfs / dir.c
index be38b573495a78ddf281629da6e5f85f98eed17b..4a48fe4b84b68c4e704aea84ea761e101a5ad0df 100644 (file)
@@ -1846,6 +1846,11 @@ int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
                                                        GFP_KERNEL)) {
                SetPageUptodate(page);
                unlock_page(page);
+               /*
+                * add_to_page_cache_lru() grabs an extra page refcount.
+                * Drop it here to avoid leaking this page later.
+                */
+               page_cache_release(page);
        } else
                __free_page(page);