Btrfs: cleanup destroy_marked_extents
Hello Josef Bacik,
This is a semi-automatic email about new static checker warnings.
The patch fd8b2b611580: "Btrfs: cleanup destroy_marked_extents" from Apr 24, 2013, leads to the following Smatch complaint:
fs/btrfs/disk-io.c:3814 btrfs_destroy_marked_extents()
warn: variable dereferenced before check 'eb' (see line 3813)
fs/btrfs/disk-io.c
3812 root->leafsize);
3813 start += eb->len;
^^^^^^^
New dereference.
3814 if (!eb)
^^^New check. Maybe we should be adding "root->leafsize" here? Just the check earlier would cause a forever loop.
3815 continue; 3816 wait_on_extent_buffer_writeback(eb);
regards,
dan carpenter
Quoted 17 lines · Dan Carpenter
Hello Josef Bacik,
This is a semi-automatic email about new static checker warnings.
The patch
fd8b2b611580: "Btrfs: cleanupdestroy_marked_extents" from Apr 24, 2013, leads to the following Smatch complaint:
fs/btrfs/disk-io.c:3814btrfs_destroy_marked_extents()
warn: variable dereferenced before check 'eb' (see line 3813)
fs/btrfs/disk-io.c
3812root->leafsize);3813 start += eb->len; ^^^^^^^ New dereference. 3814 if (!eb) ^^^
Quoted 6 lines
New check. Maybe we should be adding "
root->leafsize" here? Just the check earlier would cause a forever loop.3815 continue; 3816 wait_on_extent_buffer_writeback(eb);
Yeah I sent a patch for it yesterday, just me being an idiot, nothing to see here,
Josef