ovl: handle ENOENT on index lookup
Subsystems (2)
Amir Goldstein
maintainerPATCH 1/1 ovl: handle ENOENT on index lookup
--- fs/overlayfs/namei.c | 4 ++++ 1 file changed, 4 insertions(+)
Miklos,
This is a complimentary/fixup patch to the patch currently at the tip of overlayfs-next. I did not run into ENOENT in my tests, but it seems that all other places in overlayfs that call lookup_one_len_unlocked() check the ENOENT return value and treat it the same as negative dentry.
I suppose this could be expected from some file systems?
Amir.
fs/overlayfs/namei.c +4 -0
@@ -507,6 +507,10 @@ static struct dentry *ovl_lookup_index(struct dentry *dentry, index =lookup_one_len_unlocked (name.name, ofs->indexdir, name.len);if (IS_ERR (index)) { err =PTR_ERR (index); +if (err == -ENOENT ) { + index =NULL ; + goto out; + } pr_warn_ratelimited("overlayfs: failed inode index lookup (ino=%lu, key=%*s, err=%i);\n" "overlayfs: mount with '-o index=off' to disable inodes index.\n", d_inode(origin)->i_ino, name.len, name.name,
Signature · 1 line
2.7.4
Greg KH
maintainerQuoted 3 lines · Amir Goldstein
Fixes 359f392ca53e ("ovl: lookup index entry for copy up origin")Cc <[email protected]> # v4.13Signed-off-by Amir Goldstein <[email protected]>
Why is there no changelog at all? Not good, especially for a patch wanting to be sent to the stable trees :(
thanks,
greg k-h
Amir Goldstein
maintainerQuoted 8 lines · Greg KH
Quoted 3 lines · Amir Goldstein
Fixes 359f392ca53e ("ovl: lookup index entry for copy up origin")Cc <[email protected]> # v4.13Signed-off-by Amir Goldstein <[email protected]>Why is there no changelog at all? Not good, especially for a patch wanting to be sent to the stable trees :(
Yeh, sorry about that. I was hoping it'd get squashed into an earlier patch which is on overlayfs-next of today and not yet pulled into linux-next. Or rejected.
If that doesn't happen, I'll re-post with commit message.
Amir.
Miklos Szeredi
maintainerQuoted 7 lines · Amir Goldstein
Fixes 359f392ca53e ("ovl: lookup index entry for copy up origin")Cc <[email protected]> # v4.13Signed-off-by Amir Goldstein <[email protected]>--- fs/overlayfs/namei.c | 4 ++++ 1 file changed, 4 insertions(+)
Quoted 8 lines
Miklos,
This is a complimentary/fixup patch to the patch currently at the tip of overlayfs-next. I did not run into ENOENT in my tests, but it seems that all other places in overlayfs that call
lookup_one_len_unlocked()check the ENOENT return value and treat it the same as negative dentry.I suppose this could be expected from some file systems?
I haven't done the research, but I suppose it's possible. Nobody is forcing filesystems to cache negative dentries, although not doing so might be stupid.
However, the patch seems to be wrong, since it does not treat -ENOENT quite the same way as a negative index (no warning for hard links).
Btw you can use "--suppress-cc=bodycc" to not spam stable@vger with review patches.
Thanks,
Miklos
Amir Goldstein
maintainerQuoted 21 lines · Miklos Szeredi
Quoted 7 lines · Amir Goldstein
Fixes 359f392ca53e ("ovl: lookup index entry for copy up origin")Cc <[email protected]> # v4.13Signed-off-by Amir Goldstein <[email protected]>--- fs/overlayfs/namei.c | 4 ++++ 1 file changed, 4 insertions(+)Quoted 8 lines
Miklos,
This is a complimentary/fixup patch to the patch currently at the tip of overlayfs-next. I did not run into ENOENT in my tests, but it seems that all other places in overlayfs that call
lookup_one_len_unlocked()check the ENOENT return value and treat it the same as negative dentry.I suppose this could be expected from some file systems?
I haven't done the research, but I suppose it's possible. Nobody is forcing filesystems to cache negative dentries, although not doing so might be stupid.
Quoted 6 lines
However, the patch seems to be wrong, since it does not treat
-ENOENTquite the same way as a negative index (no warning for hard links).Btw you can use "--suppress-cc=bodycc" to not spam stable@vger with review patches.
OK, but Greg didn't seem annoyed by getting CC'ed - on the contrary.. Anyway, sent fixed v2 and CC'ed stable, since there was already a discussion on v1
Amir.