cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 03/10] GFS2: Remove obsolete code in quota.c
Date: Wed, 16 Sep 2009 16:03:35 +0100	[thread overview]
Message-ID: <1253113422-3429-4-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1253113422-3429-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



  reply	other threads:[~2009-09-16 15:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16 15:03 [Cluster-devel] Mostly quotas Steven Whitehouse
2009-09-16 15:03 ` [Cluster-devel] [PATCH 01/10] GFS2: Alter arguments of gfs2_quota/statfs_sync Steven Whitehouse
2009-09-16 15:03   ` [Cluster-devel] [PATCH 02/10] GFS2: Hook gfs2_quota_sync into VFS via gfs2_quotactl_ops Steven Whitehouse
2009-09-16 15:03     ` Steven Whitehouse [this message]
2009-09-16 15:03       ` [Cluster-devel] [PATCH 04/10] GFS2: Add get_xstate quota function Steven Whitehouse
2009-09-16 15:03         ` [Cluster-devel] [PATCH 05/10] GFS2: Remove sysfs "done" files Steven Whitehouse
2009-09-16 15:03           ` [Cluster-devel] [PATCH 06/10] GFS2: Add proper error reporting to quota sync via sysfs Steven Whitehouse
2009-09-16 15:03             ` [Cluster-devel] [PATCH 07/10] GFS2: Remove constant argument from qdsb_get() Steven Whitehouse
2009-09-16 15:03               ` [Cluster-devel] [PATCH 08/10] GFS2: Remove constant argument from qd_get() Steven Whitehouse
2009-09-16 15:03                 ` [Cluster-devel] [PATCH 09/10] GFS2: Clean up gfs2_adjust_quota() and do_glock() Steven Whitehouse
2009-09-16 15:03                   ` [Cluster-devel] [PATCH 10/10] GFS2: Add get_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=1253113422-3429-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).