]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: use handle to mark fc as ineligible in __track_dentry_update()
authorLuis Henriques (SUSE) <luis.henriques@linux.dev>
Mon, 23 Sep 2024 10:49:08 +0000 (11:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:38 +0000 (15:11 +0200)
commitb4eff7c777dfddcdd76c58136a8df318641228cb
tree240f99952136dedd6e78b2043d206e0e8a5ebb72
parent4e66fc1d8c2b5a098393fbecc4608778fd9f76b2
ext4: use handle to mark fc as ineligible in __track_dentry_update()

commit faab35a0370fd6e0821c7a8dd213492946fc776f upstream.

Calling ext4_fc_mark_ineligible() with a NULL handle is racy and may result
in a fast-commit being done before the filesystem is effectively marked as
ineligible.  This patch fixes the calls to this function in
__track_dentry_update() by adding an extra parameter to the callback used in
ext4_fc_track_template().

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Luis Henriques (SUSE) <luis.henriques@linux.dev>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240923104909.18342-2-luis.henriques@linux.dev
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/fast_commit.c