summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-09-26 10:23:19 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-09-26 10:28:56 +0200
commit822dfbd8b4cd5511ca8965f990f39ff2f2b832e8 (patch)
treee8bb24c0794a2e305eb0ff99b158058883794bf4
parent38269ade13965679842625411b547acfc8333e89 (diff)
downloadbarebox-822dfbd8b4cd5511ca8965f990f39ff2f2b832e8.tar.gz
barebox-822dfbd8b4cd5511ca8965f990f39ff2f2b832e8.tar.xz
fs: open: Do not forget to set errno
When the initial lookup fails in open we have to go to the error path which sets errno correctly rather than returning directly. Fixes: b3fbfad7ae ("fs: dentry cache implementation") Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--fs/fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 41818ea811..d4ac37943e 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -2237,7 +2237,7 @@ int open(const char *pathname, int flags, ...)
putname(nd.name);
if (error)
- return error;
+ goto out1;
if (d_is_negative(dentry)) {
if (flags & O_CREAT) {