xfs
[Top] [All Lists]

review: minor cleanup in xfs_read locking

To: lachlan@xxxxxxx
Subject: review: minor cleanup in xfs_read locking
From: Nathan Scott <nathans@xxxxxxx>
Date: Mon, 4 Sep 2006 10:17:11 +1000
Cc: xfs@xxxxxxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
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);


<Prev in Thread] Current Thread [Next in Thread>