summaryrefslogtreecommitdiff
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r--fs/btrfs/send.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index bf232c88a0bf..c8ca49b1bb4d 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -1993,7 +1993,7 @@ static int open_cur_inode_file(struct send_ctx *sctx)
{
int ret = 0;
struct btrfs_key key;
- struct vfsmount *mnt;
+ struct path path;
struct inode *inode;
struct dentry *dentry;
struct file *filp;
@@ -2020,10 +2020,11 @@ static int open_cur_inode_file(struct send_ctx *sctx)
goto out;
}
- mnt = mntget(sctx->mnt);
- filp = dentry_open(dentry, mnt, O_RDONLY | O_LARGEFILE, current_cred());
+ path.mnt = sctx->mnt;
+ path.dentry = dentry;
+ filp = dentry_open(&path, O_RDONLY | O_LARGEFILE, current_cred());
+ dput(dentry);
dentry = NULL;
- mnt = NULL;
if (IS_ERR(filp)) {
ret = PTR_ERR(filp);
goto out;