summaryrefslogtreecommitdiff
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorLv Ruyi <lv.ruyi@zte.com.cn>2022-04-11 06:22:52 +0300
committerDavid Sterba <dsterba@suse.com>2022-05-16 18:03:12 +0300
commit8aa1e49ea1fdcc585be4bcfe8c62684a087cc7c6 (patch)
tree2002f72f5c12d51ed9c13a1cdf2cb626adf5ac40 /fs/btrfs/tree-log.c
parentb027669449390ed549579f0a838c2de6a037dea6 (diff)
downloadlinux-8aa1e49ea1fdcc585be4bcfe8c62684a087cc7c6.tar.xz
btrfs: remove unnecessary check of iput argument
iput() already handles NULL and non-NULL parameter, so it is not needed to check that. This unifies all iput calls. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 0054bde86aea..370388fadf96 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -894,8 +894,7 @@ update_inode:
btrfs_update_inode_bytes(BTRFS_I(inode), nbytes, drop_args.bytes_found);
ret = btrfs_update_inode(trans, root, BTRFS_I(inode));
out:
- if (inode)
- iput(inode);
+ iput(inode);
return ret;
}