diff options
author | Jeff Layton <jlayton@redhat.com> | 2014-02-03 12:13:09 -0500 |
---|---|---|
committer | Jeff Layton <jlayton@redhat.com> | 2014-03-31 08:24:43 -0400 |
commit | c1e62b8fc355e0c3706f1ae0dacb72d1c514dc80 (patch) | |
tree | 67167d2ae9569d83d08edda65aa047faf21500e1 /include/linux/fs.h | |
parent | 3fd80cddc6af5ba53244514a61450d4b30a9fb9d (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.h | 10 |
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 { | |||
993 | extern void send_sigio(struct fown_struct *fown, int fd, int band); | 993 | extern void send_sigio(struct fown_struct *fown, int fd, int band); |
994 | 994 | ||
995 | #ifdef CONFIG_FILE_LOCKING | 995 | #ifdef CONFIG_FILE_LOCKING |
996 | extern int fcntl_getlk(struct file *, struct flock __user *); | 996 | extern int fcntl_getlk(struct file *, unsigned int, struct flock __user *); |
997 | extern int fcntl_setlk(unsigned int, struct file *, unsigned int, | 997 | extern 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 |
1001 | extern int fcntl_getlk64(struct file *, struct flock64 __user *); | 1001 | extern int fcntl_getlk64(struct file *, unsigned int, struct flock64 __user *); |
1002 | extern int fcntl_setlk64(unsigned int, struct file *, unsigned int, | 1002 | extern 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); | |||
1031 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); | 1031 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); |
1032 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); | 1032 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); |
1033 | #else /* !CONFIG_FILE_LOCKING */ | 1033 | #else /* !CONFIG_FILE_LOCKING */ |
1034 | static inline int fcntl_getlk(struct file *file, struct flock __user *user) | 1034 | static 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 |
1046 | static inline int fcntl_getlk64(struct file *file, struct flock64 __user *user) | 1047 | static 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 | } |