android_kernel_oneplus_msm8998/fs/autofs4
NeilBrown 9a4e08c634 autofs: don't fail mount for transient error
commit ecc0c469f27765ed1e2b967be0aa17cee1a60b76 upstream.

Currently if the autofs kernel module gets an error when writing to the
pipe which links to the daemon, then it marks the whole moutpoint as
catatonic, and it will stop working.

It is possible that the error is transient.  This can happen if the
daemon is slow and more than 16 requests queue up.  If a subsequent
process tries to queue a request, and is then signalled, the write to
the pipe will return -ERESTARTSYS and autofs will take that as total
failure.

So change the code to assess -ERESTARTSYS and -ENOMEM as transient
failures which only abort the current request, not the whole mountpoint.

It isn't a crash or a data corruption, but having autofs mountpoints
suddenly stop working is rather inconvenient.

Ian said:

: And given the problems with a half dozen (or so) user space applications
: consuming large amounts of CPU under heavy mount and umount activity this
: could happen more easily than we expect.

Link: http://lkml.kernel.org/r/87y3norvgp.fsf@notabene.neil.brown.name
Signed-off-by: NeilBrown <neilb@suse.com>
Acked-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:37:20 +00:00
..
autofs_i.h autofs races 2016-09-30 10:18:37 +02:00
dev-ioctl.c autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL 2017-06-29 12:48:50 +02:00
expire.c autofs: use dentry flags to block walks during expire 2016-09-30 10:18:37 +02:00
init.c fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
inode.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
Kconfig
Makefile
root.c autofs races 2016-09-30 10:18:37 +02:00
symlink.c don't pass nameidata to ->follow_link() 2015-05-10 22:20:15 -04:00
waitq.c autofs: don't fail mount for transient error 2017-11-30 08:37:20 +00:00