diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2009-09-11 10:21:56 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-12-03 06:49:30 -0500 |
commit | 91094d0fb650decd8bf48b85d86c892d7ca913ee (patch) | |
tree | ed3b0ba8e852e8491d203df07766e4c37ed12d87 /fs | |
parent | cc632e7f93465597896862cf9e50baefb1999215 (diff) |
GFS2: Remove obsolete code in quota.c
There is no point in testing for GLF_DEMOTE here, we might as
well always release the glock at that point.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/glock.h | 9 | ||||
-rw-r--r-- | fs/gfs2/quota.c | 13 |
2 files changed, 5 insertions, 17 deletions
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index c609894ec0d0..13f0bd228132 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h | |||
@@ -180,15 +180,6 @@ static inline int gfs2_glock_is_held_shrd(struct gfs2_glock *gl) | |||
180 | return gl->gl_state == LM_ST_SHARED; | 180 | return gl->gl_state == LM_ST_SHARED; |
181 | } | 181 | } |
182 | 182 | ||
183 | static inline int gfs2_glock_is_blocking(struct gfs2_glock *gl) | ||
184 | { | ||
185 | int ret; | ||
186 | spin_lock(&gl->gl_spin); | ||
187 | ret = test_bit(GLF_DEMOTE, &gl->gl_flags); | ||
188 | spin_unlock(&gl->gl_spin); | ||
189 | return ret; | ||
190 | } | ||
191 | |||
192 | int gfs2_glock_get(struct gfs2_sbd *sdp, | 183 | int gfs2_glock_get(struct gfs2_sbd *sdp, |
193 | u64 number, const struct gfs2_glock_operations *glops, | 184 | u64 number, const struct gfs2_glock_operations *glops, |
194 | int create, struct gfs2_glock **glp); | 185 | int create, struct gfs2_glock **glp); |
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 73a43cee0ea3..6aaa6c5e21bc 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -843,9 +843,8 @@ restart: | |||
843 | if (force_refresh || qd->qd_qb.qb_magic != cpu_to_be32(GFS2_MAGIC)) { | 843 | if (force_refresh || qd->qd_qb.qb_magic != cpu_to_be32(GFS2_MAGIC)) { |
844 | loff_t pos; | 844 | loff_t pos; |
845 | gfs2_glock_dq_uninit(q_gh); | 845 | gfs2_glock_dq_uninit(q_gh); |
846 | error = gfs2_glock_nq_init(qd->qd_gl, | 846 | error = gfs2_glock_nq_init(qd->qd_gl, LM_ST_EXCLUSIVE, |
847 | LM_ST_EXCLUSIVE, GL_NOCACHE, | 847 | GL_NOCACHE, q_gh); |
848 | q_gh); | ||
849 | if (error) | 848 | if (error) |
850 | return error; | 849 | return error; |
851 | 850 | ||
@@ -871,11 +870,9 @@ restart: | |||
871 | qlvb->qb_value = cpu_to_be64(q.qu_value); | 870 | qlvb->qb_value = cpu_to_be64(q.qu_value); |
872 | qd->qd_qb = *qlvb; | 871 | qd->qd_qb = *qlvb; |
873 | 872 | ||
874 | if (gfs2_glock_is_blocking(qd->qd_gl)) { | 873 | gfs2_glock_dq_uninit(q_gh); |
875 | gfs2_glock_dq_uninit(q_gh); | 874 | force_refresh = 0; |
876 | force_refresh = 0; | 875 | goto restart; |
877 | goto restart; | ||
878 | } | ||
879 | } | 876 | } |
880 | 877 | ||
881 | return 0; | 878 | return 0; |