nfs: don't queue synchronous NFSv4 close rpc_release to nfsiod
diff mbox

Message ID 1297781939-1400-1-git-send-email-jlayton@redhat.com
State Superseded, archived
Headers show

Commit Message

Jeff Layton Feb. 15, 2011, 2:58 p.m. UTC
None

Patch
diff mbox

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 78936a8..4cabfea 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1988,11 +1988,14 @@  int nfs4_do_close(struct path *path, struct nfs4_state *state, gfp_t gfp_mask, i
 		.rpc_client = server->client,
 		.rpc_message = &msg,
 		.callback_ops = &nfs4_close_ops,
-		.workqueue = nfsiod_workqueue,
 		.flags = RPC_TASK_ASYNC,
 	};
 	int status = -ENOMEM;
 
+	/* rpc_release must be synchronous too if "wait" is set */
+	if (!wait)
+		task_setup_data.workqueue = nfsiod_workqueue;
+
 	calldata = kzalloc(sizeof(*calldata), gfp_mask);
 	if (calldata == NULL)
 		goto out;