diff mbox

NFSv4.1: Ensure 'nfs4_sp4_select_mode()' can report -EINVAL when needed

Message ID 20180107085040.6827-1-christophe.jaillet@wanadoo.fr (mailing list archive)
State New, archived
Headers show

Commit Message

Christophe JAILLET Jan. 7, 2018, 8:50 a.m. UTC
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 mbox

Patch

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 {