Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210664
b: refs/heads/master
c: 5a67657
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Sep 12, 2010
1 parent a88ae5e commit 41a2044
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 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: f2d47d02fd84343a3c5452daca6ed12c75618aff
refs/heads/master: 5a67657a2e90c9e4a48518f95d4ba7777aa20fbb
9 changes: 5 additions & 4 deletions trunk/net/sunrpc/auth_gss/auth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,17 +745,18 @@ gss_pipe_release(struct inode *inode)
struct rpc_inode *rpci = RPC_I(inode);
struct gss_upcall_msg *gss_msg;

restart:
spin_lock(&inode->i_lock);
while (!list_empty(&rpci->in_downcall)) {
list_for_each_entry(gss_msg, &rpci->in_downcall, list) {

gss_msg = list_entry(rpci->in_downcall.next,
struct gss_upcall_msg, list);
if (!list_empty(&gss_msg->msg.list))
continue;
gss_msg->msg.errno = -EPIPE;
atomic_inc(&gss_msg->count);
__gss_unhash_msg(gss_msg);
spin_unlock(&inode->i_lock);
gss_release_msg(gss_msg);
spin_lock(&inode->i_lock);
goto restart;
}
spin_unlock(&inode->i_lock);

Expand Down
6 changes: 3 additions & 3 deletions trunk/net/sunrpc/rpc_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static void rpc_purge_list(struct rpc_inode *rpci, struct list_head *head,
return;
do {
msg = list_entry(head->next, struct rpc_pipe_msg, list);
list_del(&msg->list);
list_del_init(&msg->list);
msg->errno = err;
destroy_msg(msg);
} while (!list_empty(head));
Expand Down Expand Up @@ -208,7 +208,7 @@ rpc_pipe_release(struct inode *inode, struct file *filp)
if (msg != NULL) {
spin_lock(&inode->i_lock);
msg->errno = -EAGAIN;
list_del(&msg->list);
list_del_init(&msg->list);
spin_unlock(&inode->i_lock);
rpci->ops->destroy_msg(msg);
}
Expand Down Expand Up @@ -268,7 +268,7 @@ rpc_pipe_read(struct file *filp, char __user *buf, size_t len, loff_t *offset)
if (res < 0 || msg->len == msg->copied) {
filp->private_data = NULL;
spin_lock(&inode->i_lock);
list_del(&msg->list);
list_del_init(&msg->list);
spin_unlock(&inode->i_lock);
rpci->ops->destroy_msg(msg);
}
Expand Down

0 comments on commit 41a2044

Please sign in to comment.