From: Steven Whitehouse Date: Tue, 26 Jul 2011 08:15:45 +0000 (+0100) Subject: GFS2: Fix mount hang caused by certain access pattern to sysfs files X-Git-Tag: v3.0.1~7 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=52880922de44a7950283451b06db5aec0fc34a99;p=users%2Fjedix%2Flinux-maple.git GFS2: Fix mount hang caused by certain access pattern to sysfs files commit 19237039919088781b4191a00bdc1284d8fea1dd upstream. Depending upon the order of userspace/kernel during the mount process, this can result in a hang without the _all version of the completion. Signed-off-by: Steven Whitehouse Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 2a77071fb7b68..fa780e666911e 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -1018,13 +1018,13 @@ hostdata_error: fsname++; if (lm->lm_mount == NULL) { fs_info(sdp, "Now mounting FS...\n"); - complete(&sdp->sd_locking_init); + complete_all(&sdp->sd_locking_init); return 0; } ret = lm->lm_mount(sdp, fsname); if (ret == 0) fs_info(sdp, "Joined cluster. Now mounting FS...\n"); - complete(&sdp->sd_locking_init); + complete_all(&sdp->sd_locking_init); return ret; }