]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: prevent parallel resizers by atomic bit ops
authorYongqiang Yang <xiaoqiangnk@gmail.com>
Wed, 27 Jul 2011 01:35:44 +0000 (21:35 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 27 Jul 2011 01:35:44 +0000 (21:35 -0400)
commit1c78c9baf59d6d1d1832d49dc85bd82b58e40361
tree31dc364c45b845dbfc90b1a8679760e0ed3ff2f4
parent8f29df05fa55426af6a9b1d0fea91c6800179a7c
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>
fs/ext4/ext4.h
fs/ext4/ioctl.c
fs/ext4/resize.c
fs/ext4/super.c