Skip to content

Commit 37b0c31

Browse files
fdmananakdave
authored andcommitted
btrfs: remove redundant else statement from btrfs_log_inode_parent()
If we don't need to log new directory dentries, there's no point in having an else branch just to set 'ret' to zero, as it's already zero because every time it gets a non-zero value we jump into one of the exit labels. So remove it, which reduces source code size and the module text size. Before this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1813855 163737 16920 1994512 1e6f10 fs/btrfs/btrfs.ko After this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1813807 163737 16920 1994464 1e6ee0 fs/btrfs/btrfs.ko Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 6f7d81d commit 37b0c31

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/btrfs/tree-log.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7146,8 +7146,6 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
71467146

71477147
if (log_dentries)
71487148
ret = log_new_dir_dentries(trans, inode, ctx);
7149-
else
7150-
ret = 0;
71517149
end_trans:
71527150
if (ret < 0) {
71537151
btrfs_set_log_full_commit(trans);

0 commit comments

Comments
 (0)