PATCH [0/7] Fix posix locking code
From: Trond Myklebust
Date: Sat Aug 14 2004 - 14:31:57 EST
The following patches fix up a number of inconsistencies within
the current VFS locking code.
The main problems addressed are
- Inconsistent definition of what the lock owner means.
Currently, the VFS code is sometimes using current->files,
sometimes current->tgid, and sometimes a combination of both.
It turns out that CLONE_FILES more or less forces us to use
current->files as the basis for the lock owner (or bad things
will happen) so we must drop the checks for current->tgid.
- Design worries: separate out callbacks used by lock managers,
such as lockd, and those used by filesystems.
- posix_lock_file() is called by the VFS *AFTER* the filesystem
has been notified. However because it uses no locking, and
may even sleep, there are serious race issues.
By moving the posix_lock_file() call into the filesystem
callback, the filesystem may implement its own locking scheme
to avoid trouble.
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/