On Wednesday 24 March 2010 22:53:07 Roland Dreier wrote:> Interesting work. For the drivers/infiniband part, it seems maybe all> these drivers should be using no_llseek instead of default_llseek? (or> is it better style to use nonseekable_open()?) Certainly as far as I> can tell, nothing in drivers/infiniband pays any attention to f_pos.

There is a small chance that a random user space application actually triesto seek on the device (e.g. SEEK_END) and expects a zero return value,so when in doubt, I converted everything to default_llseek instead ofno_llseek, just so I can be sure I don't change the semantics.

> Also, is there a reason why you add "#include <linux/smp_lock.h>" to all> the files where you also do ".llseek = default_llseek"?

The last patch in the series moves the default_llseek and default_ioctlfunction into the same loadable module that contains the BKL itself.Moving the declarations into the respective header seemed appropriate,but it could also stay in a VFS header if people prefer that.

> In any case I can at least take care of the llseek stuff for 2.6.35.