dick.streefland@xxxxxxxxx (Dick Streefland) wrote: | Could this chunk cause a deadlock? | | @@ -1001,10 +1004,25 @@ void xprt_reserve(struct rpc_task *task) | { | struct rpc_xprt *xprt = task->tk_xprt; | | + task->tk_status = 0; | + if (task->tk_rqstp != NULL) | + return; | + | + /* Note: grabbing the xprt_lock_write() here is not strictly needed, | + * but ensures that we throttle new slot allocation if the transport | + * is congested (e.g. if reconnecting or if we're out of socket | + * write buffer space). | + */ | + task->tk_timeout = 0; | + task->tk_status = -EAGAIN; | + if (!xprt_lock_write(xprt, task)) | + return; | + | task->tk_status = -EIO; | spin_lock(&xprt->reserve_lock); | xprt_alloc_slot(task); | spin_unlock(&xprt->reserve_lock); | + xprt_release_write(xprt, task); | } I doublechecked, and this chunk does indeed cause the hang. According to the comment, the lock is not strictly needed. So how about simply reverting this? -- Dick -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html