提交 2c174009 编写于 作者: T Trond Myklebust

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=15234Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: NDavid Howells <dhowells@redhat.com>
Cc: stable@kernel.org
上级 deb0c98c
......@@ -354,12 +354,11 @@ void nfs_fscache_reset_inode_cookie(struct inode *inode)
*/
int nfs_fscache_release_page(struct page *page, gfp_t gfp)
{
struct nfs_inode *nfsi = NFS_I(page->mapping->host);
struct fscache_cookie *cookie = nfsi->fscache;
BUG_ON(!cookie);
if (PageFsCache(page)) {
struct nfs_inode *nfsi = NFS_I(page->mapping->host);
struct fscache_cookie *cookie = nfsi->fscache;
BUG_ON(!cookie);
dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n",
cookie, page, nfsi);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册