Re: [PATCH v2 05/10] bdev: implement freeze and thaw holder operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 26, 2023 at 10:44:27AM +0200, Christian Brauner wrote:
>   */
>  int bdev_freeze(struct block_device *bdev)
>  {
>  	int error = 0;
>  
>  	mutex_lock(&bdev->bd_fsfreeze_mutex);
>  
> +	if (atomic_inc_return(&bdev->bd_fsfreeze_count) > 1) {
> +		mutex_unlock(&bdev->bd_fsfreeze_mutex);
> +		return 0;

Use a goto out_unlock here to share the lock release with the
main flow?

>  	/*
> +	 * If the superblock wasn't already SB_DYING then we hold
> +	 * s_umount and can safely drop our temporary reference.
> +         */

Spaces instead of tabs here.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux