Re: [PATCH v2] btrfs: Make btrfs_read_disk_super return struct btrfs_disk_super

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

 



On Thu, Apr 16, 2020 at 02:26:08PM +0300, Nikolay Borisov wrote:
> Instead of returning both the page and the super block structure, make
> btrfs_read_disk_super just return a pointer to struct btrfs_disk_super.
> As a result the function signature is simplified.
> 
> Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx>

Added to misc-next, thanks.

> @@ -1337,8 +1336,9 @@ struct btrfs_device *btrfs_scan_one_device(const char *path, fmode_t flags,
>  	if (IS_ERR(bdev))
>  		return ERR_CAST(bdev);
> 
> -	if (btrfs_read_disk_super(bdev, bytenr, &page, &disk_super)) {
> -		device = ERR_PTR(-EINVAL);
> +	disk_super = btrfs_read_disk_super(bdev, bytenr);
> +	if (IS_ERR(disk_super)) {
> +		device = disk_super;

With the ERR_CAST fixup.

>  		goto error_bdev_put;
>  	}
> 
> --
> 2.17.1



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux