Browse Source

fuse: set i_nlink to sane value after mount

Aufs seems to depend on a positive i_nlink value.  So fill in a dummy but sane
value for the root inode at mount time.

The inode attributes are refreshed with the correct values at the first
opportunity.

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>
Miklos Szeredi 17 years ago
parent
commit
074406fa63
1 changed files with 1 additions and 0 deletions
  1. 1 0
      fs/fuse/inode.c

+ 1 - 0
fs/fuse/inode.c

@@ -472,6 +472,7 @@ static struct inode *get_root_inode(struct super_block *sb, unsigned mode)
 
 	attr.mode = mode;
 	attr.ino = FUSE_ROOT_ID;
+	attr.nlink = 1;
 	return fuse_iget(sb, 1, 0, &attr);
 }