Commit 08b893fd authored by Pavel Emelyanov's avatar Pavel Emelyanov

mount: Add comment to is_root_xxx checks

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a0049bfe
...@@ -50,11 +50,20 @@ static inline int is_root(char *p) ...@@ -50,11 +50,20 @@ static inline int is_root(char *p)
return p[0] == '/' && p[1] == '\0'; return p[0] == '/' && p[1] == '\0';
} }
/* True for the root mount (the topmost one) */
static inline int is_root_mount(struct mount_info *mi) static inline int is_root_mount(struct mount_info *mi)
{ {
return is_root(mi->mountpoint); return is_root(mi->mountpoint);
} }
/*
* True if the mountpoint target is root on its FS.
*
* This is used to determine whether we need to postpone
* mounting. E.g. one can bind mount some subdir from a
* disk, and in this case we'll have to get the root disk
* mount first, then bind-mount it. See do_mount_one().
*/
static inline int fsroot_mounted(struct mount_info *mi) static inline int fsroot_mounted(struct mount_info *mi)
{ {
return is_root(mi->root); return is_root(mi->root);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment