Skip to content

Commit ce3077e

Browse files
lorddoskiasaxboe
authored andcommitted
direct-io: Remove unused DIO_SKIP_DIO_COUNT logic
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 <[email protected]> Signed-off-by: Nikolay Borisov <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent c8f4c36 commit ce3077e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

fs/direct-io.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,7 @@ static ssize_t dio_complete(struct dio *dio, ssize_t ret, unsigned int flags)
315315
dio_warn_stale_pagecache(dio->iocb->ki_filp);
316316
}
317317

318-
if (!(dio->flags & DIO_SKIP_DIO_COUNT))
319-
inode_dio_end(dio->inode);
318+
inode_dio_end(dio->inode);
320319

321320
if (flags & DIO_COMPLETE_ASYNC) {
322321
/*
@@ -1296,8 +1295,7 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
12961295
/*
12971296
* Will be decremented at I/O completion time.
12981297
*/
1299-
if (!(dio->flags & DIO_SKIP_DIO_COUNT))
1300-
inode_dio_begin(inode);
1298+
inode_dio_begin(inode);
13011299

13021300
retval = 0;
13031301
sdio.blkbits = blkbits;

include/linux/fs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2976,9 +2976,6 @@ enum {
29762976

29772977
/* filesystem does not support filling holes */
29782978
DIO_SKIP_HOLES = 0x02,
2979-
2980-
/* inode/fs/bdev does not need truncate protection */
2981-
DIO_SKIP_DIO_COUNT = 0x08,
29822979
};
29832980

29842981
void dio_end_io(struct bio *bio);

0 commit comments

Comments
 (0)