Add helper for nfs4state functions to set NFSD4_CLIENT_CB_KILL to stop the callback. Signed-off-by: Dai Ngo <dai.ngo@xxxxxxxxxx> --- fs/nfsd/nfs4callback.c | 5 +++++ fs/nfsd/state.h | 1 + 2 files changed, 6 insertions(+) diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index f8bb5ff2e9ac..4c3a4d5df626 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -1562,3 +1562,8 @@ bool nfsd4_run_cb(struct nfsd4_callback *cb) nfsd41_cb_inflight_end(clp); return queued; } + +void nfsd4_kill_callback(struct nfs4_client *clp) +{ + set_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags); +} diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index f42d8d782c84..cde05c26afd8 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h @@ -757,6 +757,7 @@ struct nfsd_file *find_any_file(struct nfs4_file *f); #ifdef CONFIG_NFSD_V4 void nfsd4_revoke_states(struct net *net, struct super_block *sb); +void nfsd4_kill_callback(struct nfs4_client *clp); #else static inline void nfsd4_revoke_states(struct net *net, struct super_block *sb) { -- 2.39.3