mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[NETLINK]: Directly return -EINTR from netlink_dump_start()
Now that all users of netlink_dump_start() use netlink_run_queue() to process the receive queue, it is possible to return -EINTR from netlink_dump_start() directly, therefore simplying the callers. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ead592ba24
commit
c702e8047f
6 changed files with 18 additions and 34 deletions
|
|
@ -1426,7 +1426,12 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
|
|||
|
||||
netlink_dump(sk);
|
||||
sock_put(sk);
|
||||
return 0;
|
||||
|
||||
/* We successfully started a dump, by returning -EINTR we
|
||||
* signal the queue mangement to interrupt processing of
|
||||
* any netlink messages so userspace gets a chance to read
|
||||
* the results. */
|
||||
return -EINTR;
|
||||
}
|
||||
|
||||
void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err)
|
||||
|
|
|
|||
|
|
@ -323,11 +323,8 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
|||
if (ops->dumpit == NULL)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
err = netlink_dump_start(genl_sock, skb, nlh,
|
||||
ops->dumpit, ops->done);
|
||||
if (err == 0)
|
||||
err = -EINTR;
|
||||
return err;
|
||||
return netlink_dump_start(genl_sock, skb, nlh,
|
||||
ops->dumpit, ops->done);
|
||||
}
|
||||
|
||||
if (ops->doit == NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue