aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorJohn Muir <muirj@nortel.com>2007-11-28 19:22:02 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-29 12:24:54 -0500
commitfbee36b92abc965d3fc2862aa60fd0dfcf779d0b (patch)
tree5d59ccb2236110aeb8fddb75c94fc52beaf79e3b /fs/fuse
parentd0186b25e65d4d786727a03044b8aafe2ba118ee (diff)
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: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 0cc95eeb9379..84f9f7dfdf5b 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -56,6 +56,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
56 fi->i_time = 0; 56 fi->i_time = 0;
57 fi->nodeid = 0; 57 fi->nodeid = 0;
58 fi->nlookup = 0; 58 fi->nlookup = 0;
59 fi->attr_version = 0;
59 INIT_LIST_HEAD(&fi->write_files); 60 INIT_LIST_HEAD(&fi->write_files);
60 fi->forget_req = fuse_request_alloc(); 61 fi->forget_req = fuse_request_alloc();
61 if (!fi->forget_req) { 62 if (!fi->forget_req) {