Re: [PATCH] btrfs: extend locking to all space_info members accesses
From: Josef Bacik
Date: Mon Feb 28 2022 - 15:42:03 EST
On Fri, Feb 25, 2022 at 10:20:28PM +0100, Niels Dossche wrote:
> bytes_pinned is always accessed under space_info->lock, except in
> btrfs_preempt_reclaim_metadata_space, however the other members are
> accessed under that lock. The reserved member of the rsv's are also
> partially accessed under a lock and partially not. Move all these
> accesses into the same lock to ensure consistency.
>
> Signed-off-by: Niels Dossche <niels.dossche@xxxxxxxx>
> Signed-off-by: Niels Dossche <dossche.niels@xxxxxxxxx>
Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
Thanks,
Josef