Skip to content

Commit

Permalink
direct-io: Remove unused DIO_SKIP_DIO_COUNT logic
Browse files Browse the repository at this point in the history
This flag was added by fe0f07d ("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 542ff7b ("block: new direct I/O implementation") it became
unused. 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
lorddoskias authored and axboe committed Mar 12, 2018
1 parent c8f4c36 commit ce3077e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 2 additions & 4 deletions fs/direct-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,7 @@ 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);
inode_dio_end(dio->inode);

if (flags & DIO_COMPLETE_ASYNC) {
/*
Expand Down Expand Up @@ -1296,8 +1295,7 @@ 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);
inode_dio_begin(inode);

retval = 0;
sdio.blkbits = blkbits;
Expand Down
3 changes: 0 additions & 3 deletions include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ce3077e

Please sign in to comment.