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>
This commit is contained in:

committed by
Steven Whitehouse

parent
b3e47ca0c2
commit
564e12b115
@@ -1850,7 +1850,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
|
||||
if (!ht)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!gfs2_alloc_get(dip)) {
|
||||
if (!gfs2_qadata_get(dip)) {
|
||||
error = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
@@ -1939,7 +1939,7 @@ out_rlist:
|
||||
gfs2_rlist_free(&rlist);
|
||||
gfs2_quota_unhold(dip);
|
||||
out_put:
|
||||
gfs2_alloc_put(dip);
|
||||
gfs2_qadata_put(dip);
|
||||
out:
|
||||
kfree(ht);
|
||||
return error;
|
||||
|
Reference in New Issue
Block a user