mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
gfs2: use d_splice_alias() for ->lookup() return value
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
02975a536d
commit
2555ac7a45
|
|
@ -987,12 +987,8 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry,
|
|||
int error;
|
||||
|
||||
inode = gfs2_lookupi(dir, &dentry->d_name, 0);
|
||||
if (inode == NULL) {
|
||||
d_add(dentry, NULL);
|
||||
return NULL;
|
||||
}
|
||||
if (IS_ERR(inode))
|
||||
return ERR_CAST(inode);
|
||||
if (inode == NULL || IS_ERR(inode))
|
||||
return d_splice_alias(inode, dentry);
|
||||
|
||||
gl = GFS2_I(inode)->i_gl;
|
||||
error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user