|
@@ -1339,11 +1339,12 @@ static int __aafs_ns_mkdir_entries(struct aa_ns *ns, struct dentry *dir)
|
|
/*
|
|
/*
|
|
* Requires: @ns->lock held
|
|
* Requires: @ns->lock held
|
|
*/
|
|
*/
|
|
-int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name)
|
|
|
|
|
|
+int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name,
|
|
|
|
+ struct dentry *dent)
|
|
{
|
|
{
|
|
struct aa_ns *sub;
|
|
struct aa_ns *sub;
|
|
struct aa_profile *child;
|
|
struct aa_profile *child;
|
|
- struct dentry *dent, *dir;
|
|
|
|
|
|
+ struct dentry *dir;
|
|
int error;
|
|
int error;
|
|
|
|
|
|
AA_BUG(!ns);
|
|
AA_BUG(!ns);
|
|
@@ -1373,7 +1374,7 @@ int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name)
|
|
/* subnamespaces */
|
|
/* subnamespaces */
|
|
list_for_each_entry(sub, &ns->sub_ns, base.list) {
|
|
list_for_each_entry(sub, &ns->sub_ns, base.list) {
|
|
mutex_lock(&sub->lock);
|
|
mutex_lock(&sub->lock);
|
|
- error = __aafs_ns_mkdir(sub, ns_subns_dir(ns), NULL);
|
|
|
|
|
|
+ error = __aafs_ns_mkdir(sub, ns_subns_dir(ns), NULL, NULL);
|
|
mutex_unlock(&sub->lock);
|
|
mutex_unlock(&sub->lock);
|
|
if (error)
|
|
if (error)
|
|
goto fail2;
|
|
goto fail2;
|
|
@@ -1929,7 +1930,7 @@ static int __init aa_create_aafs(void)
|
|
ns_subremove(root_ns) = dent;
|
|
ns_subremove(root_ns) = dent;
|
|
|
|
|
|
mutex_lock(&root_ns->lock);
|
|
mutex_lock(&root_ns->lock);
|
|
- error = __aafs_ns_mkdir(root_ns, aa_sfs_entry.dentry, "policy");
|
|
|
|
|
|
+ error = __aafs_ns_mkdir(root_ns, aa_sfs_entry.dentry, "policy", NULL);
|
|
mutex_unlock(&root_ns->lock);
|
|
mutex_unlock(&root_ns->lock);
|
|
|
|
|
|
if (error)
|
|
if (error)
|