|
@@ -320,7 +320,7 @@ static int btrfs_ioctl_getversion(struct file *file, int __user *arg)
|
|
|
|
|
|
static noinline int btrfs_ioctl_fitrim(struct file *file, void __user *arg)
|
|
|
{
|
|
|
- struct btrfs_fs_info *fs_info = btrfs_sb(fdentry(file)->d_sb);
|
|
|
+ struct btrfs_fs_info *fs_info = btrfs_sb(file_inode(file)->i_sb);
|
|
|
struct btrfs_device *device;
|
|
|
struct request_queue *q;
|
|
|
struct fstrim_range range;
|
|
@@ -2089,7 +2089,7 @@ static noinline int btrfs_ioctl_ino_lookup(struct file *file,
|
|
|
static noinline int btrfs_ioctl_snap_destroy(struct file *file,
|
|
|
void __user *arg)
|
|
|
{
|
|
|
- struct dentry *parent = fdentry(file);
|
|
|
+ struct dentry *parent = file->f_path.dentry;
|
|
|
struct dentry *dentry;
|
|
|
struct inode *dir = parent->d_inode;
|
|
|
struct inode *inode;
|
|
@@ -3105,7 +3105,7 @@ out:
|
|
|
static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
|
|
|
u64 off, u64 olen, u64 destoff)
|
|
|
{
|
|
|
- struct inode *inode = fdentry(file)->d_inode;
|
|
|
+ struct inode *inode = file_inode(file);
|
|
|
struct btrfs_root *root = BTRFS_I(inode)->root;
|
|
|
struct fd src_file;
|
|
|
struct inode *src;
|
|
@@ -4304,7 +4304,7 @@ static long btrfs_ioctl_quota_rescan_status(struct file *file, void __user *arg)
|
|
|
|
|
|
static long btrfs_ioctl_quota_rescan_wait(struct file *file, void __user *arg)
|
|
|
{
|
|
|
- struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root;
|
|
|
+ struct btrfs_root *root = BTRFS_I(file_inode(file))->root;
|
|
|
|
|
|
if (!capable(CAP_SYS_ADMIN))
|
|
|
return -EPERM;
|