[PATCH 2/5] pnfsd: fix pnfs_export_operations layoutget valid errors

andros
2010-02-05T17:09:36Z

From: Andy Adamson <andros@netapp.com>

Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfsd/nfs4pnfsd.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c
index 816e2f0..3951e02 100644
--- a/fs/nfsd/nfs4pnfsd.c
+++ b/fs/nfsd/nfs4pnfsd.c
@@ -870,6 +870,7 @@ nfs4_pnfs_get_layout(struct nfsd4_pnfs_layoutget *lgp,
if (status) {
switch (status) {
case -ETOOSMALL:
+ case -E2BIG:
status = nfserr_toosmall;
break;
case -ENOMEM:
@@ -878,10 +879,7 @@ nfs4_pnfs_get_layout(struct nfsd4_pnfs_layoutget *lgp,
status = nfserr_layouttrylater;
break;
case -ENOENT:
- status = nfserr_badlayout;
- break;
- case -E2BIG:
- status = nfserr_toosmall;
+ status = nfserr_stale;
break;
default:
status = nfserr_layoutunavailable;
--
1.6.6