Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-drm-fsl-dcu.git] / fs / namespace.c
index 4a985ff0ddfcfc575b883a45b32e2488257d317e..72a286e0d33eb37a2ff3cc8a33f7ca5cefcca266 100644 (file)
@@ -209,7 +209,7 @@ static struct mount *alloc_vfsmnt(const char *name)
                        goto out_free_cache;
 
                if (name) {
-                       mnt->mnt_devname = kstrdup(name, GFP_KERNEL);
+                       mnt->mnt_devname = kstrdup_const(name, GFP_KERNEL);
                        if (!mnt->mnt_devname)
                                goto out_free_id;
                }
@@ -243,7 +243,7 @@ static struct mount *alloc_vfsmnt(const char *name)
 
 #ifdef CONFIG_SMP
 out_free_devname:
-       kfree(mnt->mnt_devname);
+       kfree_const(mnt->mnt_devname);
 #endif
 out_free_id:
        mnt_free_id(mnt);
@@ -577,7 +577,7 @@ int sb_prepare_remount_readonly(struct super_block *sb)
 
 static void free_vfsmnt(struct mount *mnt)
 {
-       kfree(mnt->mnt_devname);
+       kfree_const(mnt->mnt_devname);
 #ifdef CONFIG_SMP
        free_percpu(mnt->mnt_pcp);
 #endif