From ce50fc05413cca63e1d30368ee6274f7326613b8 Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Thu, 28 Jun 2018 15:11:54 -0500 Subject: [PATCH] xfs: make xfs_buf_incore out of line Source kernel commit: 8925a3dc4771004b3e697e7159fa87be2aa5dd43 Move xfs_buf_incore out of line and make it the only way to look up a buffer in the buffer cache from outside the buffer cache. Convert the external users of _xfs_buf_find() to xfs_buf_incore() and make _xfs_buf_find() static. Signed-Off-By: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong [darrick: actually rename xfs_incore -> xfs_buf_incore] Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- libxfs/libxfs_priv.h | 2 +- libxfs/xfs_attr_remote.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h index e5eb3de1f..4a394d946 100644 --- a/libxfs/libxfs_priv.h +++ b/libxfs/libxfs_priv.h @@ -373,7 +373,7 @@ roundup_64(uint64_t x, uint32_t y) #define XFS_BUF_SET_BDSTRAT_FUNC(a,b) ((void) 0) /* avoid gcc warning */ -#define xfs_incore(bt,blkno,len,lockit) ({ \ +#define xfs_buf_incore(bt,blkno,len,lockit) ({ \ typeof(blkno) __foo = (blkno); \ typeof(len) __bar = (len); \ (blkno) = __foo; \ diff --git a/libxfs/xfs_attr_remote.c b/libxfs/xfs_attr_remote.c index e75a46613..f80b6c954 100644 --- a/libxfs/xfs_attr_remote.c +++ b/libxfs/xfs_attr_remote.c @@ -615,7 +615,7 @@ xfs_attr_rmtval_remove( /* * If the "remote" value is in the cache, remove it. */ - bp = xfs_incore(mp->m_ddev_targp, dblkno, dblkcnt, XBF_TRYLOCK); + bp = xfs_buf_incore(mp->m_ddev_targp, dblkno, dblkcnt, XBF_TRYLOCK); if (bp) { xfs_buf_stale(bp); xfs_buf_relse(bp); -- 2.47.2