From: Vasily Averin <vvs@virtuozzo.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org, Maxim Patlasov <maximvp@gmail.com>,
Kirill Tkhai <ktkhai@virtuozzo.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] fuse_writepages ignores errors from fuse_writepages_fill
Date: Thu, 25 Jun 2020 12:39:51 +0300 [thread overview]
Message-ID: <be5341bf-6631-d039-7377-2c0c77fd8be3@virtuozzo.com> (raw)
In-Reply-To: <2733b41a-b4c6-be94-0118-a1a8d6f26eec@virtuozzo.com>
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@virtuozzo.com>
---
fs/fuse/file.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index c023f7f0..5986739 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);
--
1.8.3.1
next prev parent reply other threads:[~2020-06-25 9:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2733b41a-b4c6-be94-0118-a1a8d6f26eec@virtuozzo.com>
2020-06-25 9:02 ` [PATCH] fuse_writepages_fill() optimization to avoid WARN_ON in tree_insert Vasily Averin
2020-06-27 10:31 ` Sedat Dilek
2020-06-29 21:11 ` Vivek Goyal
2020-07-11 4:01 ` Miklos Szeredi
2020-07-13 8:02 ` Vasily Averin
2020-07-13 16:14 ` Miklos Szeredi
2020-07-14 6:18 ` Vasily Averin
2020-07-14 12:40 ` Sedat Dilek
2020-07-14 12:52 ` Miklos Szeredi
2020-07-14 12:57 ` Sedat Dilek
2020-07-15 7:48 ` Sedat Dilek
2020-06-25 9:30 ` [PATCH] fuse_writepages_fill: simplified "if-else if" constuction Vasily Averin
2020-07-14 12:24 ` Miklos Szeredi
2020-07-14 18:53 ` Vasily Averin
2020-06-25 9:39 ` Vasily Averin [this message]
2020-07-14 12:44 ` [PATCH] fuse_writepages ignores errors from fuse_writepages_fill Miklos Szeredi
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=be5341bf-6631-d039-7377-2c0c77fd8be3@virtuozzo.com \
--to=vvs@virtuozzo.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maximvp@gmail.com \
--cc=miklos@szeredi.hu \
/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;
as well as URLs for NNTP newsgroup(s).