reiserfs: Make cancel_old_flush() reliable
authorJan Kara <jack@suse.cz>
Wed, 5 Apr 2017 12:09:48 +0000 (14:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 08:17:47 +0000 (09:17 +0100)
commit304c1e93c0206bd62ba828824ec0e09b79a2e05f
tree81a03ee7981f639d958113615d7f649b68a4b3bd
parent7322cf6294aa867a86926b7441105e938c6f26b3
reiserfs: Make cancel_old_flush() reliable

[ Upstream commit 71b0576bdb862e964a82c73327cdd1a249c53e67 ]

Currently canceling of delayed work that flushes old data using
cancel_old_flush() does not prevent work from being requeued. Thus
in theory new work can be queued after cancel_old_flush() from
reiserfs_freeze() has run. This will become larger problem once
flush_old_commits() can requeue the work itself.

Fix the problem by recording in sbi->work_queue that flushing work is
canceled and should not be requeued.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/reiserfs/journal.c
fs/reiserfs/reiserfs.h
fs/reiserfs/super.c