[GFS2] Fix page lock/glock deadlock

This fixes a race between the glock and the page lock encountered
during truncate in gfs2_readpage and gfs2_prepare_write. The gfs2_readpages
function doesn't need the same fix since it only uses a try lock anyway, so
it will fail back to gfs2_readpage in the case of a potential deadlock.

This bug was spotted by Russell Cattelan.

Cc: Russell Cattelan <cattelan@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
Steven Whitehouse
2006-11-08 10:26:54 -05:00
parent c594d88664
commit 2ca99501fa
2 changed files with 9 additions and 5 deletions

View File

@@ -27,7 +27,6 @@
#define GL_ATIME 0x00000200
#define GL_NOCACHE 0x00000400
#define GL_NOCANCEL 0x00001000
#define GL_AOP 0x00004000
#define GLR_TRYFAILED 13
#define GLR_CANCELED 14