diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-02-27 12:53:56 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-03-06 19:28:19 +0100 |
commit | e4cc1483f35940c9288c332dd275f6fad485f8d2 (patch) | |
tree | 7afd3988ed92dfea2ba2683996758356c303ffe0 /fs/btrfs/dev-replace.c | |
parent | 95cd356ca23c3807b5f3503687161e216b1c520d (diff) |
btrfs: fix extent map logging bit not cleared for split maps after dropping range
At btrfs_drop_extent_map_range() we are clearing the EXTENT_FLAG_LOGGING
bit on a 'flags' variable that was not initialized. This makes static
checkers complain about it, so initialize the 'flags' variable before
clearing the bit.
In practice this has no consequences, because EXTENT_FLAG_LOGGING should
not be set when btrfs_drop_extent_map_range() is called, as an fsync locks
the inode in exclusive mode, locks the inode's mmap semaphore in exclusive
mode too and it always flushes all delalloc.
Also add a comment about why we clear EXTENT_FLAG_LOGGING on a copy of the
flags of the split extent map.
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/linux-btrfs/Y%2FyipSVozUDEZKow@kili/
Fixes: db21370bffbc ("btrfs: drop extent map range more efficiently")
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions