[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 <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ead592ba24
commit
c702e8047f
@@ -859,7 +859,6 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
int min_len;
|
||||
int family;
|
||||
int type;
|
||||
int err;
|
||||
|
||||
type = nlh->nlmsg_type;
|
||||
if (type > RTM_MAX)
|
||||
@@ -888,10 +887,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
if (dumpit == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
err = netlink_dump_start(rtnl, skb, nlh, dumpit, NULL);
|
||||
if (err == 0)
|
||||
err = -EINTR;
|
||||
return err;
|
||||
return netlink_dump_start(rtnl, skb, nlh, dumpit, NULL);
|
||||
}
|
||||
|
||||
memset(rta_buf, 0, (rtattr_max * sizeof(struct rtattr *)));
|
||||
|
Reference in New Issue
Block a user