[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>
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index 7aabc03..bbd44a4 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -153,8 +153,7 @@
 
 	if (lh.lh_header.mh_magic != GFS2_MAGIC ||
 	    lh.lh_header.mh_type != GFS2_METATYPE_LH ||
-	    lh.lh_blkno != blk ||
-	    lh.lh_hash != hash)
+	    lh.lh_blkno != blk || lh.lh_hash != hash)
 		return 1;
 
 	*head = lh;
@@ -482,11 +481,9 @@
 
 		/* Acquire a shared hold on the transaction lock */
 
-		error = gfs2_glock_nq_init(sdp->sd_trans_gl,
-					   LM_ST_SHARED,
+		error = gfs2_glock_nq_init(sdp->sd_trans_gl, LM_ST_SHARED,
 					   LM_FLAG_NOEXP | LM_FLAG_PRIORITY |
-					   GL_NOCANCEL | GL_NOCACHE,
-					   &t_gh);
+					   GL_NOCANCEL | GL_NOCACHE, &t_gh);
 		if (error)
 			goto fail_gunlock_ji;