Skip to content

Commit

Permalink
BKL: Remove BKL from ext3_put_super() and ext3_remount()
Browse files Browse the repository at this point in the history
The BKL lock is protecting the remounting against a potential call to
ext3_put_super(). This could not happen, since this is protected by the
s_umount rw semaphore of struct super_block.

Therefore I think the BKL is protecting nothing here.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Jan Blunck authored and Arnd Bergmann committed Oct 4, 2010
1 parent d646cf8 commit 77b54a4
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions fs/ext3/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,6 @@ static void ext3_put_super (struct super_block * sb)
int i, err;

dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);

lock_kernel();

ext3_xattr_put_super(sb);
err = journal_destroy(sbi->s_journal);
sbi->s_journal = NULL;
Expand Down Expand Up @@ -462,8 +459,6 @@ static void ext3_put_super (struct super_block * sb)
sb->s_fs_info = NULL;
kfree(sbi->s_blockgroup_lock);
kfree(sbi);

unlock_kernel();
}

static struct kmem_cache *ext3_inode_cachep;
Expand Down Expand Up @@ -2534,8 +2529,6 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
int i;
#endif

lock_kernel();

/* Store the original options */
lock_super(sb);
old_sb_flags = sb->s_flags;
Expand Down Expand Up @@ -2644,7 +2637,6 @@ static int ext3_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);
Expand All @@ -2665,7 +2657,6 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
}
#endif
unlock_super(sb);
unlock_kernel();
return err;
}

Expand Down

0 comments on commit 77b54a4

Please sign in to comment.