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>
This commit is contained in:
committed by
David Sterba
parent
6f7d81d88b
commit
37b0c3150b
@@ -7146,8 +7146,6 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
|
||||
|
||||
if (log_dentries)
|
||||
ret = log_new_dir_dentries(trans, inode, ctx);
|
||||
else
|
||||
ret = 0;
|
||||
end_trans:
|
||||
if (ret < 0) {
|
||||
btrfs_set_log_full_commit(trans);
|
||||
|
||||
Reference in New Issue
Block a user