]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: remove i_transp
authorEric Sandeen <sandeen@redhat.com>
Thu, 16 May 2019 17:05:36 +0000 (13:05 -0400)
committerEric Sandeen <sandeen@redhat.com>
Thu, 16 May 2019 17:05:36 +0000 (13:05 -0400)
i_transp was removed from kernel code back in 2011, but it was left
in userspace.  It's only used in a few asserts in transaction code
(as it was in the kernel) so there doesnt' seem to be a compelling
reason to carry it around anymore.

Source kernel commit: f3ca87389dbff0a3dc1a7cb2fa7c62e25421c66c

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_inode.h
libxfs/trans.c

index 52d79f3c42678b5e9de4971ba437df1af8958edf..88b58ac38fd6783388231c7602b376cddc0b7d8e 100644 (file)
@@ -41,7 +41,6 @@ typedef struct xfs_inode {
        struct xfs_ifork        *i_afp;         /* attribute fork pointer */
        struct xfs_ifork        *i_cowfp;       /* copy on write extents */
        struct xfs_ifork        i_df;           /* data fork */
-       struct xfs_trans        *i_transp;      /* ptr to owning transaction */
        struct xfs_inode_log_item *i_itemp;     /* logging information */
        unsigned int            i_delayed_blks; /* count of delay alloc blks */
        struct xfs_icdinode     i_d;            /* most of ondisk inode */
index db90624be9116480b5530a49a15cda81ecf1d16d..101019b0c4354f84954b9e8626000e4fb418f2f0 100644 (file)
@@ -344,7 +344,6 @@ libxfs_trans_ijoin(
 {
        xfs_inode_log_item_t    *iip;
 
-       ASSERT(ip->i_transp == NULL);
        if (ip->i_itemp == NULL)
                xfs_inode_item_init(ip, ip->i_mount);
        iip = ip->i_itemp;
@@ -356,7 +355,6 @@ libxfs_trans_ijoin(
 
        xfs_trans_add_item(tp, (xfs_log_item_t *)(iip));
 
-       ip->i_transp = tp;
 #ifdef XACT_DEBUG
        fprintf(stderr, "ijoin'd inode %llu, transaction %p\n", ip->i_ino, tp);
 #endif
@@ -368,7 +366,6 @@ libxfs_trans_ijoin_ref(
        xfs_inode_t             *ip,
        int                     lock_flags)
 {
-       ASSERT(ip->i_transp == tp);
        ASSERT(ip->i_itemp != NULL);
 
        xfs_trans_ijoin(tp, ip, lock_flags);
@@ -406,7 +403,6 @@ xfs_trans_log_inode(
        xfs_inode_t             *ip,
        uint                    flags)
 {
-       ASSERT(ip->i_transp == tp);
        ASSERT(ip->i_itemp != NULL);
 #ifdef XACT_DEBUG
        fprintf(stderr, "dirtied inode %llu, transaction %p\n", ip->i_ino, tp);
@@ -817,7 +813,6 @@ inode_item_done(
        ASSERT(ip != NULL);
 
        if (!(iip->ili_fields & XFS_ILOG_ALL)) {
-               ip->i_transp = NULL;    /* disassociate from transaction */
                iip->ili_flags = 0;     /* reset all flags */
                goto free;
        }
@@ -838,7 +833,6 @@ inode_item_done(
         * we still release the buffer reference we currently hold.
         */
        error = libxfs_iflush_int(ip, bp);
-       ip->i_transp = NULL;    /* disassociate from transaction */
        bp->b_transp = NULL;    /* remove xact ptr */
 
        if (error) {
@@ -927,11 +921,6 @@ static void
 inode_item_unlock(
        xfs_inode_log_item_t    *iip)
 {
-       xfs_inode_t             *ip = iip->ili_inode;
-
-       /* Clear the transaction pointer in the inode. */
-       ip->i_transp = NULL;
-
        iip->ili_flags = 0;
        xfs_inode_item_put(iip);
 }