super.c (7b0800d00dae8c897398abaf61e82db0d67d7afc) | super.c (cd913c76f489def1a388e3a5b10df94948ede3f5) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2017-2018 HUAWEI, Inc. 4 * https://www.huawei.com/ 5 */ 6#include <linux/module.h> 7#include <linux/buffer_head.h> 8#include <linux/statfs.h> --- 298 unchanged lines hidden (view full) --- 307 bdev = blkdev_get_by_path(dif->path, 308 FMODE_READ | FMODE_EXCL, 309 sb->s_type); 310 if (IS_ERR(bdev)) { 311 err = PTR_ERR(bdev); 312 goto err_out; 313 } 314 dif->bdev = bdev; | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2017-2018 HUAWEI, Inc. 4 * https://www.huawei.com/ 5 */ 6#include <linux/module.h> 7#include <linux/buffer_head.h> 8#include <linux/statfs.h> --- 298 unchanged lines hidden (view full) --- 307 bdev = blkdev_get_by_path(dif->path, 308 FMODE_READ | FMODE_EXCL, 309 sb->s_type); 310 if (IS_ERR(bdev)) { 311 err = PTR_ERR(bdev); 312 goto err_out; 313 } 314 dif->bdev = bdev; |
315 dif->dax_dev = fs_dax_get_by_bdev(bdev); | 315 dif->dax_dev = fs_dax_get_by_bdev(bdev, &dif->dax_part_off); |
316 dif->blocks = le32_to_cpu(dis->blocks); 317 dif->mapped_blkaddr = le32_to_cpu(dis->mapped_blkaddr); 318 sbi->total_blocks += dif->blocks; 319 pos += EROFS_DEVT_SLOT_SIZE; 320 } 321err_out: 322 up_read(&sbi->devs->rwsem); 323 if (page) { --- 315 unchanged lines hidden (view full) --- 639 } 640 641 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); 642 if (!sbi) 643 return -ENOMEM; 644 645 sb->s_fs_info = sbi; 646 sbi->opt = ctx->opt; | 316 dif->blocks = le32_to_cpu(dis->blocks); 317 dif->mapped_blkaddr = le32_to_cpu(dis->mapped_blkaddr); 318 sbi->total_blocks += dif->blocks; 319 pos += EROFS_DEVT_SLOT_SIZE; 320 } 321err_out: 322 up_read(&sbi->devs->rwsem); 323 if (page) { --- 315 unchanged lines hidden (view full) --- 639 } 640 641 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); 642 if (!sbi) 643 return -ENOMEM; 644 645 sb->s_fs_info = sbi; 646 sbi->opt = ctx->opt; |
647 sbi->dax_dev = fs_dax_get_by_bdev(sb->s_bdev); | 647 sbi->dax_dev = fs_dax_get_by_bdev(sb->s_bdev, &sbi->dax_part_off); |
648 sbi->devs = ctx->devs; 649 ctx->devs = NULL; 650 651 err = erofs_read_superblock(sb); 652 if (err) 653 return err; 654 655 if (test_opt(&sbi->opt, DAX_ALWAYS)) { --- 301 unchanged lines hidden --- | 648 sbi->devs = ctx->devs; 649 ctx->devs = NULL; 650 651 err = erofs_read_superblock(sb); 652 if (err) 653 return err; 654 655 if (test_opt(&sbi->opt, DAX_ALWAYS)) { --- 301 unchanged lines hidden --- |