On Sunday 28 March 2010, Frederic Weisbecker wrote:
Exactly, that's why I changed all the drivers to set default_llseek explicitly.
Even this is very likely not needed in more than a handful of drivers (if any),
for a number of reasons:
- sys_read/sys_write *never* hold any locks while calling file_pos_write(),
which is the only place they get updated for regular files.
- concurrent llseek plus other file operations on the same file descriptor
usually already have an undefined outcome.
- when I started inspecting drivers that look at file->f_pos themselves (not
the read/write operation arguments), I found that practically all of them
are doing this in a totally broken way!
- The only think we'd probably ever want to lock against in llseek
is readdir, which is not used in any drivers, but only in file systems.
Arnd
--