diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2010-01-25 06:20:19 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2010-02-03 04:47:04 -0500 |
commit | e402746a945ceb9d0486a8e3d5917c9228fa4404 (patch) | |
tree | c2e6c4d619c1cf35e97b16a9849517871c15d97b /fs/gfs2/super.c | |
parent | 1a45dcfe2525e9432cb4aba461d4994fc2befe42 (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index c282ad41f3d1..66242b32db5b 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/gfs2_ondisk.h> | 21 | #include <linux/gfs2_ondisk.h> |
22 | #include <linux/crc32.h> | 22 | #include <linux/crc32.h> |
23 | #include <linux/time.h> | 23 | #include <linux/time.h> |
24 | #include <linux/wait.h> | ||
24 | 25 | ||
25 | #include "gfs2.h" | 26 | #include "gfs2.h" |
26 | #include "incore.h" | 27 | #include "incore.h" |
@@ -860,6 +861,8 @@ restart: | |||
860 | gfs2_jindex_free(sdp); | 861 | gfs2_jindex_free(sdp); |
861 | /* Take apart glock structures and buffer lists */ | 862 | /* Take apart glock structures and buffer lists */ |
862 | gfs2_gl_hash_clear(sdp); | 863 | gfs2_gl_hash_clear(sdp); |
864 | /* Wait for dlm to reply to all our unlock requests */ | ||
865 | wait_event(sdp->sd_glock_wait, atomic_read(&sdp->sd_glock_disposal) == 0); | ||
863 | /* Unmount the locking protocol */ | 866 | /* Unmount the locking protocol */ |
864 | gfs2_lm_unmount(sdp); | 867 | gfs2_lm_unmount(sdp); |
865 | 868 | ||