ext4: optimize ext4_ext_precache for 0 depth
authorRitesh Harjani <riteshh@linux.ibm.com>
Fri, 28 Feb 2020 09:26:55 +0000 (14:56 +0530)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 14 Mar 2020 18:43:12 +0000 (14:43 -0400)
commit2f424a5a09a506e1a6ad432e50bca3000a767d5a
tree8b62c291f6306576bfa7d3dcf0a1c9fa5713f9ec
parent6386722a329824e005c3fd1b4a8cc37db367c76a
ext4: optimize ext4_ext_precache for 0 depth

This patch avoids the memory alloc & free path when depth is 0,
since anyway there is no extra caching done in that case.
So on checking depth 0, simply return early.

Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/93da0d0f073c73358e85bb9849d8a5378d1da539.1582880246.git.riteshh@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c