[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200720152825.479045822@linuxfoundation.org>
Date: Mon, 20 Jul 2020 17:36:33 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Vasily Averin <vvs@...tuozzo.com>,
Miklos Szeredi <mszeredi@...hat.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.4 111/215] fuse: dont ignore errors from fuse_writepages_fill()
From: Vasily Averin <vvs@...tuozzo.com>
[ Upstream commit 7779b047a57f6824a43d0e1f70de2741b7426b9d ]
fuse_writepages() ignores some errors taken from fuse_writepages_fill() I
believe it is a bug: if .writepages is called with WB_SYNC_ALL it should
either guarantee that all data was successfully saved or return error.
Fixes: 26d614df1da9 ("fuse: Implement writepages callback")
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@...hat.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
fs/fuse/file.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 66214707a9456..d5963ef65c389 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2148,10 +2148,8 @@ static int fuse_writepages(struct address_space *mapping,
err = write_cache_pages(mapping, wbc, fuse_writepages_fill, &data);
if (data.wpa) {
- /* Ignore errors if we can write at least one page */
WARN_ON(!data.wpa->ia.ap.num_pages);
fuse_writepages_send(&data);
- err = 0;
}
if (data.ff)
fuse_file_put(data.ff, false, false);
--
2.25.1
Powered by blists - more mailing lists