Commit e569b1d5 authored by David Sterba's avatar David Sterba

btrfs: pass btrfs_inode to __unlink_start_trans

The function is for internal interfaces so we should use the
btrfs_inode.
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 621af94a
...@@ -4415,9 +4415,9 @@ int btrfs_unlink_inode(struct btrfs_trans_handle *trans, ...@@ -4415,9 +4415,9 @@ int btrfs_unlink_inode(struct btrfs_trans_handle *trans,
* plenty of slack room in the global reserve to migrate, otherwise we cannot * plenty of slack room in the global reserve to migrate, otherwise we cannot
* allow the unlink to occur. * allow the unlink to occur.
*/ */
static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir) static struct btrfs_trans_handle *__unlink_start_trans(struct btrfs_inode *dir)
{ {
struct btrfs_root *root = BTRFS_I(dir)->root; struct btrfs_root *root = dir->root;
/* /*
* 1 for the possible orphan item * 1 for the possible orphan item
...@@ -4443,7 +4443,7 @@ static int btrfs_unlink(struct inode *dir, struct dentry *dentry) ...@@ -4443,7 +4443,7 @@ static int btrfs_unlink(struct inode *dir, struct dentry *dentry)
/* This needs to handle no-key deletions later on */ /* This needs to handle no-key deletions later on */
trans = __unlink_start_trans(dir); trans = __unlink_start_trans(BTRFS_I(dir));
if (IS_ERR(trans)) { if (IS_ERR(trans)) {
ret = PTR_ERR(trans); ret = PTR_ERR(trans);
goto fscrypt_free; goto fscrypt_free;
...@@ -4857,7 +4857,7 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -4857,7 +4857,7 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry)
/* This needs to handle no-key deletions later on */ /* This needs to handle no-key deletions later on */
trans = __unlink_start_trans(dir); trans = __unlink_start_trans(BTRFS_I(dir));
if (IS_ERR(trans)) { if (IS_ERR(trans)) {
err = PTR_ERR(trans); err = PTR_ERR(trans);
goto out_notrans; goto out_notrans;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment