summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-11-28 14:54:37 -0500
committerPawel Osmialowski <p.osmialowsk@mcdsrvbld02.digital.local>2015-03-27 14:37:32 +0100
commitcbf82084a9bb42dd93bc6c3df622bd9812cd77ec (patch)
tree8aaee4ec3b28324f354aa2e06a9810d7e0d30244
parentb1490617c38d1441886a8f2669be21f78f792537 (diff)
downloadlinux-3.10-cbf82084a9bb42dd93bc6c3df622bd9812cd77ec.tar.gz
linux-3.10-cbf82084a9bb42dd93bc6c3df622bd9812cd77ec.tar.bz2
linux-3.10-cbf82084a9bb42dd93bc6c3df622bd9812cd77ec.zip
sysfs, kernfs: make sysfs_super_info->ns const
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>
-rw-r--r--fs/sysfs/mount.c2
-rw-r--r--fs/sysfs/sysfs.h14
2 files changed, 8 insertions, 8 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 21070c286e3..fcbe5e80aee 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -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);
}
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 6d0dcead2d6..ce97907e289 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -18,14 +18,14 @@
* 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;