btrfs: reset device stat using btrfs_dev_stat_set
btrfs_dev_stat_reset() is an overdo in terms of wrapping. So this patch open codes btrfs_dev_stat_reset(). Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -547,12 +547,6 @@ static inline void btrfs_dev_stat_set(struct btrfs_device *dev,
|
||||
atomic_inc(&dev->dev_stats_ccnt);
|
||||
}
|
||||
|
||||
static inline void btrfs_dev_stat_reset(struct btrfs_device *dev,
|
||||
int index)
|
||||
{
|
||||
btrfs_dev_stat_set(dev, index, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert block group flags (BTRFS_BLOCK_GROUP_*) to btrfs_raid_types, which
|
||||
* can be used as index to access btrfs_raid_array[].
|
||||
|
Reference in New Issue
Block a user