mirror of https://gitee.com/openkylin/linux.git
packet: Use PAGE_ALIGNED macro
Use PAGE_ALIGNED(...) instead of open-coding it. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4194b4914a
commit
90836b67e2
|
@ -4109,7 +4109,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
|
|||
err = -EINVAL;
|
||||
if (unlikely((int)req->tp_block_size <= 0))
|
||||
goto out;
|
||||
if (unlikely(req->tp_block_size & (PAGE_SIZE - 1)))
|
||||
if (unlikely(!PAGE_ALIGNED(req->tp_block_size)))
|
||||
goto out;
|
||||
if (po->tp_version >= TPACKET_V3 &&
|
||||
(int)(req->tp_block_size -
|
||||
|
|
Loading…
Reference in New Issue