aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2011-11-21 13:36:17 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2011-11-22 05:25:21 -0500
commit564e12b1157215171e7f3af5b70611ec7154327c (patch)
treef2a6e3394e59209f8e43a36f10f67bf1372c966c /fs/gfs2/dir.c
parentb3e47ca0c2427ec72a74e36c6408784b6098f2b5 (diff)
GFS2: decouple quota allocations from block allocations
This patch separates the code pertaining to allocations into two parts: quota-related information and block reservations. This patch also moves all the block reservation structure allocations to function gfs2_inplace_reserve to simplify the code, and moves the frees to function gfs2_inplace_release. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r--fs/gfs2/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index f8485da3b853..c35573abd371 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1850,7 +1850,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
1850 if (!ht) 1850 if (!ht)
1851 return -ENOMEM; 1851 return -ENOMEM;
1852 1852
1853 if (!gfs2_alloc_get(dip)) { 1853 if (!gfs2_qadata_get(dip)) {
1854 error = -ENOMEM; 1854 error = -ENOMEM;
1855 goto out; 1855 goto out;
1856 } 1856 }
@@ -1939,7 +1939,7 @@ out_rlist:
1939 gfs2_rlist_free(&rlist); 1939 gfs2_rlist_free(&rlist);
1940 gfs2_quota_unhold(dip); 1940 gfs2_quota_unhold(dip);
1941out_put: 1941out_put:
1942 gfs2_alloc_put(dip); 1942 gfs2_qadata_put(dip);
1943out: 1943out:
1944 kfree(ht); 1944 kfree(ht);
1945 return error; 1945 return error;