summaryrefslogtreecommitdiff
path: root/fs/overlayfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/overlayfs/super.c')
-rw-r--r--fs/overlayfs/super.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index baa970a2b398..35ecea4b60b0 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -54,15 +54,6 @@ module_param_named(xino_auto, ovl_xino_auto_def, bool, 0644);
MODULE_PARM_DESC(xino_auto,
"Auto enable xino feature");
-static void ovl_entry_stack_free(struct ovl_entry *oe)
-{
- struct ovl_path *lowerstack = ovl_lowerstack(oe);
- unsigned int i;
-
- for (i = 0; i < ovl_numlower(oe); i++)
- dput(lowerstack[i].dentry);
-}
-
static bool ovl_metacopy_def = IS_ENABLED(CONFIG_OVERLAY_FS_METACOPY);
module_param_named(metacopy, ovl_metacopy_def, bool, 0644);
MODULE_PARM_DESC(metacopy,
@@ -73,7 +64,7 @@ static void ovl_dentry_release(struct dentry *dentry)
struct ovl_entry *oe = dentry->d_fsdata;
if (oe) {
- ovl_entry_stack_free(oe);
+ ovl_stack_put(ovl_lowerstack(oe), ovl_numlower(oe));
kfree_rcu(oe, rcu);
}
}
@@ -2070,8 +2061,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
return 0;
out_free_oe:
- ovl_entry_stack_free(oe);
- kfree(oe);
+ ovl_free_entry(oe);
out_err:
kfree(splitlower);
path_put(&upperpath);