]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
direct-io: Remove unused DIO_SKIP_DIO_COUNT logic
authorNikolay Borisov <nborisov@suse.com>
Fri, 23 Feb 2018 11:45:29 +0000 (13:45 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Mar 2018 16:21:24 +0000 (10:21 -0600)
This flag was added by fe0f07d08ee3 ("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 542ff7bf18c6 ("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>
fs/direct-io.c
include/linux/fs.h

index 88f0c7fba1ce8a00f89b2dffcf12e95ccad4ea2f..ba12ee659673ac3ac6330a1185b6fbe9fdab1d82 100644 (file)
@@ -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) {
                /*
@@ -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;
index 260c233e73752c758971bc5267919c24f24117e4..9bee267209e5ee7d7cd8059080f084abcef967fd 100644 (file)
@@ -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);