diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-08-04 16:13:20 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-08-04 16:13:20 -0700 |
commit | 17b0436077d99211d8b26886235a36c5ec54ac57 (patch) | |
tree | 8bcd9b4a0f8285f749814e95ae0365c611ba2392 /fs/gfs2/sys.c | |
parent | aafade242ff24fac3aabf61c7861dfa44a3c2445 (diff) | |
parent | 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff) | |
download | op-kernel-dev-17b0436077d99211d8b26886235a36c5ec54ac57.zip op-kernel-dev-17b0436077d99211d8b26886235a36c5ec54ac57.tar.gz |
Merge commit 'v3.0' into x86/vdso
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 e20eab3..443cabc 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) |