mirror of https://gitee.com/openkylin/linux.git
hypfs: remove unnecessary nlink setting
alloc_inode() initializes i_nlink to 1. Remove unnecessary re-initialization. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> CC: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
2833eb2b46
commit
dc78610228
|
@ -109,8 +109,6 @@ static struct inode *hypfs_make_inode(struct super_block *sb, int mode)
|
|||
ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
|
||||
if (mode & S_IFDIR)
|
||||
ret->i_nlink = 2;
|
||||
else
|
||||
ret->i_nlink = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue