From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 3/5] fs: tftp: fix return value
Date: Thu, 30 Aug 2018 12:45:25 +0200 [thread overview]
Message-ID: <20180830104527.4057-4-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20180830104527.4057-1-s.hauer@pengutronix.de>
When tftp_get_inode() fails it is a sign for a out of memory situtation
rather than an indicator for no space left on the filesystem, so return
-ENOMEM.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
fs/tftp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/tftp.c b/fs/tftp.c
index bcb95bc1db..0baf0c2890 100644
--- a/fs/tftp.c
+++ b/fs/tftp.c
@@ -653,7 +653,7 @@ static struct dentry *tftp_lookup(struct inode *dir, struct dentry *dentry,
inode = tftp_get_inode(dir->i_sb, dir, S_IFREG | S_IRWXUGO);
if (!inode)
- return ERR_PTR(-ENOSPC);
+ return ERR_PTR(-ENOMEM);
d_add(dentry, inode);
--
2.18.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-08-30 10:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 10:45 TFTP improvements Sascha Hauer
2018-08-30 10:45 ` [PATCH 1/5] fs: tftp: overhaul debugging Sascha Hauer
2018-08-30 10:45 ` [PATCH 2/5] fs: tftp: fix memory hole Sascha Hauer
2018-08-30 10:45 ` Sascha Hauer [this message]
2018-08-30 10:45 ` [PATCH 4/5] fs: tftp: hide files which are actually not present on the server Sascha Hauer
2018-08-30 11:40 ` Steffen Trumtrar
2018-08-30 10:45 ` [PATCH 5/5] fs: tftp: improve file size handling Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180830104527.4057-4-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox