[NET] Cleanup: Use sock_owned_by_user() macro
authorJohn Heffner <jheffner@psc.edu>
Wed, 12 Sep 2007 08:42:12 +0000 (10:42 +0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:49:00 +0000 (16:49 -0700)
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>
net/sunrpc/svcsock.c
net/sunrpc/xprtsock.c

index 406b3e6879525c353223aa41ec9c9cba511853bf..c75bffeb89eb705831585ba1447c0ba77dd06a9c 100644 (file)
@@ -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",
index 4ae7eed7f6170b665845344ab95663975c09a38a..282efd447a61d535b23c6322aecc2bc756a73195 100644 (file)
@@ -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",