]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
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)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:32:30 +0000 (07:32 +0100)
commit37cfaa3f7b8940a92826b95e57725bf9bab43a6a
tree112871c02ca07cd82c5990307cd2f6e95ed9eaec
parentf1c9876189e785ee3bbb5c93ab2ca5a21a450a17
ext4: ensure enough credits in ext4_ext_shift_path_extents

BugLink: https://bugs.launchpad.net/bugs/1951822
commit 4268496e48dc681cfa53b92357314b5d7221e625 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/ext4/extents.c