From: Jeff Layton <jlayton@redhat.com>
To: bfields@fieldses.org, Trond.Myklebust@netapp.com
Cc: jplatte@naasa.net, linux-kernel@vger.kernel.org,
linux-nfs@vger.kernel.org, jmdebruin@xmsnet.nl
Subject: [PATCH] rpc_pipefs: allow rpc_purge_list to take a NULL waitq pointer
Date: Mon, 11 Jun 2012 10:03:42 -0400 [thread overview]
Message-ID: <1339423422-22474-1-git-send-email-jlayton@redhat.com> (raw)
In-Reply-To: <1339340441.4751.1.camel@lade.trondhjem.org>
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: stable@kernel.org
Reported-by: Hans de Bruin <jmdebruin@xmsnet.nl>
Reported-by: Joerg Platte <jplatte@naasa.net>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
net/sunrpc/rpc_pipe.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 0404047..21fde99 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,
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,
--
1.7.7.6
next prev parent reply other threads:[~2012-06-11 14:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4FD47D4E.9070307@naasa.net>
2012-06-10 11:43 ` Kernel 3.4.X NFS regression Boaz Harrosh
2012-06-10 15:00 ` Kernel 3.4.X NFS server regression Myklebust, Trond
2012-06-11 12:16 ` bfields
2012-06-11 12:39 ` Jeff Layton
2012-06-11 13:13 ` Jeff Layton
2012-06-11 13:25 ` Jörg Platte
2012-06-11 14:20 ` Jeff Layton
2012-06-11 15:55 ` Joerg Platte
2012-06-11 13:32 ` Boaz Harrosh
2012-06-11 13:44 ` Boaz Harrosh
2012-06-11 14:29 ` Jeff Layton
2012-06-11 15:01 ` Boaz Harrosh
2012-06-11 15:15 ` bfields
2012-06-11 16:25 ` Boaz Harrosh
2012-06-11 13:51 ` Jeff Layton
2012-06-11 14:05 ` Boaz Harrosh
2012-06-11 14:11 ` Jeff Layton
2012-06-11 14:45 ` Boaz Harrosh
2012-06-11 14:55 ` Jeff Layton
2012-06-11 15:04 ` Boaz Harrosh
2012-06-11 14:03 ` Jeff Layton [this message]
2012-06-15 15:24 ` Joerg Platte
2012-06-15 16:28 ` bfields
2012-06-15 17:19 ` Joerg Platte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339423422-22474-1-git-send-email-jlayton@redhat.com \
--to=jlayton@redhat.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=jmdebruin@xmsnet.nl \
--cc=jplatte@naasa.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).