mount namespace + d_path question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Question regarding pathnames and mount namespaces. As I understand mount namespaces enable different processes to mount filesystems at different locations leading to different paths to the same underlying file.

When you do something like the below in kernel code:

d_path(&file->f_path, filename, PATH_MAX+11);

How can you guarantee that the returned full path is against the root/init mount namespace instead of the calling process' mount namespace?

Thanks

David


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux