Skip to content

Commit

Permalink
ocfs2: remove unnecessary nlink setting
Browse files Browse the repository at this point in the history
alloc_inode() initializes i_nlink to 1.  Remove unnecessary
re-initialization.

Signed-off-by: Miklos Szeredi <[email protected]>
CC: Joel Becker <[email protected]>
CC: Mark Fasheh <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
  • Loading branch information
Miklos Szeredi authored and Christoph Hellwig committed Nov 2, 2011
1 parent c818b68 commit a7732b0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/ocfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ static struct inode *ocfs2_get_init_inode(struct inode *dir, int mode)
* callers. */
if (S_ISDIR(mode))
inode->i_nlink = 2;
else
inode->i_nlink = 1;
inode_init_owner(inode, dir, mode);
dquot_initialize(inode);
return inode;
Expand Down

0 comments on commit a7732b0

Please sign in to comment.