summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.c
diff options
context:
space:
mode:
authorBob Peterson2017-07-18 18:35:04 +0200
committerBob Peterson2017-07-21 15:20:05 +0200
commitdf3d87bde121213560fde0edb71bc46f0f75692c (patch)
tree3efaafb3a13066a1c3d9421721b59cfabf5688fc /fs/gfs2/inode.c
parentgfs2: add flag REQ_PRIO for metadata I/O (diff)
downloadkernel-qcow2-linux-df3d87bde121213560fde0edb71bc46f0f75692c.tar.gz
kernel-qcow2-linux-df3d87bde121213560fde0edb71bc46f0f75692c.tar.xz
kernel-qcow2-linux-df3d87bde121213560fde0edb71bc46f0f75692c.zip
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,
fail_refresh:
ip->i_iopen_gh.gh_flags |= GL_NOCACHE;
- glock_set_object(ip->i_iopen_gh.gh_gl, NULL);
+ glock_clear_object(ip->i_iopen_gh.gh_gl, ip);
gfs2_glock_dq_uninit(&ip->i_iopen_gh);
fail_put:
if (io_gl)
gfs2_glock_put(io_gl);
if (gfs2_holder_initialized(&i_gh))
gfs2_glock_dq_uninit(&i_gh);
- glock_set_object(ip->i_gl, NULL);
+ glock_clear_object(ip->i_gl, ip);
fail:
iget_failed(inode);
return ERR_PTR(error);