Re: [2.6.16 PATCH] Filesystem Events Connector v4
From: Evgeniy Polyakov
Date: Tue Mar 28 2006 - 08:34:35 EST
On Tue, Mar 28, 2006 at 09:30:03PM +0800, Yi Yang (yang.y.yi@xxxxxxxxx) wrote:
> Evgeniy Polyakov åé:
> >>--- a/drivers/connector/connector.c.orig 2006-03-27
> >>21:35:15.000000000 +0800
> >>+++ b/drivers/connector/connector.c 2006-03-27 21:35:53.000000000 +0800
> >>@@ -111,9 +111,7 @@ int cn_netlink_send(struct cn_msg *msg,
> >>
> >> NETLINK_CB(skb).dst_group = group;
> >>
> >>- netlink_broadcast(dev->nls, skb, 0, group, gfp_mask);
> >>-
> >>- return 0;
> >>+ return (netlink_broadcast(dev->nls, skb, 0, group, gfp_mask));
> >>
> >> nlmsg_failure:
> >> kfree_skb(skb);
> >>
> >
> >This error value is propageted back in current connector code already.
> >
> Which version of kernel do you mean? for 2.6.16, it doesn't return
> netlink_broadcast's return value.
It was committeed in 2.6.17 timeframe.
b191ba0d599928372be5a89f75486eb58efab48a commit id.
It also includes new netlink_has_listeners() call usage, which allows to
check in advance if there are listeners or not for given netlink group.
netlink_has_listeners() can return false positives, which will be caught
by netlink_broadcast().
--
Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/