aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/xattr.c')
-rw-r--r--fs/ocfs2/xattr.c38
1 files changed, 7 insertions, 31 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 3e7773089b96..4cf6fde71027 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -739,11 +739,7 @@ static int ocfs2_xattr_extend_allocation(struct inode *inode,
739 goto leave; 739 goto leave;
740 } 740 }
741 741
742 status = ocfs2_journal_dirty(handle, vb->vb_bh); 742 ocfs2_journal_dirty(handle, vb->vb_bh);
743 if (status < 0) {
744 mlog_errno(status);
745 goto leave;
746 }
747 743
748 clusters_to_add -= le32_to_cpu(vb->vb_xv->xr_clusters) - prev_clusters; 744 clusters_to_add -= le32_to_cpu(vb->vb_xv->xr_clusters) - prev_clusters;
749 745
@@ -786,12 +782,7 @@ static int __ocfs2_remove_xattr_range(struct inode *inode,
786 } 782 }
787 783
788 le32_add_cpu(&vb->vb_xv->xr_clusters, -len); 784 le32_add_cpu(&vb->vb_xv->xr_clusters, -len);
789 785 ocfs2_journal_dirty(handle, vb->vb_bh);
790 ret = ocfs2_journal_dirty(handle, vb->vb_bh);
791 if (ret) {
792 mlog_errno(ret);
793 goto out;
794 }
795 786
796 if (ext_flags & OCFS2_EXT_REFCOUNTED) 787 if (ext_flags & OCFS2_EXT_REFCOUNTED)
797 ret = ocfs2_decrease_refcount(inode, handle, 788 ret = ocfs2_decrease_refcount(inode, handle,
@@ -1374,11 +1365,7 @@ static int __ocfs2_xattr_set_value_outside(struct inode *inode,
1374 memset(bh->b_data + cp_len, 0, 1365 memset(bh->b_data + cp_len, 0,
1375 blocksize - cp_len); 1366 blocksize - cp_len);
1376 1367
1377 ret = ocfs2_journal_dirty(handle, bh); 1368 ocfs2_journal_dirty(handle, bh);
1378 if (ret < 0) {
1379 mlog_errno(ret);
1380 goto out;
1381 }
1382 brelse(bh); 1369 brelse(bh);
1383 bh = NULL; 1370 bh = NULL;
1384 1371
@@ -2594,9 +2581,7 @@ int ocfs2_xattr_remove(struct inode *inode, struct buffer_head *di_bh)
2594 di->i_dyn_features = cpu_to_le16(oi->ip_dyn_features); 2581 di->i_dyn_features = cpu_to_le16(oi->ip_dyn_features);
2595 spin_unlock(&oi->ip_lock); 2582 spin_unlock(&oi->ip_lock);
2596 2583
2597 ret = ocfs2_journal_dirty(handle, di_bh); 2584 ocfs2_journal_dirty(handle, di_bh);
2598 if (ret < 0)
2599 mlog_errno(ret);
2600out_commit: 2585out_commit:
2601 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); 2586 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle);
2602out: 2587out:
@@ -2724,9 +2709,7 @@ static int ocfs2_xattr_ibody_init(struct inode *inode,
2724 di->i_dyn_features = cpu_to_le16(oi->ip_dyn_features); 2709 di->i_dyn_features = cpu_to_le16(oi->ip_dyn_features);
2725 spin_unlock(&oi->ip_lock); 2710 spin_unlock(&oi->ip_lock);
2726 2711
2727 ret = ocfs2_journal_dirty(ctxt->handle, di_bh); 2712 ocfs2_journal_dirty(ctxt->handle, di_bh);
2728 if (ret < 0)
2729 mlog_errno(ret);
2730 2713
2731out: 2714out:
2732 return ret; 2715 return ret;
@@ -5153,9 +5136,7 @@ static int ocfs2_add_new_xattr_cluster(struct inode *inode,
5153 goto leave; 5136 goto leave;
5154 } 5137 }
5155 5138
5156 ret = ocfs2_journal_dirty(handle, root_bh); 5139 ocfs2_journal_dirty(handle, root_bh);
5157 if (ret < 0)
5158 mlog_errno(ret);
5159 5140
5160leave: 5141leave:
5161 return ret; 5142 return ret;
@@ -5477,12 +5458,7 @@ static int ocfs2_rm_xattr_cluster(struct inode *inode,
5477 } 5458 }
5478 5459
5479 le32_add_cpu(&xb->xb_attrs.xb_root.xt_clusters, -len); 5460 le32_add_cpu(&xb->xb_attrs.xb_root.xt_clusters, -len);
5480 5461 ocfs2_journal_dirty(handle, root_bh);
5481 ret = ocfs2_journal_dirty(handle, root_bh);
5482 if (ret) {
5483 mlog_errno(ret);
5484 goto out_commit;
5485 }
5486 5462
5487 ret = ocfs2_truncate_log_append(osb, handle, blkno, len); 5463 ret = ocfs2_truncate_log_append(osb, handle, blkno, len);
5488 if (ret) 5464 if (ret)