From: Christoph Hellwig Date: Thu, 11 May 2017 19:01:08 +0000 (-0500) Subject: xfs: remove attr fork handling in xfs_bmap_finish_one X-Git-Tag: v4.12.0-rc1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95855a23dcb4ba072c7084a954cd88c696a20d94;p=thirdparty%2Fxfsprogs-dev.git xfs: remove attr fork handling in xfs_bmap_finish_one 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index 4c7557f21..907e4db87 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -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;