gfs2: Withdraw in gfs2_ail1_flush if write_cache_pages fails
authorBob Peterson <rpeterso@redhat.com>
Wed, 13 Nov 2019 19:53:42 +0000 (13:53 -0600)
committerBob Peterson <rpeterso@redhat.com>
Thu, 27 Feb 2020 13:53:18 +0000 (07:53 -0600)
commitb1676cbb11153b5bf4dd9e6c99869b284fb8160e
tree3b251c62d5d8b780319d7004d50d453bf730f0d9
parent9ff78289356af640941bbb0dd3f46af2063f0046
gfs2: Withdraw in gfs2_ail1_flush if write_cache_pages fails

Before this patch, function gfs2_ail1_start_one would return any
errors it received from write_cache_pages (except -EBUSY) but it did
not withdraw. Since function gfs2_ail1_flush just checks for the bad
return code and loops, the loop might potentially never end.
This patch adds some logic to allow it to exit the loop and withdraw
properly when errors are received from write_cache_pages.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/log.c