提交 ba7fe369 编写于 作者: P Pekka Enberg 提交者: Linus Torvalds

[PATCH] ext3: remove d_splice_alias NULL check from ext3_lookup

Remove redundant NULL check in ext3_lookup() as d_splice_alias() can take NULL
inode as input.
Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 082a05c6
...@@ -1005,10 +1005,7 @@ static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, str ...@@ -1005,10 +1005,7 @@ static struct dentry *ext3_lookup(struct inode * dir, struct dentry *dentry, str
if (!inode) if (!inode)
return ERR_PTR(-EACCES); return ERR_PTR(-EACCES);
} }
if (inode) return d_splice_alias(inode, dentry);
return d_splice_alias(inode, dentry);
d_add(dentry, inode);
return NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册