Merge tag 'f2fs-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
[sfrench/cifs-2.6.git] / fs / f2fs / super.c
index 03f56a7c80fa1b86af063dfa6652368efcd3d8f3..a6867f26f141836dcd4a4f0136dd67a9de6c3c74 100644 (file)
@@ -1558,7 +1558,7 @@ static void destroy_device_list(struct f2fs_sb_info *sbi)
 
        for (i = 0; i < sbi->s_ndevs; i++) {
                if (i > 0)
-                       bdev_release(FDEV(i).bdev_handle);
+                       fput(FDEV(i).bdev_file);
 #ifdef CONFIG_BLK_DEV_ZONED
                kvfree(FDEV(i).blkz_seq);
 #endif
@@ -2706,7 +2706,7 @@ int f2fs_dquot_initialize(struct inode *inode)
        return dquot_initialize(inode);
 }
 
-static struct dquot **f2fs_get_dquots(struct inode *inode)
+static struct dquot __rcu **f2fs_get_dquots(struct inode *inode)
 {
        return F2FS_I(inode)->i_dquot;
 }
@@ -4183,7 +4183,7 @@ static int f2fs_scan_devices(struct f2fs_sb_info *sbi)
 
        for (i = 0; i < max_devices; i++) {
                if (i == 0)
-                       FDEV(0).bdev_handle = sbi->sb->s_bdev_handle;
+                       FDEV(0).bdev_file = sbi->sb->s_bdev_file;
                else if (!RDEV(i).path[0])
                        break;
 
@@ -4203,14 +4203,14 @@ static int f2fs_scan_devices(struct f2fs_sb_info *sbi)
                                FDEV(i).end_blk = FDEV(i).start_blk +
                                                SEGS_TO_BLKS(sbi,
                                                FDEV(i).total_segments) - 1;
-                               FDEV(i).bdev_handle = bdev_open_by_path(
+                               FDEV(i).bdev_file = bdev_file_open_by_path(
                                        FDEV(i).path, mode, sbi->sb, NULL);
                        }
                }
-               if (IS_ERR(FDEV(i).bdev_handle))
-                       return PTR_ERR(FDEV(i).bdev_handle);
+               if (IS_ERR(FDEV(i).bdev_file))
+                       return PTR_ERR(FDEV(i).bdev_file);
 
-               FDEV(i).bdev = FDEV(i).bdev_handle->bdev;
+               FDEV(i).bdev = file_bdev(FDEV(i).bdev_file);
                /* to release errored devices */
                sbi->s_ndevs = i + 1;
 
@@ -4430,7 +4430,7 @@ try_onemore:
        sb->s_time_gran = 1;
        sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
                (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0);
-       memcpy(&sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid));
+       super_set_uuid(sb, (void *) raw_super->uuid, sizeof(raw_super->uuid));
        sb->s_iflags |= SB_I_CGROUPWB;
 
        /* init f2fs-specific super block info */
@@ -4581,6 +4581,7 @@ try_onemore:
                goto free_node_inode;
        }
 
+       generic_set_sb_d_ops(sb);
        sb->s_root = d_make_root(root); /* allocate root dentry */
        if (!sb->s_root) {
                err = -ENOMEM;