NFS/localio: Fix a race in nfs_local_open_fh()
Once the clp->cl_uuid.lock has been dropped, another CPU could come in and free the struct nfsd_file that was just added. To prevent that from happening, take the RCU read lock before dropping the spin lock. Fixes: 86e00412 ("nfs: cache all open LOCALIO nfsd_file(s) in client") Signed-off-by:Trond Myklebust <trond.myklebust@hammerspace.com> Reviewed-by:
Mike Snitzer <snitzer@kernel.org>
Loading
Please register or sign in to comment