From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 03/12] GFS2: Remove obsolete code in quota.c
Date: Wed, 23 Sep 2009 14:15:23 +0100 [thread overview]
Message-ID: <1253711732-2955-4-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1253711732-2955-3-git-send-email-swhiteho@redhat.com>
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>
---
fs/gfs2/glock.h | 9 ---------
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 c609894..13f0bd2 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)
return gl->gl_state == LM_ST_SHARED;
}
-static inline int gfs2_glock_is_blocking(struct gfs2_glock *gl)
-{
- int ret;
- spin_lock(&gl->gl_spin);
- ret = test_bit(GLF_DEMOTE, &gl->gl_flags);
- spin_unlock(&gl->gl_spin);
- return ret;
-}
-
int gfs2_glock_get(struct gfs2_sbd *sdp,
u64 number, const struct gfs2_glock_operations *glops,
int create, struct gfs2_glock **glp);
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 73a43ce..6aaa6c5 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -843,9 +843,8 @@ restart:
if (force_refresh || qd->qd_qb.qb_magic != cpu_to_be32(GFS2_MAGIC)) {
loff_t pos;
gfs2_glock_dq_uninit(q_gh);
- error = gfs2_glock_nq_init(qd->qd_gl,
- LM_ST_EXCLUSIVE, GL_NOCACHE,
- q_gh);
+ error = gfs2_glock_nq_init(qd->qd_gl, LM_ST_EXCLUSIVE,
+ GL_NOCACHE, q_gh);
if (error)
return error;
@@ -871,11 +870,9 @@ restart:
qlvb->qb_value = cpu_to_be64(q.qu_value);
qd->qd_qb = *qlvb;
- if (gfs2_glock_is_blocking(qd->qd_gl)) {
- gfs2_glock_dq_uninit(q_gh);
- force_refresh = 0;
- goto restart;
- }
+ gfs2_glock_dq_uninit(q_gh);
+ force_refresh = 0;
+ goto restart;
}
return 0;
--
1.6.2.5
next prev parent reply other threads:[~2009-09-23 13:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-23 13:15 [Cluster-devel] GFS2: Another quota of quotas Steven Whitehouse
2009-09-23 13:15 ` [Cluster-devel] [PATCH 01/12] GFS2: Alter arguments of gfs2_quota/statfs_sync Steven Whitehouse
2009-09-23 13:15 ` [Cluster-devel] [PATCH 02/12] GFS2: Hook gfs2_quota_sync into VFS via gfs2_quotactl_ops Steven Whitehouse
2009-09-23 13:15 ` Steven Whitehouse [this message]
2009-09-23 13:15 ` [Cluster-devel] [PATCH 04/12] GFS2: Add get_xstate quota function Steven Whitehouse
2009-09-23 13:15 ` [Cluster-devel] [PATCH 05/12] GFS2: Add proper error reporting to quota sync via sysfs Steven Whitehouse
2009-09-23 13:15 ` [Cluster-devel] [PATCH 06/12] GFS2: Remove constant argument from qdsb_get() Steven Whitehouse
2009-09-23 13:15 ` [Cluster-devel] [PATCH 07/12] GFS2: Remove constant argument from qd_get() Steven Whitehouse
2009-09-23 13:15 ` [Cluster-devel] [PATCH 08/12] GFS2: Clean up gfs2_adjust_quota() and do_glock() Steven Whitehouse
2009-09-23 13:15 ` [Cluster-devel] [PATCH 09/12] GFS2: Add get_xquota support Steven Whitehouse
2009-09-23 13:15 ` [Cluster-devel] [PATCH 10/12] VFS: Export dquot_send_warning Steven Whitehouse
2009-09-23 15:49 ` [Cluster-devel] [PATCH 11/12] GFS2: Use dquot_send_warning() Steven Whitehouse
2009-09-23 15:50 ` [Cluster-devel] [PATCH 12/12] GFS2: Add set_xquota support Steven Whitehouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1253711732-2955-4-git-send-email-swhiteho@redhat.com \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).