aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glock.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r--fs/gfs2/glock.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index ad8e121427c0..3984e47d1d33 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -684,10 +684,11 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
684 gl = search_bucket(hash, sdp, &name); 684 gl = search_bucket(hash, sdp, &name);
685 read_unlock(gl_lock_addr(hash)); 685 read_unlock(gl_lock_addr(hash));
686 686
687 if (gl || !create) { 687 *glp = gl;
688 *glp = gl; 688 if (gl)
689 return 0; 689 return 0;
690 } 690 if (!create)
691 return -ENOENT;
691 692
692 gl = kmem_cache_alloc(gfs2_glock_cachep, GFP_KERNEL); 693 gl = kmem_cache_alloc(gfs2_glock_cachep, GFP_KERNEL);
693 if (!gl) 694 if (!gl)