diff mbox series

[23/25] libxfs: hide libxfs_getbuf_flags

Message ID 158258963505.451378.4733113816526643723.stgit@magnolia (mailing list archive)
State Superseded
Headers show
Series xfsprogs: refactor buffer function names | expand

Commit Message

Darrick J. Wong Feb. 25, 2020, 12:13 a.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Hide this function since it's internal to rdwr.c.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 libxfs/libxfs_io.h |    7 -------
 libxfs/rdwr.c      |   21 ++++++---------------
 2 files changed, 6 insertions(+), 22 deletions(-)
diff mbox series

Patch

diff --git a/libxfs/libxfs_io.h b/libxfs/libxfs_io.h
index c69eea97..7f513d86 100644
--- a/libxfs/libxfs_io.h
+++ b/libxfs/libxfs_io.h
@@ -144,9 +144,6 @@  extern struct cache_operations	libxfs_bcache_operations;
 #define libxfs_getbuf_map(dev, map, nmaps, flags) \
 	libxfs_trace_getbuf_map(__FUNCTION__, __FILE__, __LINE__, \
 			    (dev), (map), (nmaps), (flags))
-#define libxfs_getbuf_flags(dev, daddr, len, flags) \
-	libxfs_trace_getbuf_flags(__FUNCTION__, __FILE__, __LINE__, \
-			    (dev), (daddr), (len), (flags))
 #define libxfs_buf_relse(buf) \
 	libxfs_trace_putbuf(__FUNCTION__, __FILE__, __LINE__, (buf))
 
@@ -163,8 +160,6 @@  struct xfs_buf *libxfs_trace_getbuf(const char *func, const char *file,
 			size_t len);
 extern xfs_buf_t *libxfs_trace_getbuf_map(const char *, const char *, int,
 			struct xfs_buftarg *, struct xfs_buf_map *, int, int);
-extern xfs_buf_t *libxfs_trace_getbuf_flags(const char *, const char *, int,
-			struct xfs_buftarg *, xfs_daddr_t, int, unsigned int);
 extern void	libxfs_trace_putbuf (const char *, const char *, int,
 			xfs_buf_t *);
 
@@ -175,8 +170,6 @@  extern xfs_buf_t *libxfs_readbuf_map(struct xfs_buftarg *, struct xfs_buf_map *,
 void libxfs_buf_mark_dirty(struct xfs_buf *bp);
 extern xfs_buf_t *libxfs_getbuf_map(struct xfs_buftarg *,
 			struct xfs_buf_map *, int, int);
-extern xfs_buf_t *libxfs_getbuf_flags(struct xfs_buftarg *, xfs_daddr_t,
-			int, unsigned int);
 void	libxfs_buf_relse(struct xfs_buf *bp);
 
 static inline struct xfs_buf*
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index e46f749c..4b33c20d 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -150,7 +150,6 @@  static char *next(
 #undef libxfs_readbuf_map
 #undef libxfs_writebuf
 #undef libxfs_getbuf_map
-#undef libxfs_getbuf_flags
 
 xfs_buf_t	*libxfs_readbuf_map(struct xfs_buftarg *, struct xfs_buf_map *,
 				int, int, const struct xfs_buf_ops *);
@@ -159,8 +158,6 @@  struct xfs_buf *libxfs_buf_get(struct xfs_buftarg *btp, xfs_daddr_t daddr,
 				size_t len);
 xfs_buf_t	*libxfs_getbuf_map(struct xfs_buftarg *, struct xfs_buf_map *,
 				int, int);
-xfs_buf_t	*libxfs_getbuf_flags(struct xfs_buftarg *, xfs_daddr_t, int,
-				unsigned int);
 void		libxfs_buf_relse(struct xfs_buf *bp);
 
 #define	__add_trace(bp, func, file, line)	\
@@ -229,15 +226,6 @@  libxfs_trace_getbuf_map(const char *func, const char *file, int line,
 	return bp;
 }
 
-xfs_buf_t *
-libxfs_trace_getbuf_flags(const char *func, const char *file, int line,
-		struct xfs_buftarg *btp, xfs_daddr_t blkno, int len, unsigned int flags)
-{
-	xfs_buf_t	*bp = libxfs_getbuf_flags(btp, blkno, len, flags);
-	__add_trace(bp, func, file, line);
-	return bp;
-}
-
 void
 libxfs_trace_putbuf(const char *func, const char *file, int line, xfs_buf_t *bp)
 {
@@ -542,9 +530,12 @@  __cache_lookup(struct xfs_bufkey *key, unsigned int flags)
 	return NULL;
 }
 
-struct xfs_buf *
-libxfs_getbuf_flags(struct xfs_buftarg *btp, xfs_daddr_t blkno, int len,
-		unsigned int flags)
+static struct xfs_buf *
+libxfs_getbuf_flags(
+	struct xfs_buftarg	*btp,
+	xfs_daddr_t		blkno,
+	int			len,
+	unsigned int		flags)
 {
 	struct xfs_bufkey key = {NULL};