]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
reiserfs: Make cancel_old_flush() reliable
authorJan Kara <jack@suse.cz>
Wed, 5 Apr 2017 12:09:48 +0000 (14:09 +0200)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:33:44 +0000 (21:33 -0400)
commit75d990b6a345354c237dfad13d17e6623cb83c28
treee2d3b2a950c89ec9992b33664ade9d537abe35a5
parente042f4678ddd6cb694ed7ea132cb27fed3c22fb4
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>
fs/reiserfs/journal.c
fs/reiserfs/reiserfs.h
fs/reiserfs/super.c