Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c174009 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: Fix a bug in nfs_fscache_release_page()

Not having an fscache cookie is perfectly valid if the user didn't mount
with the fscache option.

This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=15234



Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: default avatarDavid Howells <dhowells@redhat.com>
Cc: stable@kernel.org
parent deb0c98c
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -354,12 +354,11 @@ void nfs_fscache_reset_inode_cookie(struct inode *inode)
 */
int nfs_fscache_release_page(struct page *page, gfp_t gfp)
{
	if (PageFsCache(page)) {
		struct nfs_inode *nfsi = NFS_I(page->mapping->host);
		struct fscache_cookie *cookie = nfsi->fscache;

		BUG_ON(!cookie);

	if (PageFsCache(page)) {
		dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n",
			 cookie, page, nfsi);