All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/6] NFSD: Put export if prepare_creds() fail
@ 2014-09-02 14:15 Kinglong Mee
  2014-09-03 21:36 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Kinglong Mee @ 2014-09-02 14:15 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Linux NFS Mailing List, Kinglong Mee

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/nfsd/nfsfh.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index e883a58..88026fc 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -209,8 +209,10 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp)
 		 * fix that case easily.
 		 */
 		struct cred *new = prepare_creds();
-		if (!new)
-			return nfserrno(-ENOMEM);
+		if (!new) {
+			error =  nfserrno(-ENOMEM);
+			goto out;
+		}
 		new->cap_effective =
 			cap_raise_nfsd_set(new->cap_effective,
 					   new->cap_permitted);
-- 
1.9.3


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

* Re: [PATCH 6/6] NFSD: Put export if prepare_creds() fail
  2014-09-02 14:15 [PATCH 6/6] NFSD: Put export if prepare_creds() fail Kinglong Mee
@ 2014-09-03 21:36 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2014-09-03 21:36 UTC (permalink / raw)
  To: Kinglong Mee; +Cc: Linux NFS Mailing List

Thanks, applying all 6 for 3.18.

--b.

On Tue, Sep 02, 2014 at 10:15:26PM +0800, Kinglong Mee wrote:
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
>  fs/nfsd/nfsfh.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
> index e883a58..88026fc 100644
> --- a/fs/nfsd/nfsfh.c
> +++ b/fs/nfsd/nfsfh.c
> @@ -209,8 +209,10 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp)
>  		 * fix that case easily.
>  		 */
>  		struct cred *new = prepare_creds();
> -		if (!new)
> -			return nfserrno(-ENOMEM);
> +		if (!new) {
> +			error =  nfserrno(-ENOMEM);
> +			goto out;
> +		}
>  		new->cap_effective =
>  			cap_raise_nfsd_set(new->cap_effective,
>  					   new->cap_permitted);
> -- 
> 1.9.3
> 

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

end of thread, other threads:[~2014-09-03 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-02 14:15 [PATCH 6/6] NFSD: Put export if prepare_creds() fail Kinglong Mee
2014-09-03 21:36 ` J. Bruce Fields

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.