summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/super.c
diff options
context:
space:
mode:
authorBob Peterson2012-05-18 15:28:23 +0200
committerSteven Whitehouse2012-06-06 12:20:22 +0200
commit5407e24229408d7586ee451a384fc13e4a2332be (patch)
tree7534b0d0fc69de50b6156ec4e384a71acf01dea1 /fs/gfs2/super.c
parentGFS2: Extend the life of the reservations (diff)
downloadkernel-qcow2-linux-5407e24229408d7586ee451a384fc13e4a2332be.tar.gz
kernel-qcow2-linux-5407e24229408d7586ee451a384fc13e4a2332be.tar.xz
kernel-qcow2-linux-5407e24229408d7586ee451a384fc13e4a2332be.zip
GFS2: Fold quota data into the reservations struct
This patch moves the ancillary quota data structures into the block reservations structure. This saves GFS2 some time and effort in allocating and deallocating the qadata structure. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r--fs/gfs2/super.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 65578df29446..81fc76264ed4 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1399,7 +1399,6 @@ static void gfs2_final_release_pages(struct gfs2_inode *ip)
static int gfs2_dinode_dealloc(struct gfs2_inode *ip)
{
struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
- struct gfs2_qadata *qa;
struct gfs2_rgrpd *rgd;
struct gfs2_holder gh;
int error;
@@ -1409,13 +1408,9 @@ static int gfs2_dinode_dealloc(struct gfs2_inode *ip)
return -EIO;
}
- qa = gfs2_qadata_get(ip);
- if (!qa)
- return -ENOMEM;
-
error = gfs2_quota_hold(ip, NO_QUOTA_CHANGE, NO_QUOTA_CHANGE);
if (error)
- goto out;
+ return error;
rgd = gfs2_blk2rgrpd(sdp, ip->i_no_addr, 1);
if (!rgd) {
@@ -1443,8 +1438,6 @@ out_rg_gunlock:
gfs2_glock_dq_uninit(&gh);
out_qs:
gfs2_quota_unhold(ip);
-out:
- gfs2_qadata_put(ip);
return error;
}