OSDN Git Service

direct-io: Remove unused DIO_ASYNC_EXTEND flag
authorNikolay Borisov <nborisov@suse.com>
Fri, 23 Feb 2018 11:45:28 +0000 (13:45 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Mar 2018 16:21:22 +0000 (10:21 -0600)
This flag was added by 6039257378e4 ("direct-io: add flag to allow aio
writes beyond i_size") to support XFS. However, with the rework of
XFS' DIO's path to use iomap in acdda3aae146 ("xfs: use iomap_dio_rw")
it became redundant. So let's remove it.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/direct-io.c
include/linux/fs.h

index 1357ef5..88f0c7f 100644 (file)
@@ -1252,8 +1252,7 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
         */
        if (is_sync_kiocb(iocb))
                dio->is_async = false;
-       else if (!(dio->flags & DIO_ASYNC_EXTEND) &&
-                iov_iter_rw(iter) == WRITE && end > i_size_read(inode))
+       else if (iov_iter_rw(iter) == WRITE && end > i_size_read(inode))
                dio->is_async = false;
        else
                dio->is_async = true;
index 2a81556..260c233 100644 (file)
@@ -2977,9 +2977,6 @@ enum {
        /* filesystem does not support filling holes */
        DIO_SKIP_HOLES  = 0x02,
 
-       /* filesystem can handle aio writes beyond i_size */
-       DIO_ASYNC_EXTEND = 0x04,
-
        /* inode/fs/bdev does not need truncate protection */
        DIO_SKIP_DIO_COUNT = 0x08,
 };