diff options
author | J. Bruce Fields <bfields@redhat.com> | 2018-02-16 17:49:11 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2018-03-20 22:51:12 +0100 |
commit | 0c911f5408e49a313dd17f2f331c62c3db515f34 (patch) | |
tree | b314432f88eb9d5ba49ab599bfb9f03dbe43a9e8 /fs/nfsd/nfs4state.c | |
parent | nfsd4: set fl_owner to delegation, not file pointer (diff) | |
download | linux-0c911f5408e49a313dd17f2f331c62c3db515f34.tar.xz linux-0c911f5408e49a313dd17f2f331c62c3db515f34.zip |
nfsd4: dp->dl_stid.sc_file doesn't need locking
The delegation isn't visible to anyone yet.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 33538b98720a..9e9f32f03bf4 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4411,9 +4411,10 @@ nfs4_set_delegation(struct nfs4_client *clp, struct svc_fh *fh, return ERR_PTR(-ENOMEM); get_nfs4_file(fp); + dp->dl_stid.sc_file = fp; + spin_lock(&state_lock); spin_lock(&fp->fi_lock); - dp->dl_stid.sc_file = fp; if (!fp->fi_deleg_file) { spin_unlock(&fp->fi_lock); spin_unlock(&state_lock); |