lkml.org 
[lkml]   [2018]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] NFSv4.1: Ensure 'nfs4_sp4_select_mode()' can report -EINVAL when needed
Date
Since commit 937e3133cd0b, 'nfs4_sp4_select_mode()' always return 0.
Based on the way this commit is written (direct return replaced by some
'ret = -EXXX'), it is likely that returning this error code is expected.

Fixes: 937e3133cd0b ("NFSv4.1: Ensure we clear the SP4_MACH_CRED flags in nfs4_sp4_select_mode()")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Untested and not sure at all if correct...
---
fs/nfs/nfs4proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 17a03f2c4330..ae00ac59f59b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -7584,7 +7584,7 @@ static int nfs4_sp4_select_mode(struct nfs_client *clp,
}
out:
clp->cl_sp4_flags = flags;
- return 0;
+ return ret;
}

struct nfs41_exchange_id_data {
--
2.14.1
\
 
 \ /
  Last update: 2018-01-14 23:16    [W:0.037 / U:2.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site