]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
NFS: Fix regression whereby fscache errors are appearing on 'nofsc' mounts
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 3 Aug 2019 17:39:24 +0000 (13:39 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 17 Sep 2019 16:02:18 +0000 (18:02 +0200)
commita5cd21934d83d4f31ab8be0e8ab39e733be04995
tree6c929588b9d89a3b1cc0cb99d6092d037b2700c3
parent0621c497562fede110144e1b4a0647fa00d0bd5f
NFS: Fix regression whereby fscache errors are appearing on 'nofsc' mounts

BugLink: https://bugs.launchpad.net/bugs/1842114
[ Upstream commit dea1bb35c5f35e0577cfc61f79261d80b8715221 ]

People are reporing seeing fscache errors being reported concerning
duplicate cookies even in cases where they are not setting up fscache
at all. The rule needs to be that if fscache is not enabled, then it
should have no side effects at all.

To ensure this is the case, we disable fscache completely on all superblocks
for which the 'fsc' mount option was not set. In order to avoid issues
with '-oremount', we also disable the ability to turn fscache on via
remount.

Fixes: f1fe29b4a02d ("NFS: Use i_writecount to control whether...")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=200145
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Steve Dickson <steved@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/nfs/fscache.c
fs/nfs/fscache.h
fs/nfs/super.c