mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] fs: open: Do not forget to set errno
@ 2018-09-26  8:25 Sascha Hauer
  2018-09-26  8:25 ` [PATCH 2/2] fs: stat: " Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2018-09-26  8:25 UTC (permalink / raw)
  To: Barebox List; +Cc: Ladislav Michl

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>
---
 fs/fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {
-- 
2.19.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-26  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26  8:25 [PATCH 1/2] fs: open: Do not forget to set errno Sascha Hauer
2018-09-26  8:25 ` [PATCH 2/2] fs: stat: " Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox