diff options
author | Keith Packard <keithp@keithp.com> | 2011-07-22 13:40:42 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-07-22 13:40:42 -0700 |
commit | df7976797fa9af161690dbf4dee81ed92cdc150f (patch) | |
tree | be6f04706d91cc80da4dbd3a5f5f2a174f1bdae3 /fs/gfs2/sys.c | |
parent | f0b69efc29b024747a88ce020dada425e3193d5a (diff) | |
parent | 9c54c0dd948d715ccfd79e97d852f80eeb53254a (diff) | |
download | linux-df7976797fa9af161690dbf4dee81ed92cdc150f.tar.bz2 |
Merge branch 'drm-intel-fixes' into drm-intel-next
Diffstat (limited to 'fs/gfs2/sys.c')
-rw-r--r-- | fs/gfs2/sys.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index e20eab37bc80..443cabcfcd23 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -338,6 +338,9 @@ static ssize_t lkfirst_store(struct gfs2_sbd *sdp, const char *buf, size_t len) rv = sscanf(buf, "%u", &first); if (rv != 1 || first > 1) return -EINVAL; + rv = wait_for_completion_killable(&sdp->sd_locking_init); + if (rv) + return rv; spin_lock(&sdp->sd_jindex_spin); rv = -EBUSY; if (test_bit(SDF_NOJOURNALID, &sdp->sd_flags) == 0) @@ -414,7 +417,9 @@ static ssize_t jid_store(struct gfs2_sbd *sdp, const char *buf, size_t len) rv = sscanf(buf, "%d", &jid); if (rv != 1) return -EINVAL; - + rv = wait_for_completion_killable(&sdp->sd_locking_init); + if (rv) + return rv; spin_lock(&sdp->sd_jindex_spin); rv = -EINVAL; if (sdp->sd_lockstruct.ls_ops->lm_mount == NULL) |