Skip to content

Commit 6b604c9

Browse files
fdmananakdave
authored andcommitted
btrfs: remove pointless empty list check when reading delayed dir indexes
At btrfs_readdir_delayed_dir_index(), called when reading a directory, we have this check for an empty list to return immediately, but it's not needed since list_for_each_entry_safe(), called immediately after, is prepared to deal with an empty list, it simply does nothing. So remove the empty list check. Besides shorter source code, it also slightly reduces the binary text size: Before this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1609408 167269 16864 1793541 1b5e05 fs/btrfs/btrfs.ko After this change: $ size fs/btrfs/btrfs.ko text data bss dec hex filename 1609392 167269 16864 1793525 1b5df5 fs/btrfs/btrfs.ko Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 67bc5ad commit 6b604c9

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

fs/btrfs/delayed-inode.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,9 +1736,6 @@ int btrfs_readdir_delayed_dir_index(struct dir_context *ctx,
17361736
int over = 0;
17371737
unsigned char d_type;
17381738

1739-
if (list_empty(ins_list))
1740-
return 0;
1741-
17421739
/*
17431740
* Changing the data of the delayed item is impossible. So
17441741
* we needn't lock them. And we have held i_mutex of the

0 commit comments

Comments
 (0)