aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/rpc_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/rpc_pipe.c')
-rw-r--r--net/sunrpc/rpc_pipe.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 04040476082e..21fde99e5c56 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -71,7 +71,9 @@ static void rpc_purge_list(wait_queue_head_t *waitq, struct list_head *head,
71 msg->errno = err; 71 msg->errno = err;
72 destroy_msg(msg); 72 destroy_msg(msg);
73 } while (!list_empty(head)); 73 } while (!list_empty(head));
74 wake_up(waitq); 74
75 if (waitq)
76 wake_up(waitq);
75} 77}
76 78
77static void 79static void
@@ -91,11 +93,9 @@ rpc_timeout_upcall_queue(struct work_struct *work)
91 } 93 }
92 dentry = dget(pipe->dentry); 94 dentry = dget(pipe->dentry);
93 spin_unlock(&pipe->lock); 95 spin_unlock(&pipe->lock);
94 if (dentry) { 96 rpc_purge_list(dentry ? &RPC_I(dentry->d_inode)->waitq : NULL,
95 rpc_purge_list(&RPC_I(dentry->d_inode)->waitq, 97 &free_list, destroy_msg, -ETIMEDOUT);
96 &free_list, destroy_msg, -ETIMEDOUT); 98 dput(dentry);
97 dput(dentry);
98 }
99} 99}
100 100
101ssize_t rpc_pipe_generic_upcall(struct file *filp, struct rpc_pipe_msg *msg, 101ssize_t rpc_pipe_generic_upcall(struct file *filp, struct rpc_pipe_msg *msg,