Index: fs/ocfs2/mmap.c
===================================================================
--- fs/ocfs2/mmap.c	(revision 3101)
+++ fs/ocfs2/mmap.c	(working copy)
@@ -282,13 +282,19 @@
 	status = ocfs2_buffer_lock_ctxt_insert(ctxt, target_inode,
 					       target_binode);
 
+	if (status < 0) {
+		mlog_errno(status);
+		ocfs2_unlock_buffer_inodes(ctxt);
+		goto bail;
+	}
+
 	/* knfsd, which lacks an mm, may call us to do I/O. Since the buffer
 	 * is private to the kernel, there isn't any need to insert any other
 	 * locks, so we can skip it.
 	 *
 	 * The pile of duct tape and mixed nuts that is NFS 1, universe 0
 	 */
-	if (!status && mm) {
+	if (mm) {
 		/* Now fill the tree with any inodes that back this
 		 * buffer. If target inode is in there, it will be
 		 * skipped over. */
@@ -299,12 +305,6 @@
 	if (!skip_sem)
 		up_read(&mm->mmap_sem);
 
-	if (status < 0) {
-		mlog_errno(status);
-		ocfs2_unlock_buffer_inodes(ctxt);
-		goto bail;
-	}
-
 	status = 0;
 bail:
 	return status;