summaryrefslogtreecommitdiff
path: root/fs/fs.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-09-05 11:55:54 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-09-12 12:05:01 +0200
commit20e241c70b7ad92c7b7a65d82157c0d10684745f (patch)
tree6cb749ced33e451a19e026511bbff8b2914220d3 /fs/fs.c
parentc9c3f548d7e5aa7577d161d9a24d776ab73f6e58 (diff)
downloadbarebox-20e241c70b7ad92c7b7a65d82157c0d10684745f.tar.gz
fs: drop duplicate follow_managed() call
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@pengutronix.de> Link: https://lore.barebox.org/20220905095557.596891-30-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/fs.c')
-rw-r--r--fs/fs.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/fs.c b/fs/fs.c
index b69123a953..50db689c7e 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));