Merge tag 'for-linus-7.4-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux

Pull orangefs updates from Mike Marshall:

 - Don't continue on to gpf if client dies on write.

   If the orangefs userspace client died while writeback was
   occurring it led to a gpf. This allows the kernel to finish
   the writeback. Reported by Farhad Alemi.

 - Don't wait on service operation on system shutdown

   This avoids waiting an already dead userspace to process an
   unmount operation if the system is shutdown while orangefs
   filesystems are still mounted.

 - Use ssize_t instead of size_t for error codes...

   This fixes a situation where an unsigned variable was being
   used to collect a string size, or possibly a negative error
   code. Reported by [email protected]

* tag 'for-linus-7.4-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
  orangefs: don't continue on to gpf if client dies on write.
  orangefs_super: don't wait on service operation on system shutdown.
  orangefs: use ssize_t instead of size_t for error codes...
This commit is contained in:
Linus Torvalds
2026-10-25 15:07:49 -10:00
+20 -1
View File
@@ -181,8 +181,27 @@ static int orangefs_writepages(struct address_space *mapping,
{
struct orangefs_writepages *ow;
struct blk_plug plug;
int error;
int error = 0;
struct folio *folio = NULL;
int maxpages;
maxpages = orangefs_bufmap_size_query() / PAGE_SIZE;
if (maxpages < 1) {
/*
* Probably the client is dead and there's no bufmap.
* Walk writeback_iter anyway so each dirty folio is unlocked
* and writeback is ended. wait_for_direct_io will fail; the
* data is not written.
*/
gossip_err("%s: maxpages < 1. \n", __func__);
while ((folio = writeback_iter(mapping, wbc, folio, &error))) {
error = orangefs_writepage_locked(folio, wbc);
mapping_set_error(mapping, error);
folio_unlock(folio);
folio_end_writeback(folio);
}
return error;
}
ow = kzalloc_obj(struct orangefs_writepages);
if (!ow)