void mnt_set_mountpoint(struct vfsmount *mnt, struct dentry *dentry, struct vfsmount *child_mnt)

child_mnt->mnt_parent = mntget(mnt); child_mnt->mnt_mountpoint = dget(dentry); dentry->d_mounted++;

This enables the situation prior to mounting to be reconstructed when the kernel unmounts a filesystem. The d_mounted value of the old dentry instance is incremented so that the kernel is able to recognize that a filesystem is mounted at this point.

In addition, the new vfsmnt instance is added to the global hash table and to the child list of the previous entry using the list elements discussed above. This is performed by commit_tree:

Continue reading here: Shared Subtrees

Was this article helpful?

0 0