diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-04-11 10:30:16 +0000 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-05-06 15:54:46 -0400 |
commit | ceda08642459e31673d24d7968d864390d2ce5fa (patch) | |
tree | 57d1a9be32a9a2653011b5fedf6615731af48b7f /crypto/rmd320.c | |
parent | f42a34b2f10c411ef45f247f3000ed03ba4e80c0 (diff) |
Btrfs: use a lock to protect incompat/compat flag of the super block
The following case will make the incompat/compat flag of the super block
be recovered.
Task1 |Task2
flags = btrfs_super_incompat_flags(); |
|flags = btrfs_super_incompat_flags();
flags |= new_flag1; |
|flags |= new_flag2;
btrfs_set_super_incompat_flags(flags); |
|btrfs_set_super_incompat_flags(flags);
the new_flag1 is recovered.
In order to avoid this problem, we introduce a lock named super_lock into
the btrfs_fs_info structure. If we want to update incompat/compat flags
of the super block, we must hold it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'crypto/rmd320.c')
0 files changed, 0 insertions, 0 deletions