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>
This commit is contained in:
Andreas Gruenbacher 2022-11-28 02:30:35 +01:00
parent 5432af15f8
commit 6c7410f449
4 changed files with 7 additions and 12 deletions

View File

@ -1267,7 +1267,7 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
} }
} }
error = gfs2_freeze_lock_shared(sdp, &sdp->sd_freeze_gh, 0); error = gfs2_freeze_lock_shared(sdp);
if (error) if (error)
goto fail_per_node; goto fail_per_node;

View File

@ -381,7 +381,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp)
gfs2_freeze_unlock(&sdp->sd_freeze_gh); gfs2_freeze_unlock(&sdp->sd_freeze_gh);
relock_shared: relock_shared:
error2 = gfs2_freeze_lock_shared(sdp, &sdp->sd_freeze_gh, 0); error2 = gfs2_freeze_lock_shared(sdp);
gfs2_assert_withdraw(sdp, !error2); gfs2_assert_withdraw(sdp, !error2);
out: out:
@ -709,7 +709,7 @@ static int gfs2_do_thaw(struct gfs2_sbd *sdp)
struct super_block *sb = sdp->sd_vfs; struct super_block *sb = sdp->sd_vfs;
int error; int error;
error = gfs2_freeze_lock_shared(sdp, &sdp->sd_freeze_gh, 0); error = gfs2_freeze_lock_shared(sdp);
if (error) if (error)
goto fail; goto fail;
error = thaw_super(sb); error = thaw_super(sb);

View File

@ -95,17 +95,14 @@ out_unlock:
/** /**
* gfs2_freeze_lock_shared - hold the freeze glock * gfs2_freeze_lock_shared - hold the freeze glock
* @sdp: the superblock * @sdp: the superblock
* @freeze_gh: pointer to the requested holder
* @caller_flags: any additional flags needed by the caller
*/ */
int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh, int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp)
int caller_flags)
{ {
int flags = LM_FLAG_NOEXP | GL_EXACT | caller_flags; int flags = LM_FLAG_NOEXP | GL_EXACT;
int error; int error;
error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, flags, error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, flags,
freeze_gh); &sdp->sd_freeze_gh);
if (error && error != GLR_TRYFAILED) if (error && error != GLR_TRYFAILED)
fs_err(sdp, "can't lock the freeze glock: %d\n", error); fs_err(sdp, "can't lock the freeze glock: %d\n", error);
return error; return error;

View File

@ -149,9 +149,7 @@ int gfs2_io_error_i(struct gfs2_sbd *sdp, const char *function,
extern int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd, extern int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
bool verbose); bool verbose);
extern int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp, extern int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp);
struct gfs2_holder *freeze_gh,
int caller_flags);
extern void gfs2_freeze_unlock(struct gfs2_holder *freeze_gh); extern void gfs2_freeze_unlock(struct gfs2_holder *freeze_gh);
#define gfs2_io_error(sdp) \ #define gfs2_io_error(sdp) \