Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308657
b: refs/heads/master
c: 54ac471
h: refs/heads/master
i:
  308655: bb893ac
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 23, 2012
1 parent 4117395 commit 1336e13
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4697bd5e9419348ef9fa9b55cefe4355ad9d3d01
refs/heads/master: 54ac471c83aff6b1e068eb8029c797dc68a76e89
5 changes: 5 additions & 0 deletions trunk/fs/nfs/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ static bool nfs4_cb_match_client(const struct sockaddr *addr,
clp->cl_cons_state == NFS_CS_SESSION_INITING))
return false;

smp_rmb();

/* Match the version and minorversion */
if (clp->rpc_ops->version != 4 ||
clp->cl_minorversion != minorversion)
Expand Down Expand Up @@ -539,6 +541,8 @@ nfs_found_client(const struct nfs_client_initdata *cl_init,
return ERR_PTR(error);
}

smp_rmb();

BUG_ON(clp->cl_cons_state != NFS_CS_READY);

dprintk("<-- %s found nfs_client %p for %s\n",
Expand Down Expand Up @@ -597,6 +601,7 @@ nfs_get_client(const struct nfs_client_initdata *cl_init,
*/
void nfs_mark_client_ready(struct nfs_client *clp, int state)
{
smp_wmb();
clp->cl_cons_state = state;
wake_up_all(&nfs_client_active_wq);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/nfs/idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ static struct nfs_client *nfs_get_client_for_event(struct net *net, int event)
/* 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;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1336e13

Please sign in to comment.