Re: [PATCH v2 5/9] fuse: move initialization of fuse_file to fuse_writepages() instead of in callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 22 Aug 2024 at 01:25, Joanne Koong <joannelkoong@xxxxxxxxx> wrote:

> @@ -2361,21 +2355,25 @@ static int fuse_writepages(struct address_space *mapping,
>
>         data.inode = inode;
>         data.wpa = NULL;
> -       data.ff = NULL;
> +       data.ff = fuse_write_file_get(fi);
> +       if (!data.ff)
> +               return -EIO;
>
>         data.orig_pages = kcalloc(fc->max_pages,
>                                   sizeof(struct page *),
>                                   GFP_NOFS);
> -       if (!data.orig_pages)
> +       if (!data.orig_pages) {
> +               fuse_file_put(data.ff, false);

I'd prefer a cleanup label at the end of the function.

Thanks,
Miklos




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux