ext4: ensure enough credits in ext4_ext_shift_path_extents
authoryangerkun <yangerkun@huawei.com>
Fri, 3 Sep 2021 06:27:47 +0000 (14:27 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 4 Nov 2021 14:33:24 +0000 (10:33 -0400)
commit4268496e48dc681cfa53b92357314b5d7221e625
tree9555de6295999618a082df18d6c8a72d64cf988f
parent83c5688b8977b1cd495a05ca0455e4353c8f6655
ext4: ensure enough credits in ext4_ext_shift_path_extents

Like ext4_ext_rm_leaf, we can ensure that there are enough credits
before every call that will consume credits.  As part of this fix we
fold the functionality of ext4_access_path() into
ext4_ext_shift_path_extents().  This change is needed as a preparation
for the next bugfix patch.

Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20210903062748.4118886-3-yangerkun@huawei.com
Signed-off-by: yangerkun <yangerkun@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c