mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
btrfs: pass struct to btrfs_ioctl_subvol_getflags()
Pass a struct btrfs_inode to btrfs_ioctl_subvol_getflags() as it's an internal interface, allowing to remove some use of BTRFS_I. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
f6c2ccfc3b
commit
f272c004d2
|
|
@ -1337,15 +1337,15 @@ static noinline int btrfs_ioctl_snap_create_v2(struct file *file,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static noinline int btrfs_ioctl_subvol_getflags(struct inode *inode,
|
||||
static noinline int btrfs_ioctl_subvol_getflags(struct btrfs_inode *inode,
|
||||
void __user *arg)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = inode_to_fs_info(inode);
|
||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||
struct btrfs_root *root = inode->root;
|
||||
struct btrfs_fs_info *fs_info = root->fs_info;
|
||||
int ret = 0;
|
||||
u64 flags = 0;
|
||||
|
||||
if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FIRST_FREE_OBJECTID)
|
||||
if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID)
|
||||
return -EINVAL;
|
||||
|
||||
down_read(&fs_info->subvol_sem);
|
||||
|
|
@ -5243,7 +5243,7 @@ long btrfs_ioctl(struct file *file, unsigned int
|
|||
case BTRFS_IOC_SNAP_DESTROY_V2:
|
||||
return btrfs_ioctl_snap_destroy(file, argp, true);
|
||||
case BTRFS_IOC_SUBVOL_GETFLAGS:
|
||||
return btrfs_ioctl_subvol_getflags(inode, argp);
|
||||
return btrfs_ioctl_subvol_getflags(BTRFS_I(inode), argp);
|
||||
case BTRFS_IOC_SUBVOL_SETFLAGS:
|
||||
return btrfs_ioctl_subvol_setflags(file, argp);
|
||||
case BTRFS_IOC_DEFAULT_SUBVOL:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user