summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2014-01-04 16:18:05 +0400
committerJ. Bruce Fields <bfields@redhat.com>2014-01-07 00:14:18 +0400
commit0fdc26785d0a5bb33d9adb572307fd2d7a406734 (patch)
tree85474a5723bbf22117c654f357aaa26e9999fdce /fs/nfsd/nfs4state.c
parenta92e5eb1103341e985a575e48e26f87fbb9b1679 (diff)
downloadlinux-0fdc26785d0a5bb33d9adb572307fd2d7a406734.tar.xz
sunrpc: get rid of use_gssp_lock
We can achieve the same result with a cmpxchg(). This also fixes a potential race in use_gss_proxy(). The value of sn->use_gss_proxy could go from -1 to 1 just after we check it in use_gss_proxy() but before we acquire the spinlock. The procfile write would end up returning success but the value would flip to 0 soon afterward. With this method we not only avoid locking but the first "setter" always wins. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
0 files changed, 0 insertions, 0 deletions