]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/fs-ioctl.c
Update bcachefs sources to 841a95c29f4c bcachefs: fix userspace build errors
[bcachefs-tools-debian] / libbcachefs / fs-ioctl.c
index 561fc1da4e3a6b4a63a250d7aeb54db411cd40ac..8098a3a299d1c0e3fc1deea083b7cee1621ef44e 100644 (file)
@@ -333,10 +333,6 @@ static long __bch2_ioctl_subvolume_create(struct bch_fs *c, struct file *filp,
             (arg.flags & BCH_SUBVOL_SNAPSHOT_RO)))
                return -EINVAL;
 
-       if ((arg.flags & BCH_SUBVOL_SNAPSHOT_CREATE) &&
-           !arg.src_ptr)
-               return -EOPNOTSUPP;
-
        if (arg.flags & BCH_SUBVOL_SNAPSHOT_CREATE)
                create_flags |= BCH_CREATE_SNAPSHOT;
 
@@ -409,7 +405,7 @@ retry:
 
        if ((arg.flags & BCH_SUBVOL_SNAPSHOT_CREATE) &&
            !arg.src_ptr)
-               snapshot_src.subvol = to_bch_ei(dir)->ei_inode.bi_subvol;
+               snapshot_src.subvol = inode_inum(to_bch_ei(dir)).subvol;
 
        inode = __bch2_create(file_mnt_idmap(filp), to_bch_ei(dir),
                              dst_dentry, arg.mode|S_IFDIR,