@@ -997,6 +997,9 @@ static void nfsd4_do_callback_rpc(struct work_struct *w)
struct nfsd4_callback *cb = container_of(w, struct nfsd4_callback, cb_work);
struct nfs4_client *clp = cb->cb_clp;
struct rpc_clnt *clnt;
+ unsigned int pflags;
+
+ current_set_flags_nested(&pflags, PF_FSTRANS);
if (clp->cl_flags & NFSD4_CLIENT_CB_FLAG_MASK)
nfsd4_process_cb_update(cb);
@@ -1005,11 +1008,13 @@ static void nfsd4_do_callback_rpc(struct work_struct *w)
if (!clnt) {
/* Callback channel broken, or client killed; give up: */
nfsd4_release_cb(cb);
+ current_restore_flags_nested(&pflags, PF_FSTRANS);
return;
}
cb->cb_msg.rpc_cred = clp->cl_cb_cred;
rpc_call_async(clnt, &cb->cb_msg, RPC_TASK_SOFT | RPC_TASK_SOFTCONN,
cb->cb_ops, cb);
+ current_restore_flags_nested(&pflags, PF_FSTRANS);
}
void nfsd4_init_callback(struct nfsd4_callback *cb)
nfsd will sometimes call flush_workqueue on the workqueue running nfsd4_do_callback_rpc, so we must ensure that it doesn't block in filesystem reclaim. So set PF_FSTRANS. Signed-off-by: NeilBrown <neilb@suse.de> --- fs/nfsd/nfs4callback.c | 5 +++++ 1 file changed, 5 insertions(+) -- 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