From: J. Bruce Fields <bfields@redhat.com>
Date: Sat, 1 Jan 2011 20:43:50 +0000 (-0500)
Subject: nfsd: don't drop requests on -ENOMEM
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3beb6cd1d448e7ded938bbd676493e6a08e9a6cd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git

nfsd: don't drop requests on -ENOMEM

We never want to drop a request if we could return a JUKEBOX/DELAY error
instead; so, convert to nfserr_jukebox and let nfsd_dispatch() convert
that to a dropit error as a last resort if JUKEBOX/DELAY is unavailable
(as in the NFSv2 case).

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---

diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
index 08e17264784b..dc9c2e3fd1b8 100644
--- a/fs/nfsd/nfsproc.c
+++ b/fs/nfsd/nfsproc.c
@@ -736,7 +736,7 @@ nfserrno (int errno)
 		{ nfserr_jukebox, -ETIMEDOUT },
 		{ nfserr_jukebox, -ERESTARTSYS },
 		{ nfserr_dropit, -EAGAIN },
-		{ nfserr_dropit, -ENOMEM },
+		{ nfserr_jukebox, -ENOMEM },
 		{ nfserr_badname, -ESRCH },
 		{ nfserr_io, -ETXTBSY },
 		{ nfserr_notsupp, -EOPNOTSUPP },