diff options
author | Yongqiang Yang <xiaoqiangnk@gmail.com> | 2011-07-26 21:35:44 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-07-26 21:35:44 -0400 |
commit | 8f82f840ec6ab873f520364d443ff6fa1b3f8e22 (patch) | |
tree | 72d90cdc8f7311ef913b7471e53f718bebbf7414 /fs/ext4/super.c | |
parent | 2d859db3e4a82a365572592d57624a5f996ed0ec (diff) | |
download | linux-8f82f840ec6ab873f520364d443ff6fa1b3f8e22.tar.bz2 |
ext4: prevent parallel resizers by atomic bit ops
Before this patch, parallel resizers are allowed and protected by a
mutex lock, actually, there is no need to support parallel resizer, so
this patch prevents parallel resizers by atmoic bit ops, like
lock_page() and unlock_page() do.
To do this, the patch removed the mutex lock s_resize_lock from struct
ext4_sb_info and added a unsigned long field named s_resize_flags
which inidicates if there is a resizer.
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 143d763729b4..cfe9f39c4ba2 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3500,7 +3500,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */ mutex_init(&sbi->s_orphan_lock); - mutex_init(&sbi->s_resize_lock); + sbi->s_resize_flags = 0; sb->s_root = NULL; |