]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
gfs2: Fix duplicate should_fault_in_pages() call
authorBob Peterson <rpeterso@redhat.com>
Mon, 12 Jun 2023 17:26:23 +0000 (12:26 -0500)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Mon, 2 Oct 2023 15:19:57 +0000 (17:19 +0200)
commit7443828b501c2d8d1af1992d71691275b4558c63
treedc095e66139adab506c2e53d90ea344b012cd17c
parentf86652437a42d841e7269d2acbab5bc938caf233
gfs2: Fix duplicate should_fault_in_pages() call

BugLink: https://bugs.launchpad.net/bugs/2034469
[ Upstream commit c8ed1b35931245087968fd95b2ec3dfc50f77769 ]

In gfs2_file_buffered_write(), we currently jump from the second call of
function should_fault_in_pages() to above the first call, so
should_fault_in_pages() is getting called twice in a row, causing it to
accidentally fall back to single-page writes rather than trying the more
efficient multi-page writes first.

Fix that by moving the retry label to the correct place, behind the
first call to should_fault_in_pages().

Fixes: e1fa9ea85ce8 ("gfs2: Stop using glock holder auto-demotion for now")
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/gfs2/file.c