[PATCH] NFS: Fix Oops in rpc_call_sync()
Fix the Oops in http://bugzilla.linux-nfs.org/show_bug.cgi?id=138 We shouldn't be calling rpc_release_task() for tasks that are not active. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
5394cd2187
commit
bde8f00ce6
@@ -490,16 +490,14 @@ int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
|
||||
|
||||
/* Set up the call info struct and execute the task */
|
||||
status = task->tk_status;
|
||||
if (status != 0) {
|
||||
rpc_release_task(task);
|
||||
if (status != 0)
|
||||
goto out;
|
||||
}
|
||||
atomic_inc(&task->tk_count);
|
||||
status = rpc_execute(task);
|
||||
if (status == 0)
|
||||
status = task->tk_status;
|
||||
rpc_put_task(task);
|
||||
out:
|
||||
rpc_put_task(task);
|
||||
rpc_restore_sigmask(&oldset);
|
||||
return status;
|
||||
}
|
||||
@@ -537,7 +535,7 @@ rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, int flags,
|
||||
if (status == 0)
|
||||
rpc_execute(task);
|
||||
else
|
||||
rpc_release_task(task);
|
||||
rpc_put_task(task);
|
||||
|
||||
rpc_restore_sigmask(&oldset);
|
||||
return status;
|
||||
|
Reference in New Issue
Block a user