diff options
Diffstat (limited to 'fs/gfs2/ops_inode.c')
-rw-r--r-- | fs/gfs2/ops_inode.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 291f0c7eaa3b..8386ab323e33 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -113,8 +113,18 @@ static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry, | |||
113 | if (inode && IS_ERR(inode)) | 113 | if (inode && IS_ERR(inode)) |
114 | return ERR_PTR(PTR_ERR(inode)); | 114 | return ERR_PTR(PTR_ERR(inode)); |
115 | 115 | ||
116 | if (inode) | 116 | if (inode) { |
117 | struct gfs2_glock *gl = GFS2_I(inode)->i_gl; | ||
118 | struct gfs2_holder gh; | ||
119 | int error; | ||
120 | error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); | ||
121 | if (error) { | ||
122 | iput(inode); | ||
123 | return ERR_PTR(error); | ||
124 | } | ||
125 | gfs2_glock_dq_uninit(&gh); | ||
117 | return d_splice_alias(inode, dentry); | 126 | return d_splice_alias(inode, dentry); |
127 | } | ||
118 | d_add(dentry, inode); | 128 | d_add(dentry, inode); |
119 | 129 | ||
120 | return NULL; | 130 | return NULL; |