diff options
author | David Teigland <teigland@redhat.com> | 2012-11-14 13:47:37 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-11-15 05:17:22 -0500 |
commit | 4e2f8849def738092ad6c0fc2b34737381bc9d26 (patch) | |
tree | dde6f02af206dcab6efe3b69f1ec7f2456500728 /fs/gfs2/glock.c | |
parent | dba2d70c5dc520fdb569d1fd8dbd45c0e330253e (diff) |
GFS2: remove redundant lvb pointer
The lksb struct already contains a pointer to the lvb,
so another directly from the glock struct is not needed.
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r-- | fs/gfs2/glock.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 2284de4d05ce..274b6bed5d67 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -108,7 +108,7 @@ static void gfs2_glock_dealloc(struct rcu_head *rcu) | |||
108 | if (gl->gl_ops->go_flags & GLOF_ASPACE) { | 108 | if (gl->gl_ops->go_flags & GLOF_ASPACE) { |
109 | kmem_cache_free(gfs2_glock_aspace_cachep, gl); | 109 | kmem_cache_free(gfs2_glock_aspace_cachep, gl); |
110 | } else { | 110 | } else { |
111 | kfree(gl->gl_lvb); | 111 | kfree(gl->gl_lksb.sb_lvbptr); |
112 | kmem_cache_free(gfs2_glock_cachep, gl); | 112 | kmem_cache_free(gfs2_glock_cachep, gl); |
113 | } | 113 | } |
114 | } | 114 | } |
@@ -740,15 +740,13 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, | |||
740 | return -ENOMEM; | 740 | return -ENOMEM; |
741 | 741 | ||
742 | memset(&gl->gl_lksb, 0, sizeof(struct dlm_lksb)); | 742 | memset(&gl->gl_lksb, 0, sizeof(struct dlm_lksb)); |
743 | gl->gl_lvb = NULL; | ||
744 | 743 | ||
745 | if (glops->go_flags & GLOF_LVB) { | 744 | if (glops->go_flags & GLOF_LVB) { |
746 | gl->gl_lvb = kzalloc(GFS2_MIN_LVB_SIZE, GFP_KERNEL); | 745 | gl->gl_lksb.sb_lvbptr = kzalloc(GFS2_MIN_LVB_SIZE, GFP_KERNEL); |
747 | if (!gl->gl_lvb) { | 746 | if (!gl->gl_lksb.sb_lvbptr) { |
748 | kmem_cache_free(cachep, gl); | 747 | kmem_cache_free(cachep, gl); |
749 | return -ENOMEM; | 748 | return -ENOMEM; |
750 | } | 749 | } |
751 | gl->gl_lksb.sb_lvbptr = gl->gl_lvb; | ||
752 | } | 750 | } |
753 | 751 | ||
754 | atomic_inc(&sdp->sd_glock_disposal); | 752 | atomic_inc(&sdp->sd_glock_disposal); |
@@ -789,7 +787,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, | |||
789 | tmp = search_bucket(hash, sdp, &name); | 787 | tmp = search_bucket(hash, sdp, &name); |
790 | if (tmp) { | 788 | if (tmp) { |
791 | spin_unlock_bucket(hash); | 789 | spin_unlock_bucket(hash); |
792 | kfree(gl->gl_lvb); | 790 | kfree(gl->gl_lksb.sb_lvbptr); |
793 | kmem_cache_free(cachep, gl); | 791 | kmem_cache_free(cachep, gl); |
794 | atomic_dec(&sdp->sd_glock_disposal); | 792 | atomic_dec(&sdp->sd_glock_disposal); |
795 | gl = tmp; | 793 | gl = tmp; |