Skip to content

Commit e95e920

Browse files
author
Andreas Gruenbacher
committed
gfs2: Remove duplicate check in do_xmote
JIRA: https://issues.redhat.com/browse/RHEL-116886 Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git In do_xmote(), remove the duplicate check for the ->go_sync and ->go_inval glock operations. They are either both defined, or none of them are. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> (cherry picked from commit 9b54770)
1 parent 5155682 commit e95e920

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

fs/gfs2/glock.c

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -715,25 +715,24 @@ __acquires(&gl->gl_lockref.lock)
715715
&gl->gl_flags))
716716
return;
717717
}
718-
if (!glops->go_inval && !glops->go_sync)
718+
if (!glops->go_inval || !glops->go_sync)
719719
goto skip_inval;
720720

721721
spin_unlock(&gl->gl_lockref.lock);
722-
if (glops->go_sync) {
723-
ret = glops->go_sync(gl);
724-
/* If we had a problem syncing (due to io errors or whatever,
725-
* we should not invalidate the metadata or tell dlm to
726-
* release the glock to other nodes.
727-
*/
728-
if (ret) {
729-
if (cmpxchg(&sdp->sd_log_error, 0, ret)) {
730-
fs_err(sdp, "Error %d syncing glock\n", ret);
731-
gfs2_dump_glock(NULL, gl, true);
732-
}
733-
spin_lock(&gl->gl_lockref.lock);
734-
goto skip_inval;
722+
ret = glops->go_sync(gl);
723+
/* If we had a problem syncing (due to io errors or whatever,
724+
* we should not invalidate the metadata or tell dlm to
725+
* release the glock to other nodes.
726+
*/
727+
if (ret) {
728+
if (cmpxchg(&sdp->sd_log_error, 0, ret)) {
729+
fs_err(sdp, "Error %d syncing glock\n", ret);
730+
gfs2_dump_glock(NULL, gl, true);
735731
}
732+
spin_lock(&gl->gl_lockref.lock);
733+
goto skip_inval;
736734
}
735+
737736
if (test_bit(GLF_INVALIDATE_IN_PROGRESS, &gl->gl_flags)) {
738737
/*
739738
* The call to go_sync should have cleared out the ail list.

0 commit comments

Comments
 (0)