]> Pileus Git - ~andy/linux/commitdiff
sysfs, kernfs: make sysfs_super_info->ns const
authorTejun Heo <tj@kernel.org>
Thu, 28 Nov 2013 19:54:37 +0000 (14:54 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Nov 2013 02:09:27 +0000 (18:09 -0800)
Add const qualifier to sysfs_super_info->ns so that it's consistent
with other namespace tag usages in sysfs.  Because kobject doesn't use
const qualifier for namespace tags, this ends up requiring an explicit
cast to drop const qualifier in free_sysfs_super_info().

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/mount.c
fs/sysfs/sysfs.h

index 21070c286e3f0b994ba1481bb6b2ff3e1a55275e..fcbe5e80aeeb277513ae66689c520de7b9034e63 100644 (file)
@@ -92,7 +92,7 @@ static int sysfs_set_super(struct super_block *sb, void *data)
 
 static void free_sysfs_super_info(struct sysfs_super_info *info)
 {
-       kobj_ns_drop(KOBJ_NS_TYPE_NET, info->ns);
+       kobj_ns_drop(KOBJ_NS_TYPE_NET, (void *)info->ns);
        kfree(info);
 }
 
index 6d0dcead2d6a8cfc8868637402a8965cfb396d77..ce97907e2894d9b6d232fb05c006e5b0981f7a12 100644 (file)
  * mount.c
  */
 
-/*
- * Each sb is associated with one namespace tag, currently the network
- * namespace of the task which mounted this sysfs instance.  If multiple
- * tags become necessary, make the following an array and compare
- * sysfs_dirent tag against every entry.
- */
 struct sysfs_super_info {
-       void *ns;
+       /*
+        * Each sb is associated with one namespace tag, currently the network
+        * namespace of the task which mounted this sysfs instance.  If multiple
+        * tags become necessary, make the following an array and compare
+        * sysfs_dirent tag against every entry.
+        */
+       const void              *ns;
 };
 #define sysfs_info(SB) ((struct sysfs_super_info *)(SB->s_fs_info))
 extern struct sysfs_dirent sysfs_root;