mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
btrfs: move condition to WARN_ON in btrfs_set_delalloc_extent()
For a simple if + WARN_ON we should use the condition directly in the macro. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
115421e29b
commit
cf384a2ab8
|
|
@ -2605,8 +2605,7 @@ void btrfs_set_delalloc_extent(struct btrfs_inode *inode, struct extent_state *s
|
|||
|
||||
lockdep_assert_held(&inode->io_tree.lock);
|
||||
|
||||
if ((bits & EXTENT_DEFRAG) && !(bits & EXTENT_DELALLOC))
|
||||
WARN_ON(1);
|
||||
WARN_ON((bits & EXTENT_DEFRAG) && !(bits & EXTENT_DELALLOC));
|
||||
/*
|
||||
* set_bit and clear bit hooks normally require _irqsave/restore
|
||||
* but in this case, we are only testing for the DELALLOC
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user