diff options
| author | Matthew Wilcox <willy@debian.org> | 2002-09-09 22:10:13 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-09-09 22:10:13 -0700 |
| commit | 48b3fb5494a03bf6d19d5627bd291a6250d3a078 (patch) | |
| tree | 95720e47d2710717b95c0805cd15be6aac6c5c31 /include/linux | |
| parent | af692bd67a8f4e18a797c41ba9ee0427eb40a2d2 (diff) | |
[PATCH] sleeping file locks
- Add FL_SLEEP flag to indicate we intend to sleep and therefore desire
to be placed on the block list. Use it for POSIX & flock locks.
- Remove locks_block_on.
- Change posix_unblock_lock to eliminate a race that will appear once we
don't use the BKL any more.
- Update the comment for locks_same_owner() and rename it to
posix_same_owner().
- Change locks_mandatory_area() to allocate its lock on the stack and
call posix_lock_file() instead of repeating that logic.
- Rename the "caller" parameter to posix_lock_file() to "request"
to better show that this is not to be inserted directly.
- Redo some of the proc code a little. Stop exposing kernel addresses
to userspace (whoever thought _that_ was a good idea?!) and show how
we should be printing the device name. The last part is ifdeffed
out to avoid breaking lslk.
- Remove FL_BROKEN. And there was much rejoicing.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1b4bf7d463a9..d58cd8b88fa8 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -526,10 +526,10 @@ extern int init_private_file(struct file *, struct dentry *, int); #define FL_POSIX 1 #define FL_FLOCK 2 -#define FL_BROKEN 4 /* broken flock() emulation */ -#define FL_ACCESS 8 /* for processes suspended by mandatory locking */ +#define FL_ACCESS 8 /* not trying to lock, just looking */ #define FL_LOCKD 16 /* lock held by rpc.lockd */ #define FL_LEASE 32 /* lease held on this file */ +#define FL_SLEEP 128 /* A blocking lock */ /* * The POSIX file lock owner is determined by @@ -591,9 +591,9 @@ extern void locks_copy_lock(struct file_lock *, struct file_lock *); extern void locks_remove_posix(struct file *, fl_owner_t); extern void locks_remove_flock(struct file *); extern struct file_lock *posix_test_lock(struct file *, struct file_lock *); -extern int posix_lock_file(struct file *, struct file_lock *, unsigned int); +extern int posix_lock_file(struct file *, struct file_lock *); extern void posix_block_lock(struct file_lock *, struct file_lock *); -extern void posix_unblock_lock(struct file_lock *); +extern void posix_unblock_lock(struct file *, struct file_lock *); extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); extern int __get_lease(struct inode *inode, unsigned int flags); extern time_t lease_get_mtime(struct inode *); |
