Merge tag 'module-builtin_driver-v4.1-rc8' of git://git.kernel.org/pub/scm/linux...
[firefly-linux-kernel-4.4.55.git] / fs / xfs / libxfs / xfs_attr.c
index 0a472fbe06d46431a82cdb1f91aaa68755b2b944..3349c9a1e84569201cb5df93ae39dd1941f72209 100644 (file)
@@ -266,7 +266,7 @@ xfs_attr_set(
        tres.tr_logflags = XFS_TRANS_PERM_LOG_RES;
        error = xfs_trans_reserve(args.trans, &tres, args.total, 0);
        if (error) {
-               xfs_trans_cancel(args.trans, 0);
+               xfs_trans_cancel(args.trans);
                return error;
        }
        xfs_ilock(dp, XFS_ILOCK_EXCL);
@@ -276,7 +276,7 @@ xfs_attr_set(
                                       XFS_QMOPT_RES_REGBLKS);
        if (error) {
                xfs_iunlock(dp, XFS_ILOCK_EXCL);
-               xfs_trans_cancel(args.trans, XFS_TRANS_RELEASE_LOG_RES);
+               xfs_trans_cancel(args.trans);
                return error;
        }
 
@@ -320,8 +320,7 @@ xfs_attr_set(
                                xfs_trans_ichgtime(args.trans, dp,
                                                        XFS_ICHGTIME_CHG);
                        }
-                       err2 = xfs_trans_commit(args.trans,
-                                                XFS_TRANS_RELEASE_LOG_RES);
+                       err2 = xfs_trans_commit(args.trans);
                        xfs_iunlock(dp, XFS_ILOCK_EXCL);
 
                        return error ? error : err2;
@@ -383,16 +382,14 @@ xfs_attr_set(
         * Commit the last in the sequence of transactions.
         */
        xfs_trans_log_inode(args.trans, dp, XFS_ILOG_CORE);
-       error = xfs_trans_commit(args.trans, XFS_TRANS_RELEASE_LOG_RES);
+       error = xfs_trans_commit(args.trans);
        xfs_iunlock(dp, XFS_ILOCK_EXCL);
 
        return error;
 
 out:
-       if (args.trans) {
-               xfs_trans_cancel(args.trans,
-                       XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT);
-       }
+       if (args.trans)
+               xfs_trans_cancel(args.trans);
        xfs_iunlock(dp, XFS_ILOCK_EXCL);
        return error;
 }
@@ -462,7 +459,7 @@ xfs_attr_remove(
        error = xfs_trans_reserve(args.trans, &M_RES(mp)->tr_attrrm,
                                  XFS_ATTRRM_SPACE_RES(mp), 0);
        if (error) {
-               xfs_trans_cancel(args.trans, 0);
+               xfs_trans_cancel(args.trans);
                return error;
        }
 
@@ -501,16 +498,14 @@ xfs_attr_remove(
         * Commit the last in the sequence of transactions.
         */
        xfs_trans_log_inode(args.trans, dp, XFS_ILOG_CORE);
-       error = xfs_trans_commit(args.trans, XFS_TRANS_RELEASE_LOG_RES);
+       error = xfs_trans_commit(args.trans);
        xfs_iunlock(dp, XFS_ILOCK_EXCL);
 
        return error;
 
 out:
-       if (args.trans) {
-               xfs_trans_cancel(args.trans,
-                       XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT);
-       }
+       if (args.trans)
+               xfs_trans_cancel(args.trans);
        xfs_iunlock(dp, XFS_ILOCK_EXCL);
        return error;
 }