diff mbox

[24/26] ext4: Remove wait for unwritten extents in ext4_ind_direct_IO()

Message ID 1369993379-13017-25-git-send-email-jack@suse.cz
State Accepted, archived
Headers show

Commit Message

Jan Kara May 31, 2013, 9:42 a.m. UTC
We don't have to wait for unwritten extent conversion in
ext4_ind_direct_IO() as all writes that happened before DIO are flushed
by the generic code and extent conversion has happened before we cleared
PageWriteback bit.

Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext4/indirect.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Theodore Ts'o June 4, 2013, 6:42 p.m. UTC | #1
On Fri, May 31, 2013 at 11:42:57AM +0200, Jan Kara wrote:
> We don't have to wait for unwritten extent conversion in
> ext4_ind_direct_IO() as all writes that happened before DIO are flushed
> by the generic code and extent conversion has happened before we cleared
> PageWriteback bit.
> 
> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
> Signed-off-by: Jan Kara <jack@suse.cz>

Thanks, applied.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
index c8b3861..8a98fed 100644
--- a/fs/ext4/indirect.c
+++ b/fs/ext4/indirect.c
@@ -675,11 +675,6 @@  ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb,
 
 retry:
 	if (rw == READ && ext4_should_dioread_nolock(inode)) {
-		if (unlikely(atomic_read(&EXT4_I(inode)->i_unwritten))) {
-			mutex_lock(&inode->i_mutex);
-			ext4_flush_unwritten_io(inode);
-			mutex_unlock(&inode->i_mutex);
-		}
 		/*
 		 * Nolock dioread optimization may be dynamically disabled
 		 * via ext4_inode_block_unlocked_dio(). Check inode's state