Skip to content

Commit

Permalink
[NET] Cleanup: Use sock_owned_by_user() macro
Browse files Browse the repository at this point in the history
Changes asserts in sunrpc to use sock_owned_by_user() macro instead of
referencing sock_lock.owner directly.

Signed-off-by: John Heffner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
John Heffner authored and David S. Miller committed Oct 10, 2007
1 parent ab0049b commit 02b3d34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/sunrpc/svcsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 02b3d34

Please sign in to comment.