aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/libxfs/xfs_attr.c')
-rw-r--r--fs/xfs/libxfs/xfs_attr.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index 1e671d4eb6fa..c6299f82a6e4 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -587,7 +587,7 @@ xfs_attr_leaf_addname(
587 */ 587 */
588 error = xfs_attr3_leaf_to_node(args); 588 error = xfs_attr3_leaf_to_node(args);
589 if (error) 589 if (error)
590 goto out_defer_cancel; 590 return error;
591 error = xfs_defer_finish(&args->trans); 591 error = xfs_defer_finish(&args->trans);
592 if (error) 592 if (error)
593 return error; 593 return error;
@@ -675,7 +675,7 @@ xfs_attr_leaf_addname(
675 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); 675 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff);
676 /* bp is gone due to xfs_da_shrink_inode */ 676 /* bp is gone due to xfs_da_shrink_inode */
677 if (error) 677 if (error)
678 goto out_defer_cancel; 678 return error;
679 error = xfs_defer_finish(&args->trans); 679 error = xfs_defer_finish(&args->trans);
680 if (error) 680 if (error)
681 return error; 681 return error;
@@ -693,9 +693,6 @@ xfs_attr_leaf_addname(
693 error = xfs_attr3_leaf_clearflag(args); 693 error = xfs_attr3_leaf_clearflag(args);
694 } 694 }
695 return error; 695 return error;
696out_defer_cancel:
697 xfs_defer_cancel(args->trans);
698 return error;
699} 696}
700 697
701/* 698/*
@@ -738,15 +735,12 @@ xfs_attr_leaf_removename(
738 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); 735 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff);
739 /* bp is gone due to xfs_da_shrink_inode */ 736 /* bp is gone due to xfs_da_shrink_inode */
740 if (error) 737 if (error)
741 goto out_defer_cancel; 738 return error;
742 error = xfs_defer_finish(&args->trans); 739 error = xfs_defer_finish(&args->trans);
743 if (error) 740 if (error)
744 return error; 741 return error;
745 } 742 }
746 return 0; 743 return 0;
747out_defer_cancel:
748 xfs_defer_cancel(args->trans);
749 return error;
750} 744}
751 745
752/* 746/*
@@ -864,7 +858,7 @@ restart:
864 state = NULL; 858 state = NULL;
865 error = xfs_attr3_leaf_to_node(args); 859 error = xfs_attr3_leaf_to_node(args);
866 if (error) 860 if (error)
867 goto out_defer_cancel; 861 goto out;
868 error = xfs_defer_finish(&args->trans); 862 error = xfs_defer_finish(&args->trans);
869 if (error) 863 if (error)
870 goto out; 864 goto out;
@@ -888,7 +882,7 @@ restart:
888 */ 882 */
889 error = xfs_da3_split(state); 883 error = xfs_da3_split(state);
890 if (error) 884 if (error)
891 goto out_defer_cancel; 885 goto out;
892 error = xfs_defer_finish(&args->trans); 886 error = xfs_defer_finish(&args->trans);
893 if (error) 887 if (error)
894 goto out; 888 goto out;
@@ -984,7 +978,7 @@ restart:
984 if (retval && (state->path.active > 1)) { 978 if (retval && (state->path.active > 1)) {
985 error = xfs_da3_join(state); 979 error = xfs_da3_join(state);
986 if (error) 980 if (error)
987 goto out_defer_cancel; 981 goto out;
988 error = xfs_defer_finish(&args->trans); 982 error = xfs_defer_finish(&args->trans);
989 if (error) 983 if (error)
990 goto out; 984 goto out;
@@ -1013,9 +1007,6 @@ out:
1013 if (error) 1007 if (error)
1014 return error; 1008 return error;
1015 return retval; 1009 return retval;
1016out_defer_cancel:
1017 xfs_defer_cancel(args->trans);
1018 goto out;
1019} 1010}
1020 1011
1021/* 1012/*
@@ -1107,7 +1098,7 @@ xfs_attr_node_removename(
1107 if (retval && (state->path.active > 1)) { 1098 if (retval && (state->path.active > 1)) {
1108 error = xfs_da3_join(state); 1099 error = xfs_da3_join(state);
1109 if (error) 1100 if (error)
1110 goto out_defer_cancel; 1101 goto out;
1111 error = xfs_defer_finish(&args->trans); 1102 error = xfs_defer_finish(&args->trans);
1112 if (error) 1103 if (error)
1113 goto out; 1104 goto out;
@@ -1138,7 +1129,7 @@ xfs_attr_node_removename(
1138 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); 1129 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff);
1139 /* bp is gone due to xfs_da_shrink_inode */ 1130 /* bp is gone due to xfs_da_shrink_inode */
1140 if (error) 1131 if (error)
1141 goto out_defer_cancel; 1132 goto out;
1142 error = xfs_defer_finish(&args->trans); 1133 error = xfs_defer_finish(&args->trans);
1143 if (error) 1134 if (error)
1144 goto out; 1135 goto out;
@@ -1150,9 +1141,6 @@ xfs_attr_node_removename(
1150out: 1141out:
1151 xfs_da_state_free(state); 1142 xfs_da_state_free(state);
1152 return error; 1143 return error;
1153out_defer_cancel:
1154 xfs_defer_cancel(args->trans);
1155 goto out;
1156} 1144}
1157 1145
1158/* 1146/*