Skip to content

Commit

Permalink
GFS2: Remove constant argument from qd_get()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Whitehouse committed Dec 3, 2009
1 parent 33a8252 commit 6a6ada8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/gfs2/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static int qd_alloc(struct gfs2_sbd *sdp, int user, u32 id,
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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 6a6ada8

Please sign in to comment.