* [PATCH] NFSd: simplify locking in nfsd_recall_delegations()
@ 2012-05-22 10:28 Stanislav Kinsbursky
2012-05-24 12:30 ` Benny Halevy
0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Kinsbursky @ 2012-05-22 10:28 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, linux-kernel, devel
Holding of client_mutex looks redundant here - holding of 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 f004e61..fdef9fc 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4744,11 +4744,9 @@ void nfsd_recall_delegations(u64 num)
{
unsigned int count;
- nfs4_lock_state();
spin_lock(&recall_lock);
count = nfsd_process_n_delegations(num, nfsd_break_one_deleg, NULL);
spin_unlock(&recall_lock);
- nfs4_unlock_state();
printk(KERN_INFO "NFSD: Recalled %d delegations", count);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFSd: simplify locking in nfsd_recall_delegations()
2012-05-22 10:28 [PATCH] NFSd: simplify locking in nfsd_recall_delegations() Stanislav Kinsbursky
@ 2012-05-24 12:30 ` Benny Halevy
0 siblings, 0 replies; 2+ messages in thread
From: Benny Halevy @ 2012-05-24 12:30 UTC (permalink / raw)
To: Stanislav Kinsbursky; +Cc: bfields, linux-nfs, linux-kernel, devel
On 2012-05-22 13:28, Stanislav Kinsbursky wrote:
> Holding of client_mutex looks redundant here - holding of recall_lock looks
> enough.
Looking at the code, agreed.
Benny
>
> 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 f004e61..fdef9fc 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -4744,11 +4744,9 @@ void nfsd_recall_delegations(u64 num)
> {
> unsigned int count;
>
> - nfs4_lock_state();
> spin_lock(&recall_lock);
> count = nfsd_process_n_delegations(num, nfsd_break_one_deleg, NULL);
> spin_unlock(&recall_lock);
> - nfs4_unlock_state();
>
> printk(KERN_INFO "NFSD: Recalled %d delegations", count);
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-24 12:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22 10:28 [PATCH] NFSd: simplify locking in nfsd_recall_delegations() Stanislav Kinsbursky
2012-05-24 12:30 ` Benny Halevy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).