aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/xattr.c')
-rw-r--r--fs/gfs2/xattr.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c
index 695304cf01cc..167f4af53b1d 100644
--- a/fs/gfs2/xattr.c
+++ b/fs/gfs2/xattr.c
@@ -332,15 +332,8 @@ static int ea_remove_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh,
332 if (error) 332 if (error)
333 goto out_alloc; 333 goto out_alloc;
334 334
335 error = gfs2_rindex_hold(GFS2_SB(&ip->i_inode), &al->al_ri_gh);
336 if (error)
337 goto out_quota;
338
339 error = ea_dealloc_unstuffed(ip, bh, ea, prev, (leave) ? &error : NULL); 335 error = ea_dealloc_unstuffed(ip, bh, ea, prev, (leave) ? &error : NULL);
340 336
341 gfs2_glock_dq_uninit(&al->al_ri_gh);
342
343out_quota:
344 gfs2_quota_unhold(ip); 337 gfs2_quota_unhold(ip);
345out_alloc: 338out_alloc:
346 gfs2_alloc_put(ip); 339 gfs2_alloc_put(ip);
@@ -1502,24 +1495,18 @@ int gfs2_ea_dealloc(struct gfs2_inode *ip)
1502 if (error) 1495 if (error)
1503 goto out_alloc; 1496 goto out_alloc;
1504 1497
1505 error = gfs2_rindex_hold(GFS2_SB(&ip->i_inode), &al->al_ri_gh);
1506 if (error)
1507 goto out_quota;
1508
1509 error = ea_foreach(ip, ea_dealloc_unstuffed, NULL); 1498 error = ea_foreach(ip, ea_dealloc_unstuffed, NULL);
1510 if (error) 1499 if (error)
1511 goto out_rindex; 1500 goto out_quota;
1512 1501
1513 if (ip->i_diskflags & GFS2_DIF_EA_INDIRECT) { 1502 if (ip->i_diskflags & GFS2_DIF_EA_INDIRECT) {
1514 error = ea_dealloc_indirect(ip); 1503 error = ea_dealloc_indirect(ip);
1515 if (error) 1504 if (error)
1516 goto out_rindex; 1505 goto out_quota;
1517 } 1506 }
1518 1507
1519 error = ea_dealloc_block(ip); 1508 error = ea_dealloc_block(ip);
1520 1509
1521out_rindex:
1522 gfs2_glock_dq_uninit(&al->al_ri_gh);
1523out_quota: 1510out_quota:
1524 gfs2_quota_unhold(ip); 1511 gfs2_quota_unhold(ip);
1525out_alloc: 1512out_alloc: