diff options
author | Luca Vizzarro <[email protected]> | 2023-02-15 15:50:05 +0000 |
---|---|---|
committer | Christian Brauner <[email protected]> | 2023-07-10 14:36:12 +0200 |
commit | f4ae4081e5a871b4c4e2f802ccf73f8d69566073 (patch) | |
tree | 4ab4c716633a1dc71f618c6d3b7405a1455b1456 /include/linux/dnotify.h | |
parent | 515c5046650d8f56f93546d3867b64c1906162bc (diff) |
dnotify: Pass argument of fcntl_dirnotify as int
The interface for fcntl expects the argument passed for the command
F_DIRNOTIFY to be of type int. The current code wrongly treats it as
a long. In order to avoid access to undefined bits, we should explicitly
cast the argument to int.
Cc: Jan Kara <[email protected]>
Cc: Amir Goldstein <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Jeff Layton <[email protected]>
Cc: Chuck Lever <[email protected]>
Cc: Kevin Brodsky <[email protected]>
Cc: Vincenzo Frascino <[email protected]>
Cc: Szabolcs Nagy <[email protected]>
Cc: "Theodore Ts'o" <[email protected]>
Cc: David Laight <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: [email protected]
Cc: [email protected]
Acked-by: Jan Kara <[email protected]>
Signed-off-by: Luca Vizzarro <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'include/linux/dnotify.h')
-rw-r--r-- | include/linux/dnotify.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/dnotify.h b/include/linux/dnotify.h index b1d26f9f1c9f..9f183a679277 100644 --- a/include/linux/dnotify.h +++ b/include/linux/dnotify.h @@ -30,7 +30,7 @@ struct dnotify_struct { FS_MOVED_FROM | FS_MOVED_TO) extern void dnotify_flush(struct file *, fl_owner_t); -extern int fcntl_dirnotify(int, struct file *, unsigned long); +extern int fcntl_dirnotify(int, struct file *, unsigned int); #else @@ -38,7 +38,7 @@ static inline void dnotify_flush(struct file *filp, fl_owner_t id) { } -static inline int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) +static inline int fcntl_dirnotify(int fd, struct file *filp, unsigned int arg) { return -EINVAL; } |