if ((mflg & MS_BIND) && !(mflg & MS_REMOUNT)) {
oflg |= OPEN_TREE_CLONE;
+ /* AT_RECURSIVE is only permitted for OPEN_TREE_CLONE (rbind).
+ * The other recursive operations are handled by
+ * mount_setattr() and are independent of open_tree() */
if (mnt_optlist_is_rbind(cxt->optlist))
oflg |= AT_RECURSIVE;
}
.attr_set = MOUNT_ATTR_IDMAP,
.userns_fd = hd->userns_fd
};
- const int recursive = mnt_optlist_is_recursive(cxt->optlist);
+ const int recursive = mnt_optlist_is_rpropagation(cxt->optlist);
const char *target = mnt_fs_get_target(cxt->fs);
int fd_tree = -1;
int rc, is_private = 1;
extern int mnt_optlist_get_propagation(struct libmnt_optlist *ls);
extern int mnt_optlist_is_propagation_only(struct libmnt_optlist *ls);
extern int mnt_optlist_is_remount(struct libmnt_optlist *ls);
-extern int mnt_optlist_is_recursive(struct libmnt_optlist *ls);
+extern int mnt_optlist_is_rpropagation(struct libmnt_optlist *ls);
extern int mnt_optlist_is_bind(struct libmnt_optlist *ls);
extern int mnt_optlist_is_rbind(struct libmnt_optlist *ls);
extern int mnt_optlist_is_move(struct libmnt_optlist *ls);
is_rdonly : 1,
is_move : 1,
is_silent : 1,
- is_recursive : 1;
+ is_rpropagation : 1; /* recursive propagation (rbind, rprivate, ...) */
};
struct libmnt_optlist *mnt_new_optlist(void)
ls->is_silent = 0;
if (opt->ent->id & MS_REC)
- ls->is_recursive = 0;
+ ls->is_rpropagation = 0;
}
optlist_cleanup_cache(ls);
ls->is_silent = 1;
if (opt->ent->id & MS_REC) {
- ls->is_recursive = 1;
+ ls->is_rpropagation = 1;
opt->recursive = 1;
}
}
return ls && ls->is_remount;
}
-int mnt_optlist_is_recursive(struct libmnt_optlist *ls)
+int mnt_optlist_is_rpropagation(struct libmnt_optlist *ls)
{
- return ls && ls->is_recursive;
+ return ls && ls->is_rpropagation;
}
int mnt_optlist_is_move(struct libmnt_optlist *ls)