mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-28 16:53:49 +00:00
gfs2: gfs2_freeze_unlock cleanup
Function gfs2_freeze_unlock() is always called with &sdp->sd_freeze_gh as its argument, so clean up the code by passing in sdp instead. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
1e86044402
commit
fcd63086bc
@ -1289,7 +1289,7 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
|
||||
error = gfs2_make_fs_rw(sdp);
|
||||
|
||||
if (error) {
|
||||
gfs2_freeze_unlock(&sdp->sd_freeze_gh);
|
||||
gfs2_freeze_unlock(sdp);
|
||||
gfs2_destroy_threads(sdp);
|
||||
fs_err(sdp, "can't make FS RW: %d\n", error);
|
||||
goto fail_per_node;
|
||||
|
@ -358,7 +358,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp)
|
||||
list_add(&lfcc->list, &list);
|
||||
}
|
||||
|
||||
gfs2_freeze_unlock(&sdp->sd_freeze_gh);
|
||||
gfs2_freeze_unlock(sdp);
|
||||
|
||||
error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_EXCLUSIVE,
|
||||
LM_FLAG_NOEXP | GL_NOPID,
|
||||
@ -382,7 +382,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp)
|
||||
if (!error)
|
||||
goto out; /* success */
|
||||
|
||||
gfs2_freeze_unlock(&sdp->sd_freeze_gh);
|
||||
gfs2_freeze_unlock(sdp);
|
||||
|
||||
relock_shared:
|
||||
error2 = gfs2_freeze_lock_shared(sdp);
|
||||
@ -621,7 +621,7 @@ static void gfs2_put_super(struct super_block *sb)
|
||||
|
||||
/* Release stuff */
|
||||
|
||||
gfs2_freeze_unlock(&sdp->sd_freeze_gh);
|
||||
gfs2_freeze_unlock(sdp);
|
||||
|
||||
iput(sdp->sd_jindex);
|
||||
iput(sdp->sd_statfs_inode);
|
||||
@ -707,7 +707,7 @@ void gfs2_freeze_func(struct work_struct *work)
|
||||
if (error)
|
||||
goto freeze_failed;
|
||||
|
||||
gfs2_freeze_unlock(&sdp->sd_freeze_gh);
|
||||
gfs2_freeze_unlock(sdp);
|
||||
set_bit(SDF_FROZEN, &sdp->sd_flags);
|
||||
|
||||
error = gfs2_do_thaw(sdp);
|
||||
@ -812,7 +812,7 @@ static int gfs2_thaw_super(struct super_block *sb, enum freeze_holder who)
|
||||
}
|
||||
|
||||
atomic_inc(&sb->s_active);
|
||||
gfs2_freeze_unlock(&sdp->sd_freeze_gh);
|
||||
gfs2_freeze_unlock(sdp);
|
||||
|
||||
error = gfs2_do_thaw(sdp);
|
||||
|
||||
@ -833,7 +833,7 @@ void gfs2_thaw_freeze_initiator(struct super_block *sb)
|
||||
if (!test_bit(SDF_FREEZE_INITIATOR, &sdp->sd_flags))
|
||||
goto out;
|
||||
|
||||
gfs2_freeze_unlock(&sdp->sd_freeze_gh);
|
||||
gfs2_freeze_unlock(sdp);
|
||||
|
||||
out:
|
||||
mutex_unlock(&sdp->sd_freeze_mutex);
|
||||
|
@ -109,10 +109,10 @@ int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp)
|
||||
return error;
|
||||
}
|
||||
|
||||
void gfs2_freeze_unlock(struct gfs2_holder *freeze_gh)
|
||||
void gfs2_freeze_unlock(struct gfs2_sbd *sdp)
|
||||
{
|
||||
if (gfs2_holder_initialized(freeze_gh))
|
||||
gfs2_glock_dq_uninit(freeze_gh);
|
||||
if (gfs2_holder_initialized(&sdp->sd_freeze_gh))
|
||||
gfs2_glock_dq_uninit(&sdp->sd_freeze_gh);
|
||||
}
|
||||
|
||||
static void signal_our_withdraw(struct gfs2_sbd *sdp)
|
||||
|
@ -150,7 +150,7 @@ int gfs2_io_error_i(struct gfs2_sbd *sdp, const char *function,
|
||||
int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
|
||||
bool verbose);
|
||||
int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp);
|
||||
void gfs2_freeze_unlock(struct gfs2_holder *freeze_gh);
|
||||
void gfs2_freeze_unlock(struct gfs2_sbd *sdp);
|
||||
|
||||
#define gfs2_io_error(sdp) \
|
||||
gfs2_io_error_i((sdp), __func__, __FILE__, __LINE__)
|
||||
|
Loading…
Reference in New Issue
Block a user