Skip to content

Commit 6c7410f

Browse files
author
Andreas Gruenbacher
committed
gfs2: gfs2_freeze_lock_shared cleanup
All the remaining users of gfs2_freeze_lock_shared() set freeze_gh to &sdp->sd_freeze_gh and flags to 0, so remove those two parameters. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 5432af1 commit 6c7410f

4 files changed

Lines changed: 7 additions & 12 deletions

File tree

fs/gfs2/ops_fstype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
12671267
}
12681268
}
12691269

1270-
error = gfs2_freeze_lock_shared(sdp, &sdp->sd_freeze_gh, 0);
1270+
error = gfs2_freeze_lock_shared(sdp);
12711271
if (error)
12721272
goto fail_per_node;
12731273

fs/gfs2/super.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp)
381381
gfs2_freeze_unlock(&sdp->sd_freeze_gh);
382382

383383
relock_shared:
384-
error2 = gfs2_freeze_lock_shared(sdp, &sdp->sd_freeze_gh, 0);
384+
error2 = gfs2_freeze_lock_shared(sdp);
385385
gfs2_assert_withdraw(sdp, !error2);
386386

387387
out:
@@ -709,7 +709,7 @@ static int gfs2_do_thaw(struct gfs2_sbd *sdp)
709709
struct super_block *sb = sdp->sd_vfs;
710710
int error;
711711

712-
error = gfs2_freeze_lock_shared(sdp, &sdp->sd_freeze_gh, 0);
712+
error = gfs2_freeze_lock_shared(sdp);
713713
if (error)
714714
goto fail;
715715
error = thaw_super(sb);

fs/gfs2/util.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,14 @@ int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
9595
/**
9696
* gfs2_freeze_lock_shared - hold the freeze glock
9797
* @sdp: the superblock
98-
* @freeze_gh: pointer to the requested holder
99-
* @caller_flags: any additional flags needed by the caller
10098
*/
101-
int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh,
102-
int caller_flags)
99+
int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp)
103100
{
104-
int flags = LM_FLAG_NOEXP | GL_EXACT | caller_flags;
101+
int flags = LM_FLAG_NOEXP | GL_EXACT;
105102
int error;
106103

107104
error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, flags,
108-
freeze_gh);
105+
&sdp->sd_freeze_gh);
109106
if (error && error != GLR_TRYFAILED)
110107
fs_err(sdp, "can't lock the freeze glock: %d\n", error);
111108
return error;

fs/gfs2/util.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ 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_shared(struct gfs2_sbd *sdp,
153-
struct gfs2_holder *freeze_gh,
154-
int caller_flags);
152+
extern int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp);
155153
extern void gfs2_freeze_unlock(struct gfs2_holder *freeze_gh);
156154

157155
#define gfs2_io_error(sdp) \

0 commit comments

Comments
 (0)