[GFS2] Fix lock ordering bug in page fault path

Mmapped files were able to trigger a lock ordering bug. Private
maps do not need to take the glock so early on. Shared maps do
unfortunately, however we can get around that by adding a flag
into the flags for the struct gfs2_file. This only works because
we are taking an exclusive lock at this point, so we know that
nobody else can be racing with us.

Fixes Red Hat bugzilla: #201196

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:
Steven Whitehouse
2006-08-04 15:41:22 -04:00
parent 899bb26450
commit 59a1cc6bda
5 changed files with 32 additions and 25 deletions

View File

@@ -279,6 +279,7 @@ static inline struct gfs2_sbd *GFS2_SB(struct inode *inode)
enum {
GFF_DID_DIRECT_ALLOC = 0,
GFF_EXLOCK = 1,
};
struct gfs2_file {