Skip to content

Commit

Permalink
Pass errors to kernel from putpage/putfolio
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Evans <[email protected]>
  • Loading branch information
rrevans committed Mar 21, 2024
1 parent 56d2f78 commit 83b0e1c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions module/os/linux/zfs/zpl_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,23 +720,23 @@ zpl_putpage(struct page *pp, struct writeback_control *wbc, void *data)
{
boolean_t *for_sync = data;
fstrans_cookie_t cookie;
int ret;

ASSERT(PageLocked(pp));
ASSERT(!PageWriteback(pp));

cookie = spl_fstrans_mark();
(void) zfs_putpage(pp->mapping->host, pp, wbc, *for_sync);
ret = zfs_putpage(pp->mapping->host, pp, wbc, *for_sync);
spl_fstrans_unmark(cookie);

return (0);
return (ret);
}

#ifdef HAVE_WRITEPAGE_T_FOLIO
static int
zpl_putfolio(struct folio *pp, struct writeback_control *wbc, void *data)
{
(void) zpl_putpage(&pp->page, wbc, data);
return (0);
return (zpl_putpage(&pp->page, wbc, data));
}
#endif

Expand Down

0 comments on commit 83b0e1c

Please sign in to comment.