[Devel] [PATCH RHEL9 COMMIT] overlayfs: drop a redundant check in ovl_get_lowerstack()
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Jul 23 20:19:19 MSK 2024
The commit is pushed to "branch-rh9-5.14.0-427.22.1.vz9.62.x-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh9-5.14.0-427.22.1.vz9.62.8
------>
commit 863231f52c408045c94890f1fd6feb77e31c29d2
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Tue Jul 23 20:16:42 2024 +0300
overlayfs: drop a redundant check in ovl_get_lowerstack()
"stack" is always not NULL on "out_err:" path, so drop the check.
Fixes: 5f2c7b5e4d33 ("overlayfs: add dynamic path resolving in mount
options")
https://virtuozzo.atlassian.net/browse/PSBM-157244
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
fs/overlayfs/super.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index 54904e3197d7..0affc9d10218 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -1863,11 +1863,10 @@ static struct ovl_entry *ovl_get_lowerstack(struct super_block *sb,
return oe;
out_err:
- if (stack) {
- for (i = 0; i < numlower; i++)
- path_put(&stack[i]);
- kfree(stack);
- }
+ for (i = 0; i < numlower; i++)
+ path_put(&stack[i]);
+ kfree(stack);
+
oe = ERR_PTR(err);
goto out;
}
More information about the Devel
mailing list