|
@@ -219,7 +219,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
|
|
|
goto out_gunlock_q;
|
|
|
|
|
|
error = gfs2_trans_begin(sdp, sdp->sd_max_dirres +
|
|
|
- al->al_rgd->rd_length +
|
|
|
+ gfs2_rg_blocks(al) +
|
|
|
2 * RES_DINODE + RES_STATFS +
|
|
|
RES_QUOTA, 0);
|
|
|
if (error)
|
|
@@ -884,7 +884,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
|
|
|
goto out_gunlock_q;
|
|
|
|
|
|
error = gfs2_trans_begin(sdp, sdp->sd_max_dirres +
|
|
|
- al->al_rgd->rd_length +
|
|
|
+ gfs2_rg_blocks(al) +
|
|
|
4 * RES_DINODE + 4 * RES_LEAF +
|
|
|
RES_STATFS + RES_QUOTA + 4, 0);
|
|
|
if (error)
|
|
@@ -1481,7 +1481,7 @@ retry:
|
|
|
al->al_requested = data_blocks + ind_blocks;
|
|
|
|
|
|
rblocks = RES_DINODE + ind_blocks + RES_STATFS + RES_QUOTA +
|
|
|
- RES_RG_HDR + ip->i_alloc->al_rgd->rd_length;
|
|
|
+ RES_RG_HDR + gfs2_rg_blocks(al);
|
|
|
if (gfs2_is_jdata(ip))
|
|
|
rblocks += data_blocks ? data_blocks : 1;
|
|
|
|