Please ignore this patch for now, it can cause the file system corrupted and failed to mount again, sorry for the noise! -Jeff On 11/28/2011 03:47 PM, Jeff Liu wrote: > For an initial dir inode, stat(1) show it links as 1, IMHO it should be > 2 by default. > > Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx> > > --- > fs/btrfs/inode.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c > index 116ab67..92b3cb9 100644 > --- a/fs/btrfs/inode.c > +++ b/fs/btrfs/inode.c > @@ -4734,6 +4734,7 @@ static int btrfs_mkdir(struct inode *dir, struct > dentry *dentry, int mode) > inode->i_op = &btrfs_dir_inode_operations; > inode->i_fop = &btrfs_dir_file_operations; > > + set_nlink(inode, 2); > btrfs_i_size_write(inode, 0); > err = btrfs_update_inode(trans, root, inode); > if (err) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
