]> git.baikalelectronics.ru Git - kernel.git/commit
uml: Simplify tempdir logic.
authorTristan Schmelcher <tschmelcher@google.com>
Mon, 11 Nov 2013 18:03:06 +0000 (13:03 -0500)
committerRichard Weinberger <richard@nod.at>
Sun, 20 Apr 2014 21:10:44 +0000 (23:10 +0200)
commitc42e919bb5430df94d5265427630e7bc4f80c8b6
treeb0079baf0cee87629cf68bd3cb2e1570a7565bf7
parent480ecc916679014c8b1cad0f42ff0dbbc2b461b8
uml: Simplify tempdir logic.

Inferring the mount hierarchy correctly from /proc/mounts is hard when MS_MOVE
may have been used, and the previous code did it wrongly. This change simplifies
the logic to only require that /dev/shm be _on_ tmpfs (which can be checked
trivially with statfs) rather than that it be a _mountpoint_ of tmpfs, since
there isn't a compelling reason to be that strict. We also now check for tmpfs
on whatever directory we ultimately use so that the user is better informed.

This change also moves the more standard TMPDIR environment variable check ahead
of the others.

Applies to 3.12.

Signed-off-by: Tristan Schmelcher <tschmelcher@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/os-Linux/mem.c