]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/xfs/xfs_attr.c
dlm: use idr_for_each_entry() in recover_idr_clear() error path
[karo-tx-linux.git] / fs / xfs / xfs_attr.c
index aaf472532b3c37beb11c33ac56725ce6eda8c0ea..888683844d98f90d18d4ff17840f6546e8c72cdd 100644 (file)
@@ -300,9 +300,12 @@ xfs_attr_set_int(
        if (rsvd)
                args.trans->t_flags |= XFS_TRANS_RESERVE;
 
-       if ((error = xfs_trans_reserve(args.trans, args.total,
-                       XFS_ATTRSET_LOG_RES(mp, args.total), 0,
-                       XFS_TRANS_PERM_LOG_RES, XFS_ATTRSET_LOG_COUNT))) {
+       error = xfs_trans_reserve(args.trans, args.total,
+                                 XFS_ATTRSETM_LOG_RES(mp) +
+                                 XFS_ATTRSETRT_LOG_RES(mp) * args.total,
+                                 0, XFS_TRANS_PERM_LOG_RES,
+                                 XFS_ATTRSET_LOG_COUNT);
+       if (error) {
                xfs_trans_cancel(args.trans, 0);
                return(error);
        }