diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2016-09-07 17:48:28 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-09-26 13:50:44 -0400 |
commit | 196e02490c934398f894e5cb0ee1ac8ad13ca576 (patch) | |
tree | e519263bb651174598da94d80f35f90e6bf635af | |
parent | 4867268c57ff709a7b6b86ae6f6537d846d1443a (diff) |
Btrfs: remove unnecessary btrfs_mark_buffer_dirty in split_leaf
When we're not able to get enough space through splitting leaf,
we'd create a new sibling leaf instead, and it's possible that we return
a zero-nritem sibling leaf and mark it dirty before it's in a consistent
state. With CONFIG_BTRFS_FS_CHECK_INTEGRITY=y, the integrity check of
check_leaf will report panic due to this zero-nritem non-root leaf.
This removes the unnecessary btrfs_mark_buffer_dirty.
Reported-by: Filipe Manana <fdmanana@gmail.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/ctree.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 8f67a14fa974..f6ba165d3f81 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -4311,7 +4311,11 @@ again: | |||
4311 | if (path->slots[1] == 0) | 4311 | if (path->slots[1] == 0) |
4312 | fixup_low_keys(fs_info, path, &disk_key, 1); | 4312 | fixup_low_keys(fs_info, path, &disk_key, 1); |
4313 | } | 4313 | } |
4314 | btrfs_mark_buffer_dirty(right); | 4314 | /* |
4315 | * We create a new leaf 'right' for the required ins_len and | ||
4316 | * we'll do btrfs_mark_buffer_dirty() on this leaf after copying | ||
4317 | * the content of ins_len to 'right'. | ||
4318 | */ | ||
4315 | return ret; | 4319 | return ret; |
4316 | } | 4320 | } |
4317 | 4321 | ||