1
0
Fork 0

Btrfs: fix unprotected extent map operation when logging file extents

We forget to protect the modified_extents list, fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
wifi-calibration
Miao Xie 2012-11-01 07:34:54 +00:00 committed by Josef Bacik
parent 315a9850da
commit bbe1426764
1 changed files with 2 additions and 0 deletions

View File

@ -3526,8 +3526,10 @@ next_slot:
struct extent_map_tree *tree = &BTRFS_I(inode)->extent_tree;
struct extent_map *em, *n;
write_lock(&tree->lock);
list_for_each_entry_safe(em, n, &tree->modified_extents, list)
list_del_init(&em->list);
write_unlock(&tree->lock);
}
if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) {