[systemd-devel] [PATCH] [mount] Do not try to mount /run a second time when using smack

Lennart Poettering lennart at poettering.net
Tue Aug 19 15:25:29 PDT 2014


On Wed, 20.08.14 00:29, Philippe De Swert (philippedeswert at gmail.com) wrote:

> From: Philippe De Swert <philippedeswert at gmail.com>
> 
> Smack mounts /run with some different parameters, we definitely
> do not want to have a second mount over it afterwards

Nah, it's not actually mounted twice. The idea here is that a
SMACK-enabled systemd also works on SMACK-less kernels. Hence we first
try mounting with the "smackfsroot=*" switch (which will fail on
SMACK-less kernels, and then fallback to the same line without the
option.

Note that the second line is marked with MNT_FATAL, to indicate that
that's the line we *really* need.

Also note that the actual mount code will always check if there's
already a mount point in place, and in that case simply skip any further
mounting. We do that in particulary to be able to handle the cases where
some initrd is already passing in some file systems pre-mounted.

So, everything's alright in the current code afaics.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list