Skip to content

Commit

Permalink
direct-io: Remove unused DIO_ASYNC_EXTEND flag
Browse files Browse the repository at this point in the history
This flag was added by 6039257 ("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 acdda3a ("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>
  • Loading branch information
Nikolay Borisov authored and Jens Axboe committed Mar 12, 2018
1 parent fc9de9a commit c8f4c36
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions fs/direct-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit c8f4c36

Please sign in to comment.