]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fsnotify(): constify 'data'
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 21 Nov 2016 01:21:17 +0000 (20:21 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 5 Dec 2016 23:58:31 +0000 (18:58 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/notify/fsnotify.c
include/linux/fsnotify_backend.h

index db39de2dd4cbc8b0e4e962e5a874a6e5b5777bc7..7788a79eedf7c6d52716db44cbc741dec6fb190a 100644 (file)
@@ -125,7 +125,7 @@ EXPORT_SYMBOL_GPL(__fsnotify_parent);
 static int send_to_group(struct inode *to_tell,
                         struct fsnotify_mark *inode_mark,
                         struct fsnotify_mark *vfsmount_mark,
-                        __u32 mask, void *data,
+                        __u32 mask, const void *data,
                         int data_is, u32 cookie,
                         const unsigned char *file_name)
 {
@@ -187,7 +187,7 @@ static int send_to_group(struct inode *to_tell,
  * out to all of the registered fsnotify_group.  Those groups can then use the
  * notification event in whatever means they feel necessary.
  */
-int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
+int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is,
             const unsigned char *file_name, u32 cookie)
 {
        struct hlist_node *inode_node = NULL, *vfsmount_node = NULL;
@@ -199,7 +199,7 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
        __u32 test_mask = (mask & ~FS_EVENT_ON_CHILD);
 
        if (data_is == FSNOTIFY_EVENT_PATH)
-               mnt = real_mount(((struct path *)data)->mnt);
+               mnt = real_mount(((const struct path *)data)->mnt);
        else
                mnt = NULL;
 
index d357041bbec8eeccc0b26c86878764d487f33946..e6ea6757a275dd2e571f973ddb507896d3d23c62 100644 (file)
@@ -245,7 +245,7 @@ struct fsnotify_mark {
 /* called from the vfs helpers */
 
 /* main fsnotify call to send events */
-extern int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
+extern int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is,
                    const unsigned char *name, u32 cookie);
 extern int __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask);
 extern void __fsnotify_inode_delete(struct inode *inode);
@@ -357,7 +357,7 @@ extern void fsnotify_init_event(struct fsnotify_event *event,
 
 #else
 
-static inline int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
+static inline int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is,
                           const unsigned char *name, u32 cookie)
 {
        return 0;