Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cfdcad4da1903720b9b8c1f176e46a0ebf546be3 Commit: cfdcad4da1903720b9b8c1f176e46a0ebf546be3 Parent: 1b1a9b3163a83f52ea2ac333846d4dfd2c4edd90 Author: J. Bruce Fields <[EMAIL PROTECTED]> AuthorDate: Wed Sep 12 20:35:15 2007 -0400 Committer: J. Bruce Fields <[EMAIL PROTECTED]> CommitDate: Tue Oct 9 18:31:57 2007 -0400
knfsd: nfsv4 delegation recall should take reference on client It's not enough to take a reference on the delegation object itself; we need to ensure that the rpc_client won't go away just as we're about to make an rpc call. Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]> --- fs/nfsd/nfs4callback.c | 1 + fs/nfsd/nfs4state.c | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index c1cb7e0..9d536a8 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -486,6 +486,7 @@ out_put_cred: /* Success or failure, now we're either waiting for lease expiration * or deleg_return. */ dprintk("NFSD: nfs4_cb_recall: dp %p dl_flock %p dl_count %d\n",dp, dp->dl_flock, atomic_read(&dp->dl_count)); + put_nfs4_client(clp); nfs4_put_delegation(dp); return; } diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index e706c69..6f182d2 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1345,6 +1345,7 @@ void nfsd_break_deleg_cb(struct file_lock *fl) * lock) we know the server hasn't removed the lease yet, we know * it's safe to take a reference: */ atomic_inc(&dp->dl_count); + atomic_inc(&dp->dl_client->cl_count); spin_lock(&recall_lock); list_add_tail(&dp->dl_recall_lru, &del_recall_lru); @@ -1367,6 +1368,7 @@ void nfsd_break_deleg_cb(struct file_lock *fl) printk(KERN_INFO "NFSD: Callback thread failed for " "for client (clientid %08x/%08x)\n", clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id); + put_nfs4_client(dp->dl_client); nfs4_put_delegation(dp); } } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html