diff mbox

[02/15] xfs: make better use of the 'state' variable in xfs_bmap_del_extent_real

Message ID 20171019065942.18813-3-hch@lst.de (mailing list archive)
State Accepted
Headers show

Commit Message

Christoph Hellwig Oct. 19, 2017, 6:59 a.m. UTC
We already have all the information about the fork aѕ well as additional
tracing information, so pass that to xfs_iext_remove().

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_bmap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Darrick J. Wong Oct. 19, 2017, 10:49 p.m. UTC | #1
On Thu, Oct 19, 2017 at 08:59:29AM +0200, Christoph Hellwig wrote:
> We already have all the information about the fork aѕ well as additional
> tracing information, so pass that to xfs_iext_remove().
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

> ---
>  fs/xfs/libxfs/xfs_bmap.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index 676fc8aed67f..06a9ac7dcdab 100644
> --- a/fs/xfs/libxfs/xfs_bmap.c
> +++ b/fs/xfs/libxfs/xfs_bmap.c
> @@ -5022,8 +5022,7 @@ xfs_bmap_del_extent_real(
>  		 * Matches the whole extent.  Delete the entry.
>  		 */
>  		trace_xfs_bmap_pre_update(ip, *idx, state, _THIS_IP_);
> -		xfs_iext_remove(ip, *idx, 1,
> -				whichfork == XFS_ATTR_FORK ? BMAP_ATTRFORK : 0);
> +		xfs_iext_remove(ip, *idx, 1, state);
>  		--*idx;
>  
>  		XFS_IFORK_NEXT_SET(ip, whichfork,
> -- 
> 2.14.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 676fc8aed67f..06a9ac7dcdab 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -5022,8 +5022,7 @@  xfs_bmap_del_extent_real(
 		 * Matches the whole extent.  Delete the entry.
 		 */
 		trace_xfs_bmap_pre_update(ip, *idx, state, _THIS_IP_);
-		xfs_iext_remove(ip, *idx, 1,
-				whichfork == XFS_ATTR_FORK ? BMAP_ATTRFORK : 0);
+		xfs_iext_remove(ip, *idx, 1, state);
 		--*idx;
 
 		XFS_IFORK_NEXT_SET(ip, whichfork,