diff mbox series

[1/5] NFS: Memory allocation failures are not server fatal errors

Message ID 20220514140814.3655-1-trondmy@kernel.org (mailing list archive)
State New
Headers show
Series [1/5] NFS: Memory allocation failures are not server fatal errors | expand

Commit Message

trondmy@kernel.org May 14, 2022, 2:08 p.m. UTC
From: Trond Myklebust <trond.myklebust@hammerspace.com>

We need to filter out ENOMEM in nfs_error_is_fatal_on_server(), because
running out of memory on our client is not a server error.

Reported-by: Olga Kornievskaia <aglo@umich.edu>
Fixes: 2dc23afffbca ("NFS: ENOMEM should also be a fatal error.")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfs/internal.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 7eefa16ed381..8f8cd6e2d4db 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -841,6 +841,7 @@  static inline bool nfs_error_is_fatal_on_server(int err)
 	case 0:
 	case -ERESTARTSYS:
 	case -EINTR:
+	case -ENOMEM:
 		return false;
 	}
 	return nfs_error_is_fatal(err);