ovl: fix regression in fsnotify of overlay merge dir
Amir Goldstein
maintainerPATCH v2 1/1 ovl: fix regression in fsnotify of overlay merge dir
A re-factoring patch in NFS export series has passed the wrong argument to ovl_get_inode() causing a regression in the very recent fix to fsnotify of overlay merge dir.
The regression has caused merge directory inodes to be hashed by upper instead of lower real inode, when NFS export and directory indexing is disabled. That caused an inotify watch to become obsolete after directory copy up and drop caches.
LTP test inotify07 was improved to catch this regression. The regression also caused multiple redirect dirs to same origin not to be detected on lookup with NFS export disabled. An xfstest was added to cover this case.
---
Miklos,
Sorry, sent the wrong version.
This is the correct fix.
Thanks,
Amir.
fs/overlayfs/namei.c | 2 ++ 1 file changed, 2 insertions(+)
fs/overlayfs/namei.c +2 -0
@@ -976,6 +976,8 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, upperdentry =dget (index);if (upperdentry || ctr) { +if (ctr) + origin = stack[0 ].dentry; inode =ovl_get_inode (dentry->d_sb, upperdentry, origin, index, ctr); err =PTR_ERR (inode);
Signature · 1 line
2.7.4