Fsnamespacec

static int do_change_type(struct nameidata *nd, int flag) {

struct vfsmount *m, *mnt = nd->mnt; int recurse = flag & MS_REC; int type = flag & ~MS_REC;

for (m = mnt; m; m = (recurse ? next_mnt(m, mnt) : NULL)) change_mnt_propagation(m, type);

The mount type for the path given in nd is changed using change_mnt_propagation; if the MS_REC flag is set, the mount types of all submounts are changed recursively. next_mnt provides an iterator that allows for traversing all submounts of a given mount.

change_mnt_propagation is responsible to set the appropriate propagation flag for an instance of struct vfsmount.

Continue reading here: Fspnodec

Was this article helpful?

0 0