]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Add common helper for holding and releasing the freeze glock
authorBob Peterson <rpeterso@redhat.com>
Tue, 22 Dec 2020 20:43:27 +0000 (14:43 -0600)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 22 Dec 2020 23:54:13 +0000 (00:54 +0100)
commit7f18000dbc6dbeb9a351c7051f6a4728671185cb
tree6d2f1b674d4bbfd0cad49d0c68d4d5e8b6a36465
parent3d6e5000e52fb00c1c7a308f8f0fe32aa8e8f546
gfs2: Add common helper for holding and releasing the freeze glock

Many places in the gfs2 code queued and dequeued the freeze glock.
Almost all of them acquire it in SHARED mode, and need to specify the
same LM_FLAG_NOEXP and GL_EXACT flags.

This patch adds common helper functions gfs2_freeze_lock and gfs2_freeze_unlock
to make the code more readable, and to prepare for the next patch.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/ops_fstype.c
fs/gfs2/recovery.c
fs/gfs2/super.c
fs/gfs2/util.c
fs/gfs2/util.h