aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r--fs/gfs2/dir.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index a3753c7989f7..94070ad8826b 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1868,11 +1868,14 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
1868 if (!ht) 1868 if (!ht)
1869 return -ENOMEM; 1869 return -ENOMEM;
1870 1870
1871 gfs2_alloc_get(dip); 1871 if (!gfs2_alloc_get(dip)) {
1872 error = -ENOMEM;
1873 goto out;
1874 }
1872 1875
1873 error = gfs2_quota_hold(dip, NO_QUOTA_CHANGE, NO_QUOTA_CHANGE); 1876 error = gfs2_quota_hold(dip, NO_QUOTA_CHANGE, NO_QUOTA_CHANGE);
1874 if (error) 1877 if (error)
1875 goto out; 1878 goto out_put;
1876 1879
1877 error = gfs2_rindex_hold(sdp, &dip->i_alloc->al_ri_gh); 1880 error = gfs2_rindex_hold(sdp, &dip->i_alloc->al_ri_gh);
1878 if (error) 1881 if (error)
@@ -1946,8 +1949,9 @@ out_rlist:
1946 gfs2_glock_dq_uninit(&dip->i_alloc->al_ri_gh); 1949 gfs2_glock_dq_uninit(&dip->i_alloc->al_ri_gh);
1947out_qs: 1950out_qs:
1948 gfs2_quota_unhold(dip); 1951 gfs2_quota_unhold(dip);
1949out: 1952out_put:
1950 gfs2_alloc_put(dip); 1953 gfs2_alloc_put(dip);
1954out:
1951 kfree(ht); 1955 kfree(ht);
1952 return error; 1956 return error;
1953} 1957}