From: John Heffner <jheffner@psc.edu>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, John Heffner <jheffner@psc.edu>
Subject: [PATCH 1/2] [NET] Cleanup: Use sock_owned_by_user() macro
Date: Tue, 11 Sep 2007 14:01:32 -0400 [thread overview]
Message-ID: <11895336943821-git-send-email-jheffner@psc.edu> (raw)
In-Reply-To: <11895336933187-git-send-email-jheffner@psc.edu>
Changes asserts in sunrpc to use sock_owned_by_user() macro instead of
referencing sock_lock.owner directly.
Signed-off-by: John Heffner <jheffner@psc.edu>
---
net/sunrpc/svcsock.c | 2 +-
net/sunrpc/xprtsock.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index ed17a50..3a95612 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -104,7 +104,7 @@ static struct lock_class_key svc_slock_key[2];
static inline void svc_reclassify_socket(struct socket *sock)
{
struct sock *sk = sock->sk;
- BUG_ON(sk->sk_lock.owner != NULL);
+ BUG_ON(sock_owned_by_user(sk));
switch (sk->sk_family) {
case AF_INET:
sock_lock_init_class_and_name(sk, "slock-AF_INET-NFSD",
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 4ae7eed..282efd4 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1186,7 +1186,7 @@ static struct lock_class_key xs_slock_key[2];
static inline void xs_reclassify_socket(struct socket *sock)
{
struct sock *sk = sock->sk;
- BUG_ON(sk->sk_lock.owner != NULL);
+ BUG_ON(sock_owned_by_user(sk));
switch (sk->sk_family) {
case AF_INET:
sock_lock_init_class_and_name(sk, "slock-AF_INET-NFS",
--
1.5.3.rc7.30.g947ad2
next prev parent reply other threads:[~2007-09-11 18:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 18:01 [PATCH 0/2] Clean up owner field in sock_lock_t John Heffner
2007-09-11 18:01 ` John Heffner [this message]
2007-09-11 18:01 ` [PATCH 2/2] [NET] Change type of owner in sock_lock_t to int, rename John Heffner
2007-09-12 8:45 ` [PATCH 0/2] Clean up owner field in sock_lock_t David Miller
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=11895336943821-git-send-email-jheffner@psc.edu \
--to=jheffner@psc.edu \
--cc=davem@davemloft.net \
--cc=netdev@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).