aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-06-23 05:05:12 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 10:43:02 -0400
commit75e1fcc0b18df0a65ab113198e9dc0e98999a08c (patch)
tree3ac0d0d3120cbca4ee9734494e2c9a4e0775ac4f /include/linux
parentff7b86b82083f24b8637dff1528c7101c18c7f39 (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')
-rw-r--r--include/linux/coda_linux.h2
-rw-r--r--include/linux/fs.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index b3ecf8f71d97..7b5c5df5cb69 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -36,7 +36,7 @@ extern const struct file_operations coda_ioctl_operations;
36 36
37/* operations shared over more than one file */ 37/* operations shared over more than one file */
38int coda_open(struct inode *i, struct file *f); 38int coda_open(struct inode *i, struct file *f);
39int coda_flush(struct file *f); 39int coda_flush(struct file *f, fl_owner_t id);
40int coda_release(struct inode *i, struct file *f); 40int coda_release(struct inode *i, struct file *f);
41int coda_permission(struct inode *inode, int mask, struct nameidata *nd); 41int coda_permission(struct inode *inode, int mask, struct nameidata *nd);
42int coda_revalidate_inode(struct dentry *); 42int coda_revalidate_inode(struct dentry *);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e917403f4d58..56d8bf0d0a77 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);