Skip to content

Commit

Permalink
X25: Remove bkl in sockopts
Browse files Browse the repository at this point in the history
Removes the BKL in x25 setsock and getsockopts.

Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
andrew hendry authored and David S. Miller committed May 18, 2010
1 parent 37cda78 commit 935e2a2
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/x25/af_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ static int x25_setsockopt(struct socket *sock, int level, int optname,
struct sock *sk = sock->sk;
int rc = -ENOPROTOOPT;

lock_kernel();
if (level != SOL_X25 || optname != X25_QBITINCL)
goto out;

Expand All @@ -471,7 +470,6 @@ static int x25_setsockopt(struct socket *sock, int level, int optname,
clear_bit(X25_Q_BIT_FLAG, &x25_sk(sk)->flags);
rc = 0;
out:
unlock_kernel();
return rc;
}

Expand All @@ -481,7 +479,6 @@ static int x25_getsockopt(struct socket *sock, int level, int optname,
struct sock *sk = sock->sk;
int val, len, rc = -ENOPROTOOPT;

lock_kernel();
if (level != SOL_X25 || optname != X25_QBITINCL)
goto out;

Expand All @@ -502,7 +499,6 @@ static int x25_getsockopt(struct socket *sock, int level, int optname,
val = test_bit(X25_Q_BIT_FLAG, &x25_sk(sk)->flags);
rc = copy_to_user(optval, &val, len) ? -EFAULT : 0;
out:
unlock_kernel();
return rc;
}

Expand Down

0 comments on commit 935e2a2

Please sign in to comment.