SUNRPC: Funny looking code in __rpc_purge_upcall

In __rpc_purge_upcall (net/sunrpc/rpc_pipe.c), the newer code to clean up
the in_upcall list has a typo.
Thanks to Vince Busam <vbusam@google.com> for spotting this!

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

+17 -13
+17 -13
net/sunrpc/rpc_pipe.c
··· 39 39 #define RPC_UPCALL_TIMEOUT (30*HZ) 40 40 41 41 static void 42 + __rpc_purge_list(struct rpc_inode *rpci, struct list_head *head, int err) 43 + { 44 + struct rpc_pipe_msg *msg; 45 + void (*destroy_msg)(struct rpc_pipe_msg *); 46 + 47 + destroy_msg = rpci->ops->destroy_msg; 48 + while (!list_empty(head)) { 49 + msg = list_entry(head->next, struct rpc_pipe_msg, list); 50 + list_del_init(&msg->list); 51 + msg->errno = err; 52 + destroy_msg(msg); 53 + } 54 + } 55 + 56 + static void 42 57 __rpc_purge_upcall(struct inode *inode, int err) 43 58 { 44 59 struct rpc_inode *rpci = RPC_I(inode); 45 - struct rpc_pipe_msg *msg; 46 60 47 - while (!list_empty(&rpci->pipe)) { 48 - msg = list_entry(rpci->pipe.next, struct rpc_pipe_msg, list); 49 - list_del_init(&msg->list); 50 - msg->errno = err; 51 - rpci->ops->destroy_msg(msg); 52 - } 53 - while (!list_empty(&rpci->in_upcall)) { 54 - msg = list_entry(rpci->pipe.next, struct rpc_pipe_msg, list); 55 - list_del_init(&msg->list); 56 - msg->errno = err; 57 - rpci->ops->destroy_msg(msg); 58 - } 61 + __rpc_purge_list(rpci, &rpci->pipe, err); 62 + __rpc_purge_list(rpci, &rpci->in_upcall, err); 59 63 rpci->pipelen = 0; 60 64 wake_up(&rpci->waitq); 61 65 }