Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce3077ee authored by Nikolay Borisov's avatar Nikolay Borisov Committed by Jens Axboe
Browse files

direct-io: Remove unused DIO_SKIP_DIO_COUNT logic



This flag was added by fe0f07d0 ("direct-io: only inc/deci
inode->i_dio_count for file systems") as means to optimise the atomic
modificaiton of the variable for blockdevices. However with the advent
of 542ff7bf ("block: new direct I/O implementation") it became
unused. So let's remove it.

Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c8f4c36f
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -315,7 +315,6 @@ static ssize_t dio_complete(struct dio *dio, ssize_t ret, unsigned int flags)
			dio_warn_stale_pagecache(dio->iocb->ki_filp);
	}

	if (!(dio->flags & DIO_SKIP_DIO_COUNT))
	inode_dio_end(dio->inode);

	if (flags & DIO_COMPLETE_ASYNC) {
@@ -1296,7 +1295,6 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
	/*
	 * Will be decremented at I/O completion time.
	 */
	if (!(dio->flags & DIO_SKIP_DIO_COUNT))
	inode_dio_begin(inode);

	retval = 0;
+0 −3
Original line number Diff line number Diff line
@@ -2976,9 +2976,6 @@ enum {

	/* filesystem does not support filling holes */
	DIO_SKIP_HOLES	= 0x02,

	/* inode/fs/bdev does not need truncate protection */
	DIO_SKIP_DIO_COUNT = 0x08,
};

void dio_end_io(struct bio *bio);