quota: fix livelock in dquot_writeback_dquots
authorDmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Thu, 31 Oct 2019 10:39:19 +0000 (10:39 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 19:35:19 +0000 (20:35 +0100)
commitf919b26fcbb88542c11799edaad84d034cd8adac
tree59fa9e39dbc6fc0e9057041a7df4737767e2c6f4
parent26eca105bceae8c9d49e5d4b2829220acb4ef676
quota: fix livelock in dquot_writeback_dquots

commit 6ff33d99fc5c96797103b48b7b0902c296f09c05 upstream.

Write only quotas which are dirty at entry.

XFSTEST: https://github.com/dmonakhov/xfstests/commit/b10ad23566a5bf75832a6f500e1236084083cddc

Link: https://lore.kernel.org/r/20191031103920.3919-1-dmonakhov@openvz.org
CC: stable@vger.kernel.org
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/quota/dquot.c