Skip to content

Commit fd97413

Browse files
fdmananakdave
authored andcommitted
btrfs: use inode already stored in local variable at btrfs_rmdir()
There's no need to call d_inode(dentry) when calling btrfs_unlink_inode() since we have already stored that in a local inode variable. So just use the local variable to make the code less verbose. Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 6607ce3 commit fd97413

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/btrfs/inode.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4759,8 +4759,7 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry)
47594759
goto out;
47604760

47614761
/* now the directory is empty */
4762-
ret = btrfs_unlink_inode(trans, BTRFS_I(dir), BTRFS_I(d_inode(dentry)),
4763-
&fname.disk_name);
4762+
ret = btrfs_unlink_inode(trans, BTRFS_I(dir), BTRFS_I(inode), &fname.disk_name);
47644763
if (!ret)
47654764
btrfs_i_size_write(BTRFS_I(inode), 0);
47664765
out:

0 commit comments

Comments
 (0)