mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
rpc_pipefs: allow rpc_purge_list to take a NULL waitq pointer
In the event that we don't have a dentry for a rpc_pipefs pipe, we still need to allow the queue_timeout job to clean out the queue. There's just no waitq to wake up in that event. Cc: [email protected] Reported-by: Hans de Bruin <[email protected]> Reported-by: Joerg Platte <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
This commit is contained in:
parent
2669940db8
commit
92123e068e
1 changed files with 6 additions and 6 deletions
|
|
@ -71,7 +71,9 @@ static void rpc_purge_list(wait_queue_head_t *waitq, struct list_head *head,
|
|||
msg->errno = err;
|
||||
destroy_msg(msg);
|
||||
} while (!list_empty(head));
|
||||
wake_up(waitq);
|
||||
|
||||
if (waitq)
|
||||
wake_up(waitq);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -91,11 +93,9 @@ rpc_timeout_upcall_queue(struct work_struct *work)
|
|||
}
|
||||
dentry = dget(pipe->dentry);
|
||||
spin_unlock(&pipe->lock);
|
||||
if (dentry) {
|
||||
rpc_purge_list(&RPC_I(dentry->d_inode)->waitq,
|
||||
&free_list, destroy_msg, -ETIMEDOUT);
|
||||
dput(dentry);
|
||||
}
|
||||
rpc_purge_list(dentry ? &RPC_I(dentry->d_inode)->waitq : NULL,
|
||||
&free_list, destroy_msg, -ETIMEDOUT);
|
||||
dput(dentry);
|
||||
}
|
||||
|
||||
ssize_t rpc_pipe_generic_upcall(struct file *filp, struct rpc_pipe_msg *msg,
|
||||
|
|
|
|||
Loading…
Reference in a new issue