X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fext4%2Fsuper.c;h=24e7699f915d339073d459e77acea27e88d9a1bc;hb=f2143c4e2ebc6be3f07b7c7527dae7313fde23e1;hp=0f0021f4990c38d58e373be71d5c3085c2bd3d9c;hpb=77b54a46a83232d172d55013c3af838190615260;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0f0021f4990c..24e7699f915d 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -708,7 +707,6 @@ static void ext4_put_super(struct super_block *sb) destroy_workqueue(sbi->dio_unwritten_wq); lock_super(sb); - lock_kernel(); if (sb->s_dirt) ext4_commit_super(sb, 1); @@ -775,7 +773,6 @@ static void ext4_put_super(struct super_block *sb) * Now that we are completely done shutting down the * superblock, we need to actually destroy the kobject. */ - unlock_kernel(); unlock_super(sb); kobject_put(&sbi->s_kobj); wait_for_completion(&sbi->s_kobj_unregister); @@ -2568,8 +2565,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) int err; unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO; - lock_kernel(); - sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); if (!sbi) goto out_free_orig; @@ -2590,8 +2585,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) sbi->s_sectors_written_start = part_stat_read(sb->s_bdev->bd_part, sectors[1]); - unlock_kernel(); - /* Cleanup superblock name */ for (cp = sb->s_id; (cp = strchr(cp, '/'));) *cp = '!'; @@ -3214,11 +3207,7 @@ out_fail: sb->s_fs_info = NULL; kfree(sbi->s_blockgroup_lock); kfree(sbi); - kfree(orig_data); - return ret; - out_free_orig: - unlock_kernel(); kfree(orig_data); return ret; } @@ -3726,8 +3715,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) #endif char *orig_data = kstrdup(data, GFP_KERNEL); - lock_kernel(); - /* Store the original options */ lock_super(sb); old_sb_flags = sb->s_flags; @@ -3862,7 +3849,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) kfree(old_opts.s_qf_names[i]); #endif unlock_super(sb); - unlock_kernel(); if (enable_quota) dquot_resume(sb, -1); @@ -3888,7 +3874,6 @@ restore_opts: } #endif unlock_super(sb); - unlock_kernel(); kfree(orig_data); return err; }