From: Nikolay Borisov <nborisov@suse.com>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
axboe@kernel.dk, hch@lst.de, rgoldwyn@suse.de,
Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 2/2] direct-io: Remove unused DIO_SKIP_DIO_COUNT logic
Date: Fri, 23 Feb 2018 13:45:29 +0200 [thread overview]
Message-ID: <1519386329-2734-2-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1519386329-2734-1-git-send-email-nborisov@suse.com>
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.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
fs/direct-io.c | 6 ++----
include/linux/fs.h | 3 ---
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 99a81c49bce9..a8131087aa1c 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -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) {
/*
@@ -1297,8 +1296,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;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 260c233e7375..9bee267209e5 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -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);
--
2.7.4
next prev parent reply other threads:[~2018-02-23 11:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-23 11:45 [PATCH 1/2] direct-io: Remove unused DIO_ASYNC_EXTEND flag Nikolay Borisov
2018-02-23 11:45 ` Nikolay Borisov [this message]
2018-02-23 15:08 ` [PATCH 2/2] direct-io: Remove unused DIO_SKIP_DIO_COUNT logic Christoph Hellwig
2018-02-23 15:07 ` [PATCH 1/2] direct-io: Remove unused DIO_ASYNC_EXTEND flag Christoph Hellwig
2018-03-12 9:54 ` Nikolay Borisov
2018-03-12 16:20 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1519386329-2734-2-git-send-email-nborisov@suse.com \
--to=nborisov@suse.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rgoldwyn@suse.de \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®