From 22141f0513da328f8f4e405953e5e52fb7c4e65a Mon Sep 17 00:00:00 2001 From: Ken Preslan Date: Tue, 7 Sep 2004 17:50:11 -0700 Subject: [PATCH] Allow cluster-wide flock Below is a patch that lets a cluster filesystem (such as GFS) implement flock across the cluster. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/fs.h b/include/linux/fs.h index 68d486024d56..861be6705127 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -695,6 +695,7 @@ extern int posix_lock_file_wait(struct file *, struct file_lock *); extern void posix_block_lock(struct file_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 flock_lock_file_wait(struct file *filp, struct file_lock *fl); extern int __break_lease(struct inode *inode, unsigned int flags); extern void lease_get_mtime(struct inode *, struct timespec *time); extern int lock_may_read(struct inode *, loff_t start, unsigned long count); @@ -912,6 +913,7 @@ struct file_operations { unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); int (*dir_notify)(struct file *filp, unsigned long arg); + int (*flock) (struct file *, int, struct file_lock *); }; struct inode_operations { -- cgit v1.2.3