diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-23 18:35:36 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-23 18:35:36 +0200 |
commit | f8ffbc365f703d74ecca8ca787318d05bbee2bf7 (patch) | |
tree | cdb3e023473e02a186b39fe541eb719ed2ffcb7f /fs/btrfs/ioctl.c | |
parent | mm: fix build on 32-bit targets without MAX_PHYSMEM_BITS (diff) | |
parent | add struct fd constructors, get rid of __to_fd() (diff) | |
download | linux-f8ffbc365f703d74ecca8ca787318d05bbee2bf7.tar.xz linux-f8ffbc365f703d74ecca8ca787318d05bbee2bf7.zip |
Merge tag 'pull-stable-struct_fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull 'struct fd' updates from Al Viro:
"Just the 'struct fd' layout change, with conversion to accessor
helpers"
* tag 'pull-stable-struct_fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
add struct fd constructors, get rid of __to_fd()
struct fd: representation change
introduce fd_file(), convert all accessors to it.
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 8537eb9b5531..226c91fe31a7 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1310,12 +1310,12 @@ static noinline int __btrfs_ioctl_snap_create(struct file *file, } else { struct fd src = fdget(fd); struct inode *src_inode; - if (!src.file) { + if (!fd_file(src)) { ret = -EINVAL; goto out_drop_write; } - src_inode = file_inode(src.file); + src_inode = file_inode(fd_file(src)); if (src_inode->i_sb != file_inode(file)->i_sb) { btrfs_info(BTRFS_I(file_inode(file))->root->fs_info, "Snapshot src from another FS"); |