| [PATCH v2] NFSd: simplify locking in nfsd_recall_delegations() [message #47063] | 
			Tue, 03 July 2012 13:02   | 
		 
		
			
				
				
				
					
						  
						Stanislav Kinsbursky
						 Messages: 683 Registered: October 2011 
						
					 | 
					Senior Member  | 
					 | 
		 
		 
	 | 
 
	
		v2: rebased on 3.5-rc3 kernel 
 
Holding of client_mutex looks redundant here - recall_lock looks enough. 
 
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> 
--- 
 fs/nfsd/nfs4state.c |    2 -- 
 1 files changed, 0 insertions(+), 2 deletions(-) 
 
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c 
index 33eccee..480ecc9 100644 
--- a/fs/nfsd/nfs4state.c 
+++ b/fs/nfsd/nfs4state.c 
@@ -4622,7 +4622,6 @@ void nfsd_recall_delegations(u64 num) 
 	LIST_HEAD(victims); 
 	struct nfs4_delegation *dp, *dnext; 
  
-	nfs4_lock_state(); 
 	spin_lock(&recall_lock); 
 	count = nfsd_process_n_delegations(num, &victims); 
 	list_for_each_entry_safe(dp, dnext, &victims, dl_recall_lru) { 
@@ -4630,7 +4629,6 @@ void nfsd_recall_delegations(u64 num) 
 		nfsd_break_one_deleg(dp); 
 	} 
 	spin_unlock(&recall_lock); 
-	nfs4_unlock_state(); 
  
 	printk(KERN_INFO "NFSD: Recalled %d delegations", count); 
 }
		
		
		
 |  
	| 
		
	 | 
 
 
 | 
	
		
		
			| Re: [PATCH v2] NFSd: simplify locking in nfsd_recall_delegations() [message #47191 is a reply to message #47063] | 
			Wed, 18 July 2012 23:27   | 
		 
		
			
				
				
				
					
						  
						bfields
						 Messages: 107 Registered: September 2007 
						
					 | 
					Senior Member  | 
					 | 
		 
		 
	 | 
 
	
		On Tue, Jul 03, 2012 at 05:02:24PM +0400, Stanislav Kinsbursky wrote: 
> v2: rebased on 3.5-rc3 kernel 
>  
> Holding of client_mutex looks redundant here - recall_lock looks enough. 
 
Yep, thanks.--b. 
 
>  
> Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> 
> --- 
>  fs/nfsd/nfs4state.c |    2 -- 
>  1 files changed, 0 insertions(+), 2 deletions(-) 
>  
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c 
> index 33eccee..480ecc9 100644 
> --- a/fs/nfsd/nfs4state.c 
> +++ b/fs/nfsd/nfs4state.c 
> @@ -4622,7 +4622,6 @@ void nfsd_recall_delegations(u64 num) 
>  	LIST_HEAD(victims); 
>  	struct nfs4_delegation *dp, *dnext; 
>   
> -	nfs4_lock_state(); 
>  	spin_lock(&recall_lock); 
>  	count = nfsd_process_n_delegations(num, &victims); 
>  	list_for_each_entry_safe(dp, dnext, &victims, dl_recall_lru) { 
> @@ -4630,7 +4629,6 @@ void nfsd_recall_delegations(u64 num) 
>  		nfsd_break_one_deleg(dp); 
>  	} 
>  	spin_unlock(&recall_lock); 
> -	nfs4_unlock_state(); 
>   
>  	printk(KERN_INFO "NFSD: Recalled %d delegations", count); 
>  } 
>
		
		
		
 |  
	| 
		
	 | 
 
 
 |