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 07/12] GFS2: Remove constant argument from qd_get()
Date: Wed, 23 Sep 2009 14:15:27 +0100	[thread overview]
Message-ID: <1253711732-2955-8-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1253711732-2955-7-git-send-email-swhiteho@redhat.com>

This function was only ever called with the "create"
argument set to true, so we can remove it.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
 fs/gfs2/quota.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index f790f5a..db124af 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -165,7 +165,7 @@ fail:
 	return error;
 }
 
-static int qd_get(struct gfs2_sbd *sdp, int user, u32 id, int create,
+static int qd_get(struct gfs2_sbd *sdp, int user, u32 id,
 		  struct gfs2_quota_data **qdp)
 {
 	struct gfs2_quota_data *qd = NULL, *new_qd = NULL;
@@ -203,7 +203,7 @@ static int qd_get(struct gfs2_sbd *sdp, int user, u32 id, int create,
 
 		spin_unlock(&qd_lru_lock);
 
-		if (qd || !create) {
+		if (qd) {
 			if (new_qd) {
 				gfs2_glock_put(new_qd->qd_gl);
 				kmem_cache_free(gfs2_quotad_cachep, new_qd);
@@ -467,7 +467,7 @@ static int qdsb_get(struct gfs2_sbd *sdp, int user, u32 id,
 {
 	int error;
 
-	error = qd_get(sdp, user, id, CREATE, qdp);
+	error = qd_get(sdp, user, id, qdp);
 	if (error)
 		return error;
 
@@ -1117,7 +1117,7 @@ int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id)
 	struct gfs2_holder q_gh;
 	int error;
 
-	error = qd_get(sdp, user, id, CREATE, &qd);
+	error = qd_get(sdp, user, id, &qd);
 	if (error)
 		return error;
 
-- 
1.6.2.5



  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     ` [Cluster-devel] [PATCH 03/12] GFS2: Remove obsolete code in quota.c Steven Whitehouse
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             ` Steven Whitehouse [this message]
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-8-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).