Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14700
b: refs/heads/master
c: b3eb67a
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Nov 25, 2005
1 parent a7bfab9 commit 2c43fb9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b37b03b7051493c9f9a6b336c9c0f81334885b7d
refs/heads/master: b3eb67a2ab4e14fc6cc035907400b86462d174db
26 changes: 15 additions & 11 deletions trunk/net/sunrpc/rpc_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,27 @@ static kmem_cache_t *rpc_inode_cachep __read_mostly;
#define RPC_UPCALL_TIMEOUT (30*HZ)

static void
__rpc_purge_upcall(struct inode *inode, int err)
__rpc_purge_list(struct rpc_inode *rpci, struct list_head *head, int err)
{
struct rpc_inode *rpci = RPC_I(inode);
struct rpc_pipe_msg *msg;
void (*destroy_msg)(struct rpc_pipe_msg *);

while (!list_empty(&rpci->pipe)) {
msg = list_entry(rpci->pipe.next, struct rpc_pipe_msg, list);
destroy_msg = rpci->ops->destroy_msg;
while (!list_empty(head)) {
msg = list_entry(head->next, struct rpc_pipe_msg, list);
list_del_init(&msg->list);
msg->errno = err;
rpci->ops->destroy_msg(msg);
}
while (!list_empty(&rpci->in_upcall)) {
msg = list_entry(rpci->pipe.next, struct rpc_pipe_msg, list);
list_del_init(&msg->list);
msg->errno = err;
rpci->ops->destroy_msg(msg);
destroy_msg(msg);
}
}

static void
__rpc_purge_upcall(struct inode *inode, int err)
{
struct rpc_inode *rpci = RPC_I(inode);

__rpc_purge_list(rpci, &rpci->pipe, err);
__rpc_purge_list(rpci, &rpci->in_upcall, err);
rpci->pipelen = 0;
wake_up(&rpci->waitq);
}
Expand Down

0 comments on commit 2c43fb9

Please sign in to comment.