]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: make xfs_buf_incore out of line
authorDave Chinner <dchinner@redhat.com>
Thu, 28 Jun 2018 20:11:54 +0000 (15:11 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 28 Jun 2018 20:11:54 +0000 (15:11 -0500)
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 <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
[darrick: actually rename xfs_incore -> xfs_buf_incore]
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/libxfs_priv.h
libxfs/xfs_attr_remote.c

index e5eb3de1f00d2832ff7a14e68958ea9200730427..4a394d94663b54161a86816227790232bf3bb67a 100644 (file)
@@ -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;                                \
index e75a46613b5d093dad79da66d40e37227e0f459e..f80b6c9548ec09dc42d3e0abc7e1f3ae3bbad339 100644 (file)
@@ -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);