__mark_inode_dirty() does not put an unhashed inode on a dirty list, and the root inode of an overlay is never hashed. Use inode_fake_hash() on it, so that the following patches can track it like any other overlay inode. Signed-off-by: Josef Bacik --- fs/overlayfs/super.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index ce3e30235ae9..f0ca1539022d 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -1366,6 +1366,11 @@ static struct dentry *ovl_get_root(struct super_block *sb, ovl_dentry_set_flag(OVL_E_CONNECTED, root); ovl_set_upperdata(d_inode(root)); ovl_inode_init(d_inode(root), &oip, ino, fsid); + /* + * Nobody looks the root up by its hash, but __mark_inode_dirty() only + * puts hashed inodes on a dirty list. + */ + inode_fake_hash(d_inode(root)); WARN_ON(!!IS_CASEFOLDED(d_inode(root)) != ofs->casefold); ovl_dentry_init_flags(root, upperdentry, oe, DCACHE_OP_WEAK_REVALIDATE); /* root keeps a reference of upperdentry */ -- 2.55.0