]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
NFS: Memory allocation failures are not server fatal errors
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 14 May 2022 14:08:10 +0000 (10:08 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 17 May 2022 16:53:33 +0000 (12:53 -0400)
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>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/internal.h

index 7eefa16ed381bf6f32689ce884d069ba5406d5bd..8f8cd6e2d4dbcb83223cc95d575daf652a056836 100644 (file)
@@ -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);