mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Subject: [PATCH RFC 3/3] fs: tftp: don't maintain tftp dentries in dcache
Date: Thu, 22 Aug 2019 08:51:02 +0200	[thread overview]
Message-ID: <20190822065102.22024-4-ahmad@a3f.at> (raw)
In-Reply-To: <20190822065102.22024-1-ahmad@a3f.at>

Currently a negative dentry is cached whenever a non-existing file was
looked up over TFTP. Short of a barebox reset, there is no way to
invalidate that dentry, so barebox retries the look up.

Fix this by always reporting TFTP dentries as invalid in the d_revalidate
callback.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 fs/tftp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/tftp.c b/fs/tftp.c
index 54dcba272fb8..1f36c56511ac 100644
--- a/fs/tftp.c
+++ b/fs/tftp.c
@@ -715,6 +715,7 @@ static int tftp_probe(struct device_d *dev)
 	}
 
 	sb->s_op = &tftp_ops;
+	sb->s_d_op = &no_revalidate_d_ops;
 
 	inode = tftp_get_inode(sb, NULL, S_IFDIR);
 	sb->s_root = d_make_root(inode);
-- 
2.20.1


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

  parent reply	other threads:[~2019-08-22  6:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22  6:50 [PATCH RFC 0/3] fs: tftp: don't use cached dentries Ahmad Fatoum
2019-08-22  6:51 ` [PATCH RFC 1/3] fs: tftp: remove duplicate header Ahmad Fatoum
2019-08-22  6:51 ` [PATCH RFC 2/3] fs: provide no_revalidate_d_ops for network file systems Ahmad Fatoum
2019-08-22  6:51 ` Ahmad Fatoum [this message]
2019-08-23  7:38 ` [PATCH RFC 0/3] fs: tftp: don't use cached dentries 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=20190822065102.22024-4-ahmad@a3f.at \
    --to=ahmad@a3f.at \
    --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