提交 fbee36b9 编写于 作者: J John Muir 提交者: Linus Torvalds

fuse: fix uninitialized field in fuse_inode

I found problems accessing (executing) previously existing files, until
I did chmod on them (or setattr).

If the fi->attr_version is not initialized, then it could be
larger than fc->attr_version until a setattr is executed, and as a
result the inode attributes would never be set.
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d0186b25
...@@ -56,6 +56,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb) ...@@ -56,6 +56,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
fi->i_time = 0; fi->i_time = 0;
fi->nodeid = 0; fi->nodeid = 0;
fi->nlookup = 0; fi->nlookup = 0;
fi->attr_version = 0;
INIT_LIST_HEAD(&fi->write_files); INIT_LIST_HEAD(&fi->write_files);
fi->forget_req = fuse_request_alloc(); fi->forget_req = fuse_request_alloc();
if (!fi->forget_req) { if (!fi->forget_req) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册