> >/** > > * bond_rtnl_wrapper - take the rtnl_lock if needed > > * @x: function with args > > * > > */ > >#define RTNL_WRAPPER(x) \ > >({ \ > > int __rc__; \ > > if (rtnl_trylock()) { \ > > __rc__ = x; \ > > rtnl_unlock(); \ > > } else { \ > > __rc__ = x; \ > > } \ > > __rc__; \ > >}) > > > > > >and wrapped it around the calls to dev_set_mac_address. I wasn't > >pleased with it, but it seemed like it worked pretty well based on the > >testing I did. > > The problem with this is that it'll cause failures in the case > that some other unrelated entity holds rtnl ("x" will be performed > concurrently with whomever actually holds rtnl). > > -J
It is also a crap macro. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html