[PATCH 3.2 52/79] autofs: fix careless error in recent commit

Ben Hutchings
2018-02-11T04:33:41Z

From: NeilBrown <neilb@suse.com>

commit 302ec300ef8a545a7fc7f667e5fd743b091c2eeb upstream.

Commit ecc0c469f277 ("autofs: don't fail mount for transient error") was
meant to replace an 'if' with a 'switch', but instead added the 'switch'
leaving the case in place.

Link: http://lkml.kernel.org/r/87zi6wstmw.fsf@notabene.neil.brown.name
Fixes: ecc0c469f277 ("autofs: don't fail mount for transient error")
Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: NeilBrown <neilb@suse.com>
Cc: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.2: autofs4_write() doesn't take an autofs_sb_info
pointer]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/autofs4/waitq.c | 1 -
1 file changed, 1 deletion(-)

--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -181,7 +181,6 @@ static void autofs4_notify_daemon(struct

mutex_unlock(&sbi->wq_mutex);

- if (autofs4_write(pipe, &pkt, pktsz))
switch (ret = autofs4_write(pipe, &pkt, pktsz)) {
case 0:
break;