ovl: use path_put_init() in error paths for ovl_fill_super()
This allows simplifying the error cleanup later. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
f121aadede
commit
8aafcb593d
|
@ -586,7 +586,7 @@ static int ovl_mount_dir_noesc(const char *name, struct path *path)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_put:
|
out_put:
|
||||||
path_put(path);
|
path_put_init(path);
|
||||||
out:
|
out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -604,7 +604,7 @@ static int ovl_mount_dir(const char *name, struct path *path)
|
||||||
if (ovl_dentry_remote(path->dentry)) {
|
if (ovl_dentry_remote(path->dentry)) {
|
||||||
pr_err("overlayfs: filesystem on '%s' not supported as upperdir\n",
|
pr_err("overlayfs: filesystem on '%s' not supported as upperdir\n",
|
||||||
tmp);
|
tmp);
|
||||||
path_put(path);
|
path_put_init(path);
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
}
|
}
|
||||||
kfree(tmp);
|
kfree(tmp);
|
||||||
|
@ -656,7 +656,7 @@ static int ovl_lower_dir(const char *name, struct path *path,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_put:
|
out_put:
|
||||||
path_put(path);
|
path_put_init(path);
|
||||||
out:
|
out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue