automount: ack automount requests even when already mounted 85/183785/1 accepted/tizen/unified/20180713.160208 accepted/tizen/unified/20180810.132532 submit/tizen/20180712.015849 submit/tizen/20180810.001302
authorAnchor Cat <githubanchorcat@anchor.net.au>
Wed, 10 May 2017 11:23:58 +0000 (21:23 +1000)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 11 Jul 2018 04:53:12 +0000 (04:53 +0000)
commit89939ad949abdb26b365badd3cf8ce1141a2929e
tree855af5b999e124aaf4239cb2c67d1e2a9a607454
parent9d10a5ce2b4c776b6268fe48a62d85d03ad7b0ed
automount: ack automount requests even when already mounted

If a process accesses an autofs filesystem while systemd is in the
middle of starting the mount unit on top of it, it is possible for the
autofs_ptype_missing_direct request from the kernel to be received after
the mount unit has been fully started:

  systemd forks and execs mount             ...
            ...                     access autofs, blocks
  mount exits                               ...
  systemd receives SIGCHLD                  ...
            ...                     kernel sends request
  systemd receives request                  ...

systemd needs to respond to this request, otherwise the kernel will
continue to block access to the mount point.

Cherry-picked from https://github.com/systemd/systemd/commit/e7d54bf58789545a9eb0b3964233defa0b007318
Change-Id: Ibacc2c0ffee32846321864987324763214648732
(cherry picked from commit 5ccd5b2efc60d9f775a812878528f06b01189da5)
src/core/automount.c