]> www.infradead.org Git - users/hch/xfs.git/commit
nfsd: hold reference to delegation when updating it for cb_getattr
authorJeff Layton <jlayton@kernel.org>
Fri, 23 Aug 2024 22:27:38 +0000 (18:27 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 26 Aug 2024 15:52:40 +0000 (11:52 -0400)
commitda05ba23d4c8d3e8a45846b952e53dd76c4b5e36
treed48db0f75fba72c5a21a78e0250048a3e8d744cc
parentf25d1b5f1be13a6de341b1d26e0cf4275e5908d2
nfsd: hold reference to delegation when updating it for cb_getattr

Once we've dropped the flc_lock, there is nothing that ensures that the
delegation that was found will still be around later. Take a reference
to it while holding the lock and then drop it when we've finished with
the delegation.

Fixes: c5967721e106 ("NFSD: handle GETATTR conflict with write delegation")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4state.c