[PATCH 29/32] fs: drop duplicate follow_managed() call
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Sep 5 02:55:54 PDT 2022
lookup_fast called above already calls follow_managed with the same
argument, so no need to duplicate the call here.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
fs/fs.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/fs/fs.c b/fs/fs.c
index 14d5f7330457..78878e7112d5 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1838,16 +1838,9 @@ static int walk_component(struct nameidata *nd, int flags)
if (err < 0)
return err;
- if (err == 0) {
- path.mnt = nd->path.mnt;
- err = follow_managed(&path, nd);
- if (err < 0)
- return err;
-
- if (d_is_negative(path.dentry)) {
- path_to_nameidata(&path, nd);
- return -ENOENT;
- }
+ if (err == 0 && d_is_negative(path.dentry)) {
+ path_to_nameidata(&path, nd);
+ return -ENOENT;
}
return step_into(nd, &path, flags, d_inode(path.dentry));
--
2.30.2
More information about the barebox
mailing list