[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1359668994-13433-5-git-send-email-jack@suse.cz>
Date: Thu, 31 Jan 2013 22:49:52 +0100
From: Jan Kara <jack@...e.cz>
To: LKML <linux-kernel@...r.kernel.org>
Cc: linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
Jan Kara <jack@...e.cz>
Subject: [PATCH 4/6] fs: Don't call dio_cleanup() before submitting all bios
do_blockdev_direct_IO() can call dio_cleanup() before submitting
all bios. This will be inconvenient for us because we need to keep
preallocated structure in sdio which we attach to bio on submit and
it is natural to cleanup unused allocation in dio_cleanup().
Since dio_cleanup() is called again after submitting the last bio it is
enough to just remove the first dio_cleanup() call.
Signed-off-by: Jan Kara <jack@...e.cz>
---
fs/direct-io.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index cf5b44b..3a430f3 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -1209,10 +1209,8 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
((sdio.final_block_in_request - sdio.block_in_file) <<
blkbits);
- if (retval) {
- dio_cleanup(dio, &sdio);
+ if (retval)
break;
- }
} /* end iovec loop */
if (retval == -ENOTBLK) {
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists