diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-06-23 05:05:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:43:02 -0400 |
commit | 75e1fcc0b18df0a65ab113198e9dc0e98999a08c (patch) | |
tree | 3ac0d0d3120cbca4ee9734494e2c9a4e0775ac4f /include/linux/fs.h | |
parent | ff7b86b82083f24b8637dff1528c7101c18c7f39 (diff) |
[PATCH] vfs: add lock owner argument to flush operation
Pass the POSIX lock owner ID to the flush operation.
This is useful for filesystems which don't want to store any locking state
in inode->i_flock but want to handle locking/unlocking POSIX locks
internally. FUSE is one such filesystem but I think it possible that some
network filesystems would need this also.
Also add a flag to indicate that a POSIX locking request was generated by
close(), so filesystems using the above feature won't send an extra locking
request in this case.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index e917403f4d5..56d8bf0d0a7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -683,6 +683,7 @@ extern spinlock_t files_lock; | |||
683 | #define FL_FLOCK 2 | 683 | #define FL_FLOCK 2 |
684 | #define FL_ACCESS 8 /* not trying to lock, just looking */ | 684 | #define FL_ACCESS 8 /* not trying to lock, just looking */ |
685 | #define FL_LEASE 32 /* lease held on this file */ | 685 | #define FL_LEASE 32 /* lease held on this file */ |
686 | #define FL_CLOSE 64 /* unlock on close */ | ||
686 | #define FL_SLEEP 128 /* A blocking lock */ | 687 | #define FL_SLEEP 128 /* A blocking lock */ |
687 | 688 | ||
688 | /* | 689 | /* |
@@ -1025,7 +1026,7 @@ struct file_operations { | |||
1025 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); | 1026 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); |
1026 | int (*mmap) (struct file *, struct vm_area_struct *); | 1027 | int (*mmap) (struct file *, struct vm_area_struct *); |
1027 | int (*open) (struct inode *, struct file *); | 1028 | int (*open) (struct inode *, struct file *); |
1028 | int (*flush) (struct file *); | 1029 | int (*flush) (struct file *, fl_owner_t id); |
1029 | int (*release) (struct inode *, struct file *); | 1030 | int (*release) (struct inode *, struct file *); |
1030 | int (*fsync) (struct file *, struct dentry *, int datasync); | 1031 | int (*fsync) (struct file *, struct dentry *, int datasync); |
1031 | int (*aio_fsync) (struct kiocb *, int datasync); | 1032 | int (*aio_fsync) (struct kiocb *, int datasync); |