xfs: remove xfs_trans_get_block_res
authorChristoph Hellwig <hch@lst.de>
Tue, 1 Mar 2016 22:58:21 +0000 (09:58 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 1 Mar 2016 22:58:21 +0000 (09:58 +1100)
Just use the t_blk_res field directly instead of obsfucating the reference
by a macro.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_bmap_btree.c
fs/xfs/xfs_trans.h

index ef00156f4f9616178006df4ef6248b1abb2297ab..0527e8b9bda3b1f22aa008fe88e44324f5ee0d09 100644 (file)
@@ -5210,7 +5210,7 @@ xfs_bunmapi(
                         * This is better than zeroing it.
                         */
                        ASSERT(del.br_state == XFS_EXT_NORM);
-                       ASSERT(xfs_trans_get_block_res(tp) > 0);
+                       ASSERT(tp->t_blk_res > 0);
                        /*
                         * If this spans a realtime extent boundary,
                         * chop it back to the start of the one we end at.
@@ -5241,7 +5241,7 @@ xfs_bunmapi(
                                del.br_startblock += mod;
                        } else if ((del.br_startoff == start &&
                                    (del.br_state == XFS_EXT_UNWRITTEN ||
-                                    xfs_trans_get_block_res(tp) == 0)) ||
+                                    tp->t_blk_res == 0)) ||
                                   !xfs_sb_version_hasextflgbit(&mp->m_sb)) {
                                /*
                                 * Can't make it unwritten.  There isn't
@@ -5332,7 +5332,7 @@ xfs_bunmapi(
                 * conversion to btree format, since the transaction
                 * will be dirty.
                 */
-               if (!wasdel && xfs_trans_get_block_res(tp) == 0 &&
+               if (!wasdel && tp->t_blk_res == 0 &&
                    XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_EXTENTS &&
                    XFS_IFORK_NEXTENTS(ip, whichfork) >= /* Note the >= */
                        XFS_IFORK_MAXEXT(ip, whichfork) &&
index 1637c37bfbaa1cb61ef69e48c52eb95716ecd649..e3eb3865b454c4cd666e22c5a9be6372803d17e5 100644 (file)
@@ -461,7 +461,7 @@ xfs_bmbt_alloc_block(
                 * reservation amount is insufficient then we may fail a
                 * block allocation here and corrupt the filesystem.
                 */
-               args.minleft = xfs_trans_get_block_res(args.tp);
+               args.minleft = args.tp->t_blk_res;
        } else if (cur->bc_private.b.flist->xbf_low) {
                args.type = XFS_ALLOCTYPE_START_BNO;
        } else {
@@ -470,7 +470,7 @@ xfs_bmbt_alloc_block(
 
        args.minlen = args.maxlen = args.prod = 1;
        args.wasdel = cur->bc_private.b.flags & XFS_BTCUR_BPRV_WASDEL;
-       if (!args.wasdel && xfs_trans_get_block_res(args.tp) == 0) {
+       if (!args.wasdel && args.tp->t_blk_res == 0) {
                error = -ENOSPC;
                goto error0;
        }
index 4643070d7cae4b814a36b101ba0a88fcd0c6287e..e7c49cf43fbc85c183e1728966d4f4506b94eaf6 100644 (file)
@@ -133,7 +133,6 @@ typedef struct xfs_trans {
  * XFS transaction mechanism exported interfaces that are
  * actually macros.
  */
-#define        xfs_trans_get_block_res(tp)     ((tp)->t_blk_res)
 #define        xfs_trans_set_sync(tp)          ((tp)->t_flags |= XFS_TRANS_SYNC)
 
 #if defined(DEBUG) || defined(XFS_WARN)
This page took 0.031096 seconds and 5 git commands to generate.