From: Benny Halevy <bhalevy@panasas.com>
To: andros@netapp.com, Trond.Myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1] NFS: fix ERR_PTR with un mapped NFSv4 error
Date: Thu, 27 Nov 2008 09:15:24 +0200 [thread overview]
Message-ID: <492E490C.2030109@panasas.com> (raw)
In-Reply-To: <1227739740-5885-1-git-send-email-andros@netapp.com>
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
next prev parent reply other threads:[~2008-11-27 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2008-11-27 20:12 ` Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=492E490C.2030109@panasas.com \
--to=bhalevy@panasas.com \
--cc=Trond.Myklebust@netapp.com \
--cc=andros@netapp.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.