summaryrefslogtreecommitdiffstats
path: root/fs/nfs/idmap.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-23 19:26:10 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-23 21:24:59 +0200
commit54ac471c83aff6b1e068eb8029c797dc68a76e89 (patch)
tree3311a74fc6f5cdbedbe4e1da9bbbbaf6671050a2 /fs/nfs/idmap.c
parentNFSv4: Fix a race in the net namespace mount notification (diff)
downloadlinux-54ac471c83aff6b1e068eb8029c797dc68a76e89.tar.xz
linux-54ac471c83aff6b1e068eb8029c797dc68a76e89.zip
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/idmap.c')
-rw-r--r--fs/nfs/idmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index 861be75eb165..b5b86a05059c 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -548,6 +548,7 @@ restart:
/* Skip nfs_clients that failed to initialise */
if (clp->cl_cons_state < 0)
continue;
+ smp_rmb();
if (clp->rpc_ops != &nfs_v4_clientops)
continue;
cl_dentry = clp->cl_idmap->idmap_pipe->dentry;