diff options
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index ae906eb4b269..71dd6b910f7c 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -3929,12 +3929,9 @@ packet_setsockopt(struct socket *sock, int level, int optname, sockptr_t optval, return -EFAULT; lock_sock(sk); - if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { - ret = -EBUSY; - } else { + if (!po->rx_ring.pg_vec && !po->tx_ring.pg_vec) po->tp_tx_has_off = !!val; - ret = 0; - } + release_sock(sk); return 0; } |