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