5 ms·
Yeah, it is, I just read up on it, it's this function: http://lxr.linux.no/linux+v3.12.6/fs/namespace.c#L404 http://lxr.linux.no/linux+v3.12.6/fs/namespace.c#L4
by miksago 13y ago
Yeah, it is, I just read up on it, it's this function: http://lxr.linux.no/linux+v3.12.6/fs/namespace.c#L404 http://lxr.linux.no/linux+v3.12.6/fs/namespace.c#L404
From what I can gather, if the file handle isn't in write mode or is a special file, then we call __mnt_want_write, http://lxr.linux.no/linux+v3.12.6/fs/namespace.c#L305 http://lxr.linux.no/linux+v3.12.6/fs/namespace.c#L305, otherwise we clone the write handle or something.
I'm surprised how simple this code seems.