Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269999
b: refs/heads/master
c: 8339ee5
h: refs/heads/master
i:
  269997: 2a58275
  269995: 29cd41f
  269991: bdca5d7
  269983: e0fe4cf
v: v3
  • Loading branch information
Steven Whitehouse committed Oct 21, 2011
1 parent 4d36445 commit b515ceb
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 175 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c9ca621137cde26be05448133fc1a554345f4f8
refs/heads/master: 8339ee543ece6e2dcc1bbd97d5350163c198cf00
7 changes: 0 additions & 7 deletions trunk/fs/gfs2/bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,11 +783,6 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
else if (ip->i_depth)
revokes = sdp->sd_inptrs;

if (ip != GFS2_I(sdp->sd_rindex))
error = gfs2_rindex_hold(sdp, &ip->i_alloc->al_ri_gh);
else if (!sdp->sd_rgrps)
error = gfs2_ri_update(ip);

if (error)
return error;

Expand Down Expand Up @@ -887,8 +882,6 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
out_rlist:
gfs2_rlist_free(&rlist);
out:
if (ip != GFS2_I(sdp->sd_rindex))
gfs2_glock_dq_uninit(&ip->i_alloc->al_ri_gh);
return error;
}

Expand Down
6 changes: 0 additions & 6 deletions trunk/fs/gfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1807,10 +1807,6 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
if (error)
goto out_put;

error = gfs2_rindex_hold(sdp, &dip->i_alloc->al_ri_gh);
if (error)
goto out_qs;

/* Count the number of leaves */
bh = leaf_bh;

Expand Down Expand Up @@ -1889,8 +1885,6 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
gfs2_glock_dq_m(rlist.rl_rgrps, rlist.rl_ghs);
out_rlist:
gfs2_rlist_free(&rlist);
gfs2_glock_dq_uninit(&dip->i_alloc->al_ri_gh);
out_qs:
gfs2_quota_unhold(dip);
out_put:
gfs2_alloc_put(dip);
Expand Down
16 changes: 6 additions & 10 deletions trunk/fs/gfs2/glops.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ void gfs2_ail_flush(struct gfs2_glock *gl)
static void rgrp_go_sync(struct gfs2_glock *gl)
{
struct address_space *metamapping = gfs2_glock2aspace(gl);
struct gfs2_rgrpd *rgd = gl->gl_object;
unsigned int x;
struct gfs2_rgrpd *rgd;
int error;

if (!test_and_clear_bit(GLF_DIRTY, &gl->gl_flags))
Expand All @@ -148,14 +147,11 @@ static void rgrp_go_sync(struct gfs2_glock *gl)
mapping_set_error(metamapping, error);
gfs2_ail_empty_gl(gl);

if (!rgd)
return;

for (x = 0; x < rgd->rd_length; x++) {
struct gfs2_bitmap *bi = rgd->rd_bits + x;
kfree(bi->bi_clone);
bi->bi_clone = NULL;
}
spin_lock(&gl->gl_spin);
rgd = gl->gl_object;
if (rgd)
gfs2_free_clones(rgd);
spin_unlock(&gl->gl_spin);
}

/**
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/gfs2/incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ struct gfs2_alloc {

unsigned int al_line;
char *al_file;
struct gfs2_holder al_ri_gh;
struct gfs2_holder al_rgd_gh;
struct gfs2_rgrpd *al_rgd;

Expand Down
15 changes: 2 additions & 13 deletions trunk/fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,13 +1041,8 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
struct buffer_head *bh;
struct gfs2_holder ghs[3];
struct gfs2_rgrpd *rgd;
struct gfs2_holder ri_gh;
int error;

error = gfs2_rindex_hold(sdp, &ri_gh);
if (error)
return error;

gfs2_holder_init(dip->i_gl, LM_ST_EXCLUSIVE, 0, ghs);
gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, ghs + 1);

Expand Down Expand Up @@ -1104,7 +1099,6 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
gfs2_glock_dq(ghs);
out_parent:
gfs2_holder_uninit(ghs);
gfs2_glock_dq_uninit(&ri_gh);
return error;
}

Expand Down Expand Up @@ -1222,7 +1216,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
struct gfs2_inode *ip = GFS2_I(odentry->d_inode);
struct gfs2_inode *nip = NULL;
struct gfs2_sbd *sdp = GFS2_SB(odir);
struct gfs2_holder ghs[5], r_gh = { .gh_gl = NULL, }, ri_gh;
struct gfs2_holder ghs[5], r_gh = { .gh_gl = NULL, };
struct gfs2_rgrpd *nrgd;
unsigned int num_gh;
int dir_rename = 0;
Expand All @@ -1236,10 +1230,6 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
return 0;
}

error = gfs2_rindex_hold(sdp, &ri_gh);
if (error)
return error;

if (odip != ndip) {
error = gfs2_glock_nq_init(sdp->sd_rename_gl, LM_ST_EXCLUSIVE,
0, &r_gh);
Expand Down Expand Up @@ -1376,7 +1366,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,

al->al_requested = sdp->sd_max_dirres;

error = gfs2_inplace_reserve_ri(ndip);
error = gfs2_inplace_reserve(ndip);
if (error)
goto out_gunlock_q;

Expand Down Expand Up @@ -1447,7 +1437,6 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
if (r_gh.gh_gl)
gfs2_glock_dq_uninit(&r_gh);
out:
gfs2_glock_dq_uninit(&ri_gh);
return error;
}

Expand Down
Loading

0 comments on commit b515ceb

Please sign in to comment.