diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 0fd334a50c53..02c00217b385 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -614,6 +614,10 @@ int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name goto out_put_forget; if (fuse_invalid_attr(&outarg->attr)) goto out_put_forget; + if (outarg->nodeid == FUSE_ROOT_ID && outarg->generation != 0) { + pr_warn_once("root generation should be zero\n"); + outarg->generation = 0; + } *inode = fuse_iget(sb, outarg->nodeid, outarg->generation, &outarg->attr, entry_attr_timeout(outarg),