locks: remove conditional lock release in middle of flock_lock_file
[firefly-linux-kernel-4.4.55.git] / fs / namespace.c
index cd1e9681a0cf5d0bdfd64d84ae90c34bd10f265b..6dae553dd69cca77c483bb3b2da0ccf1e3ecbd62 100644 (file)
@@ -201,7 +201,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;
                }
@@ -234,7 +234,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);
@@ -568,7 +568,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