Subject: Re: correct include file for restart_syscall

From: [email-masked] (Eric W. Biederman)
Date: Mon, 13 Dec 2010 02:51:26 -0800

Or Gerlitz <[email-masked]> writes:

> Hi,
>
> commit 26574401fef6766f6c3ca25b5c13febe662d2a32 "net: Fix ipoib rtnl_lock
> sysfs deadlock" modified some flows doing rtnl_lock calls to use rtnl_trylock
> / restart_syscall, etc. It turned out that restart_syscall was included in
> ipoib through linux/inet_lro.h which is an include I'd like to remove...
> Is including linux/sched.h being the right thing to do? I wasn't sure as
> this call is very rare, in network drivers its called only by ipoib and
> bonding and it looks like bonding includes it indirectly.

For the definition of restart_syscall yes.

I wish I was clever enough to find a way not to need rtnl_trylock
restart_syscall but unfortunately I don't :(

Eric