aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/delegation.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:39 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:39 -0500
commit15c831bf1a3f8cab9812a96228145200726fea33 (patch)
tree6133811e099f223d17aaa46c9672bfb367435b26 /fs/nfs/delegation.c
parent86e894899820f2b3094d5557124fc22743ae0fc7 (diff)
NFS: Use atomic bitops when changing struct nfs_delegation->flags
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r--fs/nfs/delegation.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 13f2044a30b..646ba3e75a1 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -119,7 +119,7 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, st
119 delegation->maxsize = res->maxsize; 119 delegation->maxsize = res->maxsize;
120 oldcred = delegation->cred; 120 oldcred = delegation->cred;
121 delegation->cred = get_rpccred(cred); 121 delegation->cred = get_rpccred(cred);
122 delegation->flags &= ~NFS_DELEGATION_NEED_RECLAIM; 122 clear_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags);
123 NFS_I(inode)->delegation_state = delegation->type; 123 NFS_I(inode)->delegation_state = delegation->type;
124 smp_wmb(); 124 smp_wmb();
125 put_rpccred(oldcred); 125 put_rpccred(oldcred);
@@ -499,7 +499,7 @@ void nfs_delegation_mark_reclaim(struct nfs_client *clp)
499 struct nfs_delegation *delegation; 499 struct nfs_delegation *delegation;
500 rcu_read_lock(); 500 rcu_read_lock();
501 list_for_each_entry_rcu(delegation, &clp->cl_delegations, super_list) 501 list_for_each_entry_rcu(delegation, &clp->cl_delegations, super_list)
502 delegation->flags |= NFS_DELEGATION_NEED_RECLAIM; 502 set_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags);
503 rcu_read_unlock(); 503 rcu_read_unlock();
504} 504}
505 505
@@ -513,7 +513,7 @@ void nfs_delegation_reap_unclaimed(struct nfs_client *clp)
513restart: 513restart:
514 rcu_read_lock(); 514 rcu_read_lock();
515 list_for_each_entry_rcu(delegation, &clp->cl_delegations, super_list) { 515 list_for_each_entry_rcu(delegation, &clp->cl_delegations, super_list) {
516 if ((delegation->flags & NFS_DELEGATION_NEED_RECLAIM) == 0) 516 if (test_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags) == 0)
517 continue; 517 continue;
518 inode = nfs_delegation_grab_inode(delegation); 518 inode = nfs_delegation_grab_inode(delegation);
519 if (inode == NULL) 519 if (inode == NULL)