aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2014-02-03 12:13:09 -0500
committerJeff Layton <jlayton@redhat.com>2014-03-31 08:24:43 -0400
commitc1e62b8fc355e0c3706f1ae0dacb72d1c514dc80 (patch)
tree67167d2ae9569d83d08edda65aa047faf21500e1 /include/linux/fs.h
parent3fd80cddc6af5ba53244514a61450d4b30a9fb9d (diff)
locks: pass the cmd value to fcntl_getlk/getlk64
Once we introduce file private locks, we'll need to know what cmd value was used, as that affects the ownership and whether a conflict would arise. Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 5ddeb8de5e77..ae91dce8a547 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -993,12 +993,12 @@ struct file_lock {
993extern void send_sigio(struct fown_struct *fown, int fd, int band); 993extern void send_sigio(struct fown_struct *fown, int fd, int band);
994 994
995#ifdef CONFIG_FILE_LOCKING 995#ifdef CONFIG_FILE_LOCKING
996extern int fcntl_getlk(struct file *, struct flock __user *); 996extern int fcntl_getlk(struct file *, unsigned int, struct flock __user *);
997extern int fcntl_setlk(unsigned int, struct file *, unsigned int, 997extern int fcntl_setlk(unsigned int, struct file *, unsigned int,
998 struct flock __user *); 998 struct flock __user *);
999 999
1000#if BITS_PER_LONG == 32 1000#if BITS_PER_LONG == 32
1001extern int fcntl_getlk64(struct file *, struct flock64 __user *); 1001extern int fcntl_getlk64(struct file *, unsigned int, struct flock64 __user *);
1002extern int fcntl_setlk64(unsigned int, struct file *, unsigned int, 1002extern int fcntl_setlk64(unsigned int, struct file *, unsigned int,
1003 struct flock64 __user *); 1003 struct flock64 __user *);
1004#endif 1004#endif
@@ -1031,7 +1031,8 @@ extern int lease_modify(struct file_lock **, int);
1031extern int lock_may_read(struct inode *, loff_t start, unsigned long count); 1031extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
1032extern int lock_may_write(struct inode *, loff_t start, unsigned long count); 1032extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
1033#else /* !CONFIG_FILE_LOCKING */ 1033#else /* !CONFIG_FILE_LOCKING */
1034static inline int fcntl_getlk(struct file *file, struct flock __user *user) 1034static inline int fcntl_getlk(struct file *file, unsigned int cmd,
1035 struct flock __user *user)
1035{ 1036{
1036 return -EINVAL; 1037 return -EINVAL;
1037} 1038}
@@ -1043,7 +1044,8 @@ static inline int fcntl_setlk(unsigned int fd, struct file *file,
1043} 1044}
1044 1045
1045#if BITS_PER_LONG == 32 1046#if BITS_PER_LONG == 32
1046static inline int fcntl_getlk64(struct file *file, struct flock64 __user *user) 1047static inline int fcntl_getlk64(struct file *file, unsigned int cmd,
1048 struct flock64 __user *user)
1047{ 1049{
1048 return -EINVAL; 1050 return -EINVAL;
1049} 1051}