[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1461805789-3632-1-git-send-email-ming.lei@canonical.com>
Date: Thu, 28 Apr 2016 09:09:47 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Jens Axboe <axboe@...com>, linux-kernel@...r.kernel.org
Cc: linux-block@...r.kernel.org, Christoph Hellwig <hch@...radead.org>,
linux-btrfs@...r.kernel.org, Ming Lei <ming.lei@...onical.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org (open list:FILESYSTEMS (VFS and
infrastructure))
Subject: [PATCH v3 1/3] fs: direct-io: handle error in dio_end_io()
If error is passed to dio_end_io(), it should have been
dealt with. Unfortunately current code just ignores that
silently.
Only btrfs uses dio_end_io().
Signed-off-by: Ming Lei <ming.lei@...onical.com>
---
fs/direct-io.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 4720377..a8dd60a 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -352,6 +352,9 @@ void dio_end_io(struct bio *bio, int error)
{
struct dio *dio = bio->bi_private;
+ if (!bio->bi_error)
+ bio->bi_error = error;
+
if (dio->is_async)
dio_bio_end_aio(bio);
else
--
1.9.1
Powered by blists - more mailing lists