Skip to content

Commit f1c787a

Browse files
committed
gfs2: Rename gfs2_freeze_lock{ => _shared }
jira LE-1907 Rebuild_History Non-Buildable kernel-4.18.0-477.27.1.el8_8 commit-author Andreas Gruenbacher <agruenba@redhat.com> commit e392edd Rename gfs2_freeze_lock to gfs2_freeze_lock_shared to make it a bit more obvious that this function establishes the "thawed" state of the freeze glock. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> (cherry picked from commit e392edd) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 6ecf2f0 commit f1c787a

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

fs/gfs2/ops_fstype.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
12441244
}
12451245
}
12461246

1247-
error = gfs2_freeze_lock(sdp, &freeze_gh, 0);
1247+
error = gfs2_freeze_lock_shared(sdp, &freeze_gh, 0);
12481248
if (error)
12491249
goto fail_per_node;
12501250

@@ -1566,7 +1566,7 @@ static int gfs2_reconfigure(struct fs_context *fc)
15661566
if ((sb->s_flags ^ fc->sb_flags) & SB_RDONLY) {
15671567
struct gfs2_holder freeze_gh;
15681568

1569-
error = gfs2_freeze_lock(sdp, &freeze_gh, 0);
1569+
error = gfs2_freeze_lock_shared(sdp, &freeze_gh, 0);
15701570
if (error)
15711571
return -EINVAL;
15721572

fs/gfs2/recovery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ void gfs2_recover_func(struct work_struct *work)
474474

475475
/* Acquire a shared hold on the freeze glock */
476476

477-
error = gfs2_freeze_lock(sdp, &thaw_gh, LM_FLAG_PRIORITY);
477+
error = gfs2_freeze_lock_shared(sdp, &thaw_gh, LM_FLAG_PRIORITY);
478478
if (error)
479479
goto fail_gunlock_ji;
480480

fs/gfs2/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ void gfs2_freeze_func(struct work_struct *work)
687687
struct super_block *sb = sdp->sd_vfs;
688688

689689
atomic_inc(&sb->s_active);
690-
error = gfs2_freeze_lock(sdp, &freeze_gh, 0);
690+
error = gfs2_freeze_lock_shared(sdp, &freeze_gh, 0);
691691
if (error) {
692692
gfs2_assert_withdraw(sdp, 0);
693693
} else {

fs/gfs2/util.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
9595
}
9696

9797
/**
98-
* gfs2_freeze_lock - hold the freeze glock
98+
* gfs2_freeze_lock_shared - hold the freeze glock
9999
* @sdp: the superblock
100100
* @freeze_gh: pointer to the requested holder
101101
* @caller_flags: any additional flags needed by the caller
102102
*/
103-
int gfs2_freeze_lock(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh,
104-
int caller_flags)
103+
int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh,
104+
int caller_flags)
105105
{
106106
int flags = LM_FLAG_NOEXP | GL_EXACT | caller_flags;
107107
int error;
@@ -158,8 +158,8 @@ static void signal_our_withdraw(struct gfs2_sbd *sdp)
158158
gfs2_holder_mark_uninitialized(&freeze_gh);
159159
if (sdp->sd_freeze_gl &&
160160
!gfs2_glock_is_locked_by_me(sdp->sd_freeze_gl)) {
161-
ret = gfs2_freeze_lock(sdp, &freeze_gh,
162-
log_write_allowed ? 0 : LM_FLAG_TRY);
161+
ret = gfs2_freeze_lock_shared(sdp, &freeze_gh,
162+
log_write_allowed ? 0 : LM_FLAG_TRY);
163163
if (ret == GLR_TRYFAILED)
164164
ret = 0;
165165
}

fs/gfs2/util.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ int gfs2_io_error_i(struct gfs2_sbd *sdp, const char *function,
152152

153153
extern int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
154154
bool verbose);
155-
extern int gfs2_freeze_lock(struct gfs2_sbd *sdp,
156-
struct gfs2_holder *freeze_gh, int caller_flags);
155+
extern int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp,
156+
struct gfs2_holder *freeze_gh,
157+
int caller_flags);
157158
extern void gfs2_freeze_unlock(struct gfs2_holder *freeze_gh);
158159

159160
#define gfs2_io_error(sdp) \

0 commit comments

Comments
 (0)