aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Heffner <jheffner@psc.edu>2007-09-12 04:42:12 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:00 -0400
commit02b3d34631831a19ee691516e233756b270eac6d (patch)
tree28ddf5beadfd1f1954ca5ada9ac9d337fa7ce9e2
parentab0049b4a2f66074dff6af851b35bba888f53972 (diff)
[NET] Cleanup: Use sock_owned_by_user() macro
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sunrpc/svcsock.c2
-rw-r--r--net/sunrpc/xprtsock.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 406b3e687952..c75bffeb89eb 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -104,7 +104,7 @@ static struct lock_class_key svc_slock_key[2];
104static inline void svc_reclassify_socket(struct socket *sock) 104static inline void svc_reclassify_socket(struct socket *sock)
105{ 105{
106 struct sock *sk = sock->sk; 106 struct sock *sk = sock->sk;
107 BUG_ON(sk->sk_lock.owner != NULL); 107 BUG_ON(sock_owned_by_user(sk));
108 switch (sk->sk_family) { 108 switch (sk->sk_family) {
109 case AF_INET: 109 case AF_INET:
110 sock_lock_init_class_and_name(sk, "slock-AF_INET-NFSD", 110 sock_lock_init_class_and_name(sk, "slock-AF_INET-NFSD",
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 4ae7eed7f617..282efd447a61 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1186,7 +1186,7 @@ static struct lock_class_key xs_slock_key[2];
1186static inline void xs_reclassify_socket(struct socket *sock) 1186static inline void xs_reclassify_socket(struct socket *sock)
1187{ 1187{
1188 struct sock *sk = sock->sk; 1188 struct sock *sk = sock->sk;
1189 BUG_ON(sk->sk_lock.owner != NULL); 1189 BUG_ON(sock_owned_by_user(sk));
1190 switch (sk->sk_family) { 1190 switch (sk->sk_family) {
1191 case AF_INET: 1191 case AF_INET:
1192 sock_lock_init_class_and_name(sk, "slock-AF_INET-NFS", 1192 sock_lock_init_class_and_name(sk, "slock-AF_INET-NFS",