diff options
| author | 2025-06-20 16:50:31 +0100 | |
|---|---|---|
| committer | 2025-07-21 23:58:04 +0200 | |
| commit | 9f82a4ed34d870b5719f9b95f7da4f74d3325a6f (patch) | |
| tree | 89b54f6c9194d67063f6f0e4a1f4895317949561 /fs/btrfs/inode.c | |
| parent | btrfs: use our message helpers instead of pr_err/pr_warn/pr_info (diff) | |
| download | wireguard-linux-9f82a4ed34d870b5719f9b95f7da4f74d3325a6f.tar.xz wireguard-linux-9f82a4ed34d870b5719f9b95f7da4f74d3325a6f.zip | |
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.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
| -rw-r--r-- | fs/btrfs/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 12141348236d..f8e4651fe60b 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4759,8 +4759,7 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) goto out; /* now the directory is empty */ - ret = btrfs_unlink_inode(trans, BTRFS_I(dir), BTRFS_I(d_inode(dentry)), - &fname.disk_name); + ret = btrfs_unlink_inode(trans, BTRFS_I(dir), BTRFS_I(inode), &fname.disk_name); if (!ret) btrfs_i_size_write(BTRFS_I(inode), 0); out: |
