Skip to content

Commit

Permalink
fuse: fix uninitialized field in fuse_inode
Browse files Browse the repository at this point in the history
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: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
John Muir authored and Linus Torvalds committed Nov 29, 2007
1 parent d0186b2 commit fbee36b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/fuse/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
fi->i_time = 0;
fi->nodeid = 0;
fi->nlookup = 0;
fi->attr_version = 0;
INIT_LIST_HEAD(&fi->write_files);
fi->forget_req = fuse_request_alloc();
if (!fi->forget_req) {
Expand Down

0 comments on commit fbee36b

Please sign in to comment.