3 ms·
Interesting. I think the mnt_* call is checking if the file system is mounted/accessible to write the change to the objects inode entry.
by hindsightbias 13y ago
Interesting.
I think the mnt_* call is checking if the file system is mounted/accessible to write the change to the objects inode entry.
- miksago 13y agoYeah, 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.