nfsd: only WARN once on unmapped errors
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 4 Oct 2016 16:53:49 +0000 (12:53 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 7 Oct 2016 18:53:33 +0000 (14:53 -0400)
No need to spam the logs here.

The only drawback is losing information if we ever encounter two
different unmapped errors, but in practice we've rarely see even one.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfsproc.c

index e9214768cde90f84138f6279e115a7a8c7350b95..a56ee10204d985ed0a5f149c275f40e5362d8c29 100644 (file)
@@ -798,7 +798,7 @@ nfserrno (int errno)
                if (nfs_errtbl[i].syserr == errno)
                        return nfs_errtbl[i].nfserr;
        }
-       WARN(1, "nfsd: non-standard errno: %d\n", errno);
+       WARN_ONCE(1, "nfsd: non-standard errno: %d\n", errno);
        return nfserr_io;
 }