[Devel] [RHEL8 1/2] fuse: remove WARN_ON from fuse_write_file_get()
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Apr 26 20:29:43 MSK 2021
i'm going to skip this patch because
in vz8 the code of fuse_writepages() has been reworked and now
write_cache_pages() (which calls fuse_write_file_get() which may triggered a WARN_ON())
is called under condition
data.ff = __fuse_write_file_get(fc, get_fuse_inode(inode));
if (data.ff && test_bit(FUSE_S_FAIL_IMMEDIATELY, &data.ff->ff_state)) {
err = write_cache_pages(mapping, wbc, fuse_dummy_writepage,
and it's not clear to me if the WARN_ON() can/will be issued by later call of write_cache_pages().
Anyway it's just a warning, if we face this WARN_ON, we'll apply the patch and that's it.
--
Best regards,
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
On 04/26/2021 07:25 PM, Ildar Ismagilov wrote:
> From: Vasiliy Averin <vvs at virtuozzo.com>
>
> RHEL77 kernel expect that fuse_write_file_get() should not
> return NULL, however it is acceptable for our pathces
>
> https://jira.sw.ru/browse/PSBM-97311
>
> Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
> ---
> fs/fuse/file.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index a25c2d5d2e25..f5e696f18b01 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -2092,14 +2092,6 @@ struct fuse_file *__fuse_write_file_get(struct fuse_conn *fc,
> }
> EXPORT_SYMBOL_GPL(__fuse_write_file_get);
>
> -static struct fuse_file *fuse_write_file_get(struct fuse_conn *fc,
> - struct fuse_inode *fi)
> -{
> - struct fuse_file *ff = __fuse_write_file_get(fc, fi);
> - WARN_ON(!ff);
> - return ff;
> -}
> -
> int fuse_write_inode(struct inode *inode, struct writeback_control *wbc)
> {
> struct fuse_conn *fc = get_fuse_conn(inode);
> @@ -2158,7 +2150,7 @@ static int fuse_writepage_locked(struct page *page)
> goto err_free;
>
> error = -EIO;
> - wpa->ia.ff = fuse_write_file_get(fc, fi);
> + wpa->ia.ff = __fuse_write_file_get(fc, fi);
> if (!wpa->ia.ff)
> goto err_nofile;
>
> @@ -2428,7 +2420,7 @@ static int fuse_writepages_fill(struct page *page,
> /* we can acquire ff here because we do have locked pages here! */
> BUG_ON(data->ff);
> err = -EIO;
> - data->ff = fuse_write_file_get(fc, fi);
> + data->ff = __fuse_write_file_get(fc, fi);
> if (!data->ff)
> goto out_unlock;
>
>
More information about the Devel
mailing list