aboutsummaryrefslogtreecommitdiff
path: root/fs/gfs2/super.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2010-01-25 11:20:19 +0000
committerSteven Whitehouse <swhiteho@redhat.com>2010-02-03 09:47:04 +0000
commite402746a945ceb9d0486a8e3d5917c9228fa4404 (patch)
treec2e6c4d619c1cf35e97b16a9849517871c15d97b /fs/gfs2/super.c
parent1a45dcfe2525e9432cb4aba461d4994fc2befe42 (diff)
GFS2: Wait for unlock completion on umount
This patch adds a wait on umount between the point at which we dispose of all glocks and the point at which we unmount the lock protocol. This ensures that we've received all the replies to our unlock requests before we stop the locking. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Reported-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r--fs/gfs2/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index c282ad41f3d..66242b32db5 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -21,6 +21,7 @@
#include <linux/gfs2_ondisk.h>
#include <linux/crc32.h>
#include <linux/time.h>
+#include <linux/wait.h>
#include "gfs2.h"
#include "incore.h"
@@ -860,6 +861,8 @@ restart:
gfs2_jindex_free(sdp);
/* Take apart glock structures and buffer lists */
gfs2_gl_hash_clear(sdp);
+ /* Wait for dlm to reply to all our unlock requests */
+ wait_event(sdp->sd_glock_wait, atomic_read(&sdp->sd_glock_disposal) == 0);
/* Unmount the locking protocol */
gfs2_lm_unmount(sdp);