lkml.org 
[lkml]   [2011]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/13] ocfs2: remove unnecessary nlink setting
Date
From: Miklos Szeredi <mszeredi@suse.cz>

alloc_inode() initializes i_nlink to 1. Remove unnecessary
re-initialization.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: Joel Becker <jlbec@evilplan.org>
CC: Mark Fasheh <mfasheh@suse.com>
---
fs/ocfs2/namei.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index 53aa41e..0181f63 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -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;
--
1.7.3.4


\
 
 \ /
  Last update: 2011-10-12 16:53    [W:0.174 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site