diff options
Diffstat (limited to 'fs/gfs2/sys.c')
| -rw-r--r-- | fs/gfs2/sys.c | 20 | 
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index aa5c4804496..3ab566ba569 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -7,6 +7,8 @@   * of the GNU General Public License version 2.   */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +  #include <linux/sched.h>  #include <linux/spinlock.h>  #include <linux/completion.h> @@ -138,9 +140,8 @@ static ssize_t withdraw_store(struct gfs2_sbd *sdp, const char *buf, size_t len)  	if (simple_strtol(buf, NULL, 0) != 1)  		return -EINVAL; -	gfs2_lm_withdraw(sdp, -		"GFS2: fsid=%s: withdrawing from cluster at user's request\n", -		sdp->sd_fsname); +	gfs2_lm_withdraw(sdp, "withdrawing from cluster at user's request\n"); +  	return len;  } @@ -239,8 +240,8 @@ static ssize_t demote_rq_store(struct gfs2_sbd *sdp, const char *buf, size_t len  	if (gltype > LM_TYPE_JOURNAL)  		return -EINVAL; -	if (gltype == LM_TYPE_NONDISK && glnum == GFS2_TRANS_LOCK) -		glops = &gfs2_trans_glops; +	if (gltype == LM_TYPE_NONDISK && glnum == GFS2_FREEZE_LOCK) +		glops = &gfs2_freeze_glops;  	else  		glops = gfs2_glops_list[gltype];  	if (glops == NULL) @@ -332,7 +333,7 @@ static ssize_t block_store(struct gfs2_sbd *sdp, const char *buf, size_t len)  		set_bit(DFL_BLOCK_LOCKS, &ls->ls_recover_flags);  	else if (val == 0) {  		clear_bit(DFL_BLOCK_LOCKS, &ls->ls_recover_flags); -		smp_mb__after_clear_bit(); +		smp_mb__after_atomic();  		gfs2_glock_thaw(sdp);  	} else {  		ret = -EINVAL; @@ -406,6 +407,9 @@ int gfs2_recover_set(struct gfs2_sbd *sdp, unsigned jid)  	struct gfs2_jdesc *jd;  	int rv; +	/* Wait for our primary journal to be initialized */ +	wait_for_completion(&sdp->sd_journal_ready); +  	spin_lock(&sdp->sd_jindex_spin);  	rv = -EBUSY;  	if (sdp->sd_jdesc->jd_jid == jid) @@ -481,7 +485,7 @@ static ssize_t jid_store(struct gfs2_sbd *sdp, const char *buf, size_t len)  		rv = jid = -EINVAL;  	sdp->sd_lockstruct.ls_jid = jid;  	clear_bit(SDF_NOJOURNALID, &sdp->sd_flags); -	smp_mb__after_clear_bit(); +	smp_mb__after_atomic();  	wake_up_bit(&sdp->sd_flags, SDF_NOJOURNALID);  out:  	spin_unlock(&sdp->sd_jindex_spin); @@ -587,7 +591,6 @@ TUNE_ATTR(max_readahead, 0);  TUNE_ATTR(complain_secs, 0);  TUNE_ATTR(statfs_slow, 0);  TUNE_ATTR(new_files_jdata, 0); -TUNE_ATTR(quota_simul_sync, 1);  TUNE_ATTR(statfs_quantum, 1);  TUNE_ATTR_3(quota_scale, quota_scale_show, quota_scale_store); @@ -597,7 +600,6 @@ static struct attribute *tune_attrs[] = {  	&tune_attr_max_readahead.attr,  	&tune_attr_complain_secs.attr,  	&tune_attr_statfs_slow.attr, -	&tune_attr_quota_simul_sync.attr,  	&tune_attr_statfs_quantum.attr,  	&tune_attr_quota_scale.attr,  	&tune_attr_new_files_jdata.attr,  | 
