提交 02b3d346 编写于 作者: J John Heffner 提交者: David S. Miller

[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: NJohn Heffner <jheffner@psc.edu>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ab0049b4
...@@ -104,7 +104,7 @@ static struct lock_class_key svc_slock_key[2]; ...@@ -104,7 +104,7 @@ static struct lock_class_key svc_slock_key[2];
static inline void svc_reclassify_socket(struct socket *sock) static inline void svc_reclassify_socket(struct socket *sock)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
BUG_ON(sk->sk_lock.owner != NULL); BUG_ON(sock_owned_by_user(sk));
switch (sk->sk_family) { switch (sk->sk_family) {
case AF_INET: case AF_INET:
sock_lock_init_class_and_name(sk, "slock-AF_INET-NFSD", sock_lock_init_class_and_name(sk, "slock-AF_INET-NFSD",
......
...@@ -1186,7 +1186,7 @@ static struct lock_class_key xs_slock_key[2]; ...@@ -1186,7 +1186,7 @@ static struct lock_class_key xs_slock_key[2];
static inline void xs_reclassify_socket(struct socket *sock) static inline void xs_reclassify_socket(struct socket *sock)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
BUG_ON(sk->sk_lock.owner != NULL); BUG_ON(sock_owned_by_user(sk));
switch (sk->sk_family) { switch (sk->sk_family) {
case AF_INET: case AF_INET:
sock_lock_init_class_and_name(sk, "slock-AF_INET-NFS", sock_lock_init_class_and_name(sk, "slock-AF_INET-NFS",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册