summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glock.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-02-04 16:06:48 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-04 16:06:48 -0800
commita3a71ca9a715776cf3eda605dafdb4a383782c4f (patch)
tree5e5ae507d054106e87c2a26d81479955b2de1cfa /fs/gfs2/glock.c
parent6f14a668f1a8b715a6e855f4e32705e54a6e86a1 (diff)
parent8f05228ee7c8f409ae3c6f9c3e13d7ccb9c18360 (diff)
downloadkernel-crypto-a3a71ca9a715776cf3eda605dafdb4a383782c4f.tar.gz
kernel-crypto-a3a71ca9a715776cf3eda605dafdb4a383782c4f.tar.xz
kernel-crypto-a3a71ca9a715776cf3eda605dafdb4a383782c4f.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes: GFS2: Extend umount wait coverage to full glock lifetime GFS2: Wait for unlock completion on umount
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r--fs/gfs2/glock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index f455a03a09e..f4266332593 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -769,6 +769,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
if (!gl)
return -ENOMEM;
+ atomic_inc(&sdp->sd_glock_disposal);
gl->gl_flags = 0;
gl->gl_name = name;
atomic_set(&gl->gl_ref, 1);
@@ -1538,6 +1539,9 @@ void gfs2_gl_hash_clear(struct gfs2_sbd *sdp)
up_write(&gfs2_umount_flush_sem);
msleep(10);
}
+ flush_workqueue(glock_workqueue);
+ wait_event(sdp->sd_glock_wait, atomic_read(&sdp->sd_glock_disposal) == 0);
+ gfs2_dump_lockstate(sdp);
}
void gfs2_glock_finish_truncate(struct gfs2_inode *ip)