summaryrefslogtreecommitdiff
path: root/fs/gfs2/log.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-08-04 15:41:22 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-08-04 15:41:22 -0400
commit59a1cc6bdabf5ed148b48808ad1a418d87f5e6bf (patch)
tree6463071a09201040267702e895d63359e62c393d /fs/gfs2/log.c
parent899bb264507cfed83922bf14cd66a073494601ba (diff)
downloadlinux-59a1cc6bdabf5ed148b48808ad1a418d87f5e6bf.tar.gz
linux-59a1cc6bdabf5ed148b48808ad1a418d87f5e6bf.tar.xz
[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>
Diffstat (limited to 'fs/gfs2/log.c')
-rw-r--r--fs/gfs2/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 60fdc94ccc8a..a591fb8fae20 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -256,8 +256,8 @@ static unsigned int current_tail(struct gfs2_sbd *sdp)
if (list_empty(&sdp->sd_ail1_list))
tail = sdp->sd_log_head;
else {
- ai = list_entry(sdp->sd_ail1_list.prev,
- struct gfs2_ail, ai_list);
+ ai = list_entry(sdp->sd_ail1_list.prev, struct gfs2_ail,
+ ai_list);
tail = ai->ai_first;
}