Commit a07d38af authored by David Howells's avatar David Howells Committed by Steve French

cifs: Fix missing fscache invalidation

A network filesystem needs to implement a netfslib hook to invalidate
fscache if it's to be able to use the cache.

Fix cifs to implement the cache invalidation hook.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Reviewed-by: default avatarPaulo Alcantara (Red Hat) <pc@manguebit.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Cc: stable@vger.kernel.org
Fixes: 3ee1a1fc ("cifs: Cut over to using netfslib")
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 519be989
......@@ -133,6 +133,11 @@ static void cifs_issue_write(struct netfs_io_subrequest *subreq)
goto out;
}
static void cifs_netfs_invalidate_cache(struct netfs_io_request *wreq)
{
cifs_invalidate_cache(wreq->inode, 0);
}
/*
* Split the read up according to how many credits we can get for each piece.
* It's okay to sleep here if we need to wait for more credit to become
......@@ -337,6 +342,7 @@ const struct netfs_request_ops cifs_req_ops = {
.begin_writeback = cifs_begin_writeback,
.prepare_write = cifs_prepare_write,
.issue_write = cifs_issue_write,
.invalidate_cache = cifs_netfs_invalidate_cache,
};
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment