nfsd: introduce a generic nfsd4_cb

Add a helper to queue up a callback.  CB_NULL has a bit of special casing
because it is special in the specification, but all other new callback
operations will be able to share code with this and a few more changes
to refactor the callback code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
Christoph Hellwig
2014-09-24 12:19:17 +02:00
committed by J. Bruce Fields
parent 2faf3b4350
commit 326129d02a
3 changed files with 22 additions and 35 deletions

View File

@@ -3388,7 +3388,9 @@ static void nfsd_break_one_deleg(struct nfs4_delegation *dp)
* it's safe to take a reference.
*/
atomic_inc(&dp->dl_stid.sc_count);
nfsd4_cb_recall(dp);
dp->dl_retries = 1;
nfsd4_cb(&dp->dl_recall, dp->dl_stid.sc_client,
NFSPROC4_CLNT_CB_RECALL);
}
/* Called from break_lease() with i_lock held. */