aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2017-07-18 12:35:04 -0400
committerBob Peterson <rpeterso@redhat.com>2017-07-21 09:20:05 -0400
commitdf3d87bde121213560fde0edb71bc46f0f75692c (patch)
tree3efaafb3a13066a1c3d9421721b59cfabf5688fc /fs/gfs2/inode.c
parente477b24b507998bc6568316a2e034025960d2404 (diff)
GFS2: Introduce helper for clearing gl_object
This patch introduces a new helper function in glock.h that clears gl_object, with an added integrity check. An additional integrity check has been added to glock_set_object, plus comments. This is step 1 in a series to ensure gl_object integrity. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.c')
-rw-r--r--fs/gfs2/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index f9302f16a28e..2578bd824e34 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -201,14 +201,14 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type,
201 201
202fail_refresh: 202fail_refresh:
203 ip->i_iopen_gh.gh_flags |= GL_NOCACHE; 203 ip->i_iopen_gh.gh_flags |= GL_NOCACHE;
204 glock_set_object(ip->i_iopen_gh.gh_gl, NULL); 204 glock_clear_object(ip->i_iopen_gh.gh_gl, ip);
205 gfs2_glock_dq_uninit(&ip->i_iopen_gh); 205 gfs2_glock_dq_uninit(&ip->i_iopen_gh);
206fail_put: 206fail_put:
207 if (io_gl) 207 if (io_gl)
208 gfs2_glock_put(io_gl); 208 gfs2_glock_put(io_gl);
209 if (gfs2_holder_initialized(&i_gh)) 209 if (gfs2_holder_initialized(&i_gh))
210 gfs2_glock_dq_uninit(&i_gh); 210 gfs2_glock_dq_uninit(&i_gh);
211 glock_set_object(ip->i_gl, NULL); 211 glock_clear_object(ip->i_gl, ip);
212fail: 212fail:
213 iget_failed(inode); 213 iget_failed(inode);
214 return ERR_PTR(error); 214 return ERR_PTR(error);