diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-23 21:26:10 +0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-23 23:24:59 +0400 |
commit | 54ac471c83aff6b1e068eb8029c797dc68a76e89 (patch) | |
tree | 3311a74fc6f5cdbedbe4e1da9bbbbaf6671050a2 /fs/nfs/nfs4proc.c | |
parent | 4697bd5e9419348ef9fa9b55cefe4355ad9d3d01 (diff) | |
download | linux-54ac471c83aff6b1e068eb8029c797dc68a76e89.tar.xz |
NFS: Add memory barriers to the nfs_client->cl_cons_state initialisation
Ensure that a process that uses the nfs_client->cl_cons_state test
for whether the initialisation process is finished does not read
stale data.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index c856298def7d..8f39bb3ca1b3 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5621,6 +5621,7 @@ static int nfs41_check_session_ready(struct nfs_client *clp) } if (clp->cl_cons_state < NFS_CS_READY) return -EPROTONOSUPPORT; + smp_rmb(); return 0; } |