public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* review: minor cleanup in xfs_read locking
@ 2006-09-04  0:17 Nathan Scott
  2006-09-04  0:31 ` Lachlan McIlroy
  2006-09-04  0:39 ` Lachlan McIlroy
  0 siblings, 2 replies; 4+ messages in thread
From: Nathan Scott @ 2006-09-04  0:17 UTC (permalink / raw)
  To: lachlan; +Cc: xfs

Hi Lachlan,

Could you check this for me - it just folds the second direct I/O
conditional added in your recent deadlock fix back into the prior
branch, which is also direct I/O specific...

thanks.

-- 
Nathan


Index: xfs-linux/linux-2.6/xfs_lrw.c
===================================================================
--- xfs-linux.orig/linux-2.6/xfs_lrw.c	2006-09-04 09:59:10.955973000 +1000
+++ xfs-linux/linux-2.6/xfs_lrw.c	2006-09-04 09:59:42.205926000 +1000
@@ -270,12 +270,12 @@ xfs_read(
 		}
 	}
 
-	if (unlikely((ioflags & IO_ISDIRECT) && VN_CACHED(vp)))
-		bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)),
-						-1, FI_REMAPF_LOCKED);
-
-	if (unlikely(ioflags & IO_ISDIRECT))
+	if (unlikely((ioflags & IO_ISDIRECT))) {
+		if (VN_CACHED(vp))
+			bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)),
+						 -1, FI_REMAPF_LOCKED);
 		mutex_unlock(&inode->i_mutex);
+	}
 
 	xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore,
 				(void *)iovp, segs, *offset, ioflags);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-04  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-04  0:17 review: minor cleanup in xfs_read locking Nathan Scott
2006-09-04  0:31 ` Lachlan McIlroy
2006-09-04  0:39 ` Lachlan McIlroy
2006-09-04  1:09   ` Nathan Scott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox