Skip to content

Commit

Permalink
btrfs: dev-replace: remove pointless assert in write unlock
Browse files Browse the repository at this point in the history
The value of blocking_readers is increased only when the lock is taken
for read, no way we can fail the condition with the write lock.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
David Sterba committed Oct 15, 2018
1 parent 7f8d236 commit 9b14211
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/btrfs/dev-replace.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,6 @@ void btrfs_dev_replace_write_lock(struct btrfs_dev_replace *dev_replace)

void btrfs_dev_replace_write_unlock(struct btrfs_dev_replace *dev_replace)
{
ASSERT(atomic_read(&dev_replace->blocking_readers) == 0);
write_unlock(&dev_replace->lock);
}

Expand Down

0 comments on commit 9b14211

Please sign in to comment.