XFS is changed to use blockdev_direct_IO flags instead of DIO_OWN_LOCKING.

Signed-off-by: Chris Mason <[EMAIL PROTECTED]>

diff -r 5a06df98f46d -r 3bd838f3dc06 fs/xfs/linux-2.6/xfs_aops.c
--- a/fs/xfs/linux-2.6/xfs_aops.c       Thu Dec 21 15:31:31 2006 -0500
+++ b/fs/xfs/linux-2.6/xfs_aops.c       Thu Dec 21 15:31:31 2006 -0500
@@ -1392,19 +1392,16 @@ xfs_vm_direct_IO(
 
        iocb->private = xfs_alloc_ioend(inode, IOMAP_UNWRITTEN);
 
-       if (rw == WRITE) {
-               ret = blockdev_direct_IO_own_locking(rw, iocb, inode,
-                       iomap.iomap_target->bt_bdev,
-                       iov, offset, nr_segs,
-                       xfs_get_blocks_direct,
-                       xfs_end_io_direct);
-       } else {
-               ret = blockdev_direct_IO_no_locking(rw, iocb, inode,
-                       iomap.iomap_target->bt_bdev,
-                       iov, offset, nr_segs,
-                       xfs_get_blocks_direct,
-                       xfs_end_io_direct);
-       }
+       /*
+        * ask DIO not to do any special locking for us, and to always
+        * pass create=1 to get_block on writes
+        */
+       ret = blockdev_direct_IO_flags(rw, iocb, inode,
+                                      iomap.iomap_target->bt_bdev,
+                                      iov, offset, nr_segs,
+                                      xfs_get_blocks_direct,
+                                      xfs_end_io_direct,
+                                      DIO_CREATE);
 
        if (unlikely(ret != -EIOCBQUEUED && iocb->private))
                xfs_destroy_ioend(iocb->private);


-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to