Skip to content

Commit e392edd

Browse files
author
Andreas Gruenbacher
committed
gfs2: Rename gfs2_freeze_lock{ => _shared }
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>
1 parent 097cca5 commit e392edd

5 files changed

Lines changed: 12 additions & 11 deletions

File tree

fs/gfs2/ops_fstype.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
12691269
}
12701270
}
12711271

1272-
error = gfs2_freeze_lock(sdp, &freeze_gh, 0);
1272+
error = gfs2_freeze_lock_shared(sdp, &freeze_gh, 0);
12731273
if (error)
12741274
goto fail_per_node;
12751275

@@ -1592,7 +1592,7 @@ static int gfs2_reconfigure(struct fs_context *fc)
15921592
if ((sb->s_flags ^ fc->sb_flags) & SB_RDONLY) {
15931593
struct gfs2_holder freeze_gh;
15941594

1595-
error = gfs2_freeze_lock(sdp, &freeze_gh, 0);
1595+
error = gfs2_freeze_lock_shared(sdp, &freeze_gh, 0);
15961596
if (error)
15971597
return -EINVAL;
15981598

fs/gfs2/recovery.c

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

471471
/* Acquire a shared hold on the freeze glock */
472472

473-
error = gfs2_freeze_lock(sdp, &thaw_gh, LM_FLAG_PRIORITY);
473+
error = gfs2_freeze_lock_shared(sdp, &thaw_gh, LM_FLAG_PRIORITY);
474474
if (error)
475475
goto fail_gunlock_ji;
476476

fs/gfs2/super.c

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

679679
atomic_inc(&sb->s_active);
680-
error = gfs2_freeze_lock(sdp, &freeze_gh, 0);
680+
error = gfs2_freeze_lock_shared(sdp, &freeze_gh, 0);
681681
if (error) {
682682
gfs2_assert_withdraw(sdp, 0);
683683
} else {

fs/gfs2/util.c

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

9595
/**
96-
* gfs2_freeze_lock - hold the freeze glock
96+
* gfs2_freeze_lock_shared - hold the freeze glock
9797
* @sdp: the superblock
9898
* @freeze_gh: pointer to the requested holder
9999
* @caller_flags: any additional flags needed by the caller
100100
*/
101-
int gfs2_freeze_lock(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh,
102-
int caller_flags)
101+
int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh,
102+
int caller_flags)
103103
{
104104
int flags = LM_FLAG_NOEXP | GL_EXACT | caller_flags;
105105
int error;
@@ -157,8 +157,8 @@ static void signal_our_withdraw(struct gfs2_sbd *sdp)
157157
gfs2_holder_mark_uninitialized(&freeze_gh);
158158
if (sdp->sd_freeze_gl &&
159159
!gfs2_glock_is_locked_by_me(sdp->sd_freeze_gl)) {
160-
ret = gfs2_freeze_lock(sdp, &freeze_gh,
161-
log_write_allowed ? 0 : LM_FLAG_TRY);
160+
ret = gfs2_freeze_lock_shared(sdp, &freeze_gh,
161+
log_write_allowed ? 0 : LM_FLAG_TRY);
162162
if (ret == GLR_TRYFAILED)
163163
ret = 0;
164164
}

fs/gfs2/util.h

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

150150
extern int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
151151
bool verbose);
152-
extern int gfs2_freeze_lock(struct gfs2_sbd *sdp,
153-
struct gfs2_holder *freeze_gh, int caller_flags);
152+
extern int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp,
153+
struct gfs2_holder *freeze_gh,
154+
int caller_flags);
154155
extern void gfs2_freeze_unlock(struct gfs2_holder *freeze_gh);
155156

156157
#define gfs2_io_error(sdp) \

0 commit comments

Comments
 (0)