]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove attr fork handling in xfs_bmap_finish_one
authorChristoph Hellwig <hch@lst.de>
Thu, 11 May 2017 19:01:08 +0000 (14:01 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 11 May 2017 19:01:08 +0000 (14:01 -0500)
Source kernel commit: 39e07daa46e34c724ad33f903d166a0a62c20900

We never do COW operations for the attr fork, so don't pretend we handle
them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c

index 4c7557f211f8b578136fe4fbe23685bde3d60063..907e4db876e1ace30c8fc154b2aa82fc5d2211d0 100644 (file)
@@ -6482,7 +6482,6 @@ xfs_bmap_finish_one(
        struct xfs_bmbt_irec            bmap;
        int                             nimaps = 1;
        xfs_fsblock_t                   firstfsb;
-       int                             flags = XFS_BMAPI_REMAP;
        int                             done;
        int                             error = 0;
 
@@ -6496,10 +6495,8 @@ xfs_bmap_finish_one(
                        XFS_FSB_TO_AGBNO(tp->t_mountp, startblock),
                        ip->i_ino, whichfork, startoff, blockcount, state);
 
-       if (whichfork != XFS_DATA_FORK && whichfork != XFS_ATTR_FORK)
+       if (WARN_ON_ONCE(whichfork != XFS_DATA_FORK))
                return -EFSCORRUPTED;
-       if (whichfork == XFS_ATTR_FORK)
-               flags |= XFS_BMAPI_ATTRFORK;
 
        if (XFS_TEST_ERROR(false, tp->t_mountp,
                        XFS_ERRTAG_BMAP_FINISH_ONE,
@@ -6510,13 +6507,13 @@ xfs_bmap_finish_one(
        case XFS_BMAP_MAP:
                firstfsb = bmap.br_startblock;
                error = xfs_bmapi_write(tp, ip, bmap.br_startoff,
-                                       bmap.br_blockcount, flags, &firstfsb,
+                                       bmap.br_blockcount, XFS_BMAPI_REMAP, &firstfsb,
                                        bmap.br_blockcount, &bmap, &nimaps,
                                        dfops);
                break;
        case XFS_BMAP_UNMAP:
                error = xfs_bunmapi(tp, ip, bmap.br_startoff,
-                               bmap.br_blockcount, flags, 1, &firstfsb,
+                               bmap.br_blockcount, XFS_BMAPI_REMAP, 1, &firstfsb,
                                dfops, &done);
                ASSERT(done);
                break;