aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/delegation.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:45 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:45 -0500
commit95d35cb4c473c754824967c0b069bbeb7efa4847 (patch)
treebd46a5b0e4d35f9256cf44ca2706493fc3dd2819 /fs/nfs/delegation.c
parent19e03c570e6099ffaf24e5628d4fe1a8acbe820d (diff)
NFSv4: Remove nfs_client->cl_sem
Now that we're using the flags to indicate state that needs to be recovered, as well as having implemented proper refcounting and spinlocking on the state and open_owners, we can get rid of nfs_client->cl_sem. The only remaining case that was dubious was the file locking, and that case is now covered by the nfsi->rwsem. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r--fs/nfs/delegation.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 646ba3e75a1e..ebc06f2da31a 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -243,16 +243,13 @@ static void nfs_msync_inode(struct inode *inode)
243 */ 243 */
244static int __nfs_inode_return_delegation(struct inode *inode, struct nfs_delegation *delegation) 244static int __nfs_inode_return_delegation(struct inode *inode, struct nfs_delegation *delegation)
245{ 245{
246 struct nfs_client *clp = NFS_SERVER(inode)->nfs_client;
247 struct nfs_inode *nfsi = NFS_I(inode); 246 struct nfs_inode *nfsi = NFS_I(inode);
248 247
249 nfs_msync_inode(inode); 248 nfs_msync_inode(inode);
250 down_read(&clp->cl_sem);
251 /* Guard against new delegated open calls */ 249 /* Guard against new delegated open calls */
252 down_write(&nfsi->rwsem); 250 down_write(&nfsi->rwsem);
253 nfs_delegation_claim_opens(inode, &delegation->stateid); 251 nfs_delegation_claim_opens(inode, &delegation->stateid);
254 up_write(&nfsi->rwsem); 252 up_write(&nfsi->rwsem);
255 up_read(&clp->cl_sem);
256 nfs_msync_inode(inode); 253 nfs_msync_inode(inode);
257 254
258 return nfs_do_return_delegation(inode, delegation, 1); 255 return nfs_do_return_delegation(inode, delegation, 1);
@@ -425,7 +422,6 @@ static int recall_thread(void *data)
425 daemonize("nfsv4-delegreturn"); 422 daemonize("nfsv4-delegreturn");
426 423
427 nfs_msync_inode(inode); 424 nfs_msync_inode(inode);
428 down_read(&clp->cl_sem);
429 down_write(&nfsi->rwsem); 425 down_write(&nfsi->rwsem);
430 spin_lock(&clp->cl_lock); 426 spin_lock(&clp->cl_lock);
431 delegation = nfs_detach_delegation_locked(nfsi, args->stateid); 427 delegation = nfs_detach_delegation_locked(nfsi, args->stateid);
@@ -437,7 +433,6 @@ static int recall_thread(void *data)
437 complete(&args->started); 433 complete(&args->started);
438 nfs_delegation_claim_opens(inode, args->stateid); 434 nfs_delegation_claim_opens(inode, args->stateid);
439 up_write(&nfsi->rwsem); 435 up_write(&nfsi->rwsem);
440 up_read(&clp->cl_sem);
441 nfs_msync_inode(inode); 436 nfs_msync_inode(inode);
442 437
443 if (delegation != NULL) 438 if (delegation != NULL)