[PATCH 1/2] fs: open: Do not forget to set errno

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux