All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] NFS: fix ERR_PTR with un mapped NFSv4 error
@ 2008-11-26 22:49 andros
  2008-11-27  7:15 ` Benny Halevy
  0 siblings, 1 reply; 3+ messages in thread
From: andros @ 2008-11-26 22:49 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs, Andy Adamson

From: Andy Adamson <andros@netapp.com>

NFSv4 errors need to be mapped prior to ERR_PTR.

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

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 7547600..49f06ce 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1154,7 +1154,7 @@ struct nfs_server *nfs4_create_server(const struct nfs_parsed_mount_data *data,
 error:
 	nfs_free_server(server);
 	dprintk("<-- nfs4_create_server() = error %d\n", error);
-	return ERR_PTR(error);
+	return ERR_PTR(nfs4_map_errors(error));
 }
 
 /*
@@ -1231,7 +1231,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
 error:
 	nfs_free_server(server);
 	dprintk("<-- nfs4_create_referral_server() = error %d\n", error);
-	return ERR_PTR(error);
+	return ERR_PTR(nfs4_map_errors(error));
 }
 
 #endif /* CONFIG_NFS_V4 */
@@ -1299,7 +1299,7 @@ struct nfs_server *nfs_clone_server(struct nfs_server *source,
 out_free_server:
 	nfs_free_server(server);
 	dprintk("<-- nfs_clone_server() = error %d\n", error);
-	return ERR_PTR(error);
+	return ERR_PTR(nfs4_map_errors(error));
 }
 
 #ifdef CONFIG_PROC_FS
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] NFS: fix ERR_PTR with un mapped NFSv4 error
  2008-11-26 22:49 [PATCH 1/1] NFS: fix ERR_PTR with un mapped NFSv4 error andros
@ 2008-11-27  7:15 ` Benny Halevy
  2008-11-27 20:12   ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Benny Halevy @ 2008-11-27  7:15 UTC (permalink / raw)
  To: andros, Trond.Myklebust; +Cc: linux-nfs

Andy, I wonder if this actually needs to be done in
lower-level functions (e.g. nfs_probe_fsinfo).
I think that in general we should not let nfs errors
out of the layer immediately invoking the xdr routines.

Benny

On Nov. 27, 2008, 0:49 +0200, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> NFSv4 errors need to be mapped prior to ERR_PTR.
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  fs/nfs/client.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index 7547600..49f06ce 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -1154,7 +1154,7 @@ struct nfs_server *nfs4_create_server(const struct nfs_parsed_mount_data *data,
>  error:
>  	nfs_free_server(server);
>  	dprintk("<-- nfs4_create_server() = error %d\n", error);
> -	return ERR_PTR(error);
> +	return ERR_PTR(nfs4_map_errors(error));
>  }
>  
>  /*
> @@ -1231,7 +1231,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
>  error:
>  	nfs_free_server(server);
>  	dprintk("<-- nfs4_create_referral_server() = error %d\n", error);
> -	return ERR_PTR(error);
> +	return ERR_PTR(nfs4_map_errors(error));
>  }
>  
>  #endif /* CONFIG_NFS_V4 */
> @@ -1299,7 +1299,7 @@ struct nfs_server *nfs_clone_server(struct nfs_server *source,
>  out_free_server:
>  	nfs_free_server(server);
>  	dprintk("<-- nfs_clone_server() = error %d\n", error);
> -	return ERR_PTR(error);
> +	return ERR_PTR(nfs4_map_errors(error));
>  }
>  
>  #ifdef CONFIG_PROC_FS

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] NFS: fix ERR_PTR with un mapped NFSv4 error
  2008-11-27  7:15 ` Benny Halevy
@ 2008-11-27 20:12   ` Trond Myklebust
  0 siblings, 0 replies; 3+ messages in thread
From: Trond Myklebust @ 2008-11-27 20:12 UTC (permalink / raw)
  To: Benny Halevy; +Cc: andros, linux-nfs

On Thu, 2008-11-27 at 09:15 +0200, Benny Halevy wrote:
> Andy, I wonder if this actually needs to be done in
> lower-level functions (e.g. nfs_probe_fsinfo).
> I think that in general we should not let nfs errors
> out of the layer immediately invoking the xdr routines.

I agree. We're not processing the NFSv4-specific errors at that level,
so why pass them up in the first place?

Cheers
  Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-27 20:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-26 22:49 [PATCH 1/1] NFS: fix ERR_PTR with un mapped NFSv4 error andros
2008-11-27  7:15 ` Benny Halevy
2008-11-27 20:12   ` Trond Myklebust

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.