diff mbox series

[14/18] libxfs: remove libxfs_writebuf_int

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

Commit Message

Darrick J. Wong Feb. 20, 2020, 1:44 a.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

This function is the same as libxfs_buf_dirty so use that instead.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 libxfs/libxfs_io.h |    1 -
 libxfs/rdwr.c      |   13 -------------
 libxfs/trans.c     |    2 +-
 3 files changed, 1 insertion(+), 15 deletions(-)

Comments

Christoph Hellwig Feb. 21, 2020, 2:53 p.m. UTC | #1
On Wed, Feb 19, 2020 at 05:44:02PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> This function is the same as libxfs_buf_dirty so use that instead.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/libxfs/libxfs_io.h b/libxfs/libxfs_io.h
index ad8acc1e..1f6e6d97 100644
--- a/libxfs/libxfs_io.h
+++ b/libxfs/libxfs_io.h
@@ -219,7 +219,6 @@  extern int	libxfs_bcache_overflowed(void);
 extern xfs_buf_t *libxfs_getbufr(struct xfs_buftarg *, xfs_daddr_t, int);
 extern void	libxfs_putbufr(xfs_buf_t *);
 
-extern int	libxfs_writebuf_int(xfs_buf_t *, int);
 int		libxfs_bwrite(struct xfs_buf *);
 extern int	libxfs_readbufr(struct xfs_buftarg *, xfs_daddr_t, xfs_buf_t *, int, int);
 extern int	libxfs_readbufr_map(struct xfs_buftarg *, struct xfs_buf *, int);
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index af363bef..9302a698 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -1225,19 +1225,6 @@  libxfs_bwrite(
 	return bp->b_error;
 }
 
-int
-libxfs_writebuf_int(xfs_buf_t *bp, int flags)
-{
-	/*
-	 * Clear any error hanging over from reading the buffer. This prevents
-	 * subsequent reads after this write from seeing stale errors.
-	 */
-	bp->b_error = 0;
-	bp->b_flags &= ~LIBXFS_B_STALE;
-	bp->b_flags |= (LIBXFS_B_DIRTY | flags);
-	return 0;
-}
-
 /*
  * Mark a buffer dirty.  The dirty data will be written out when the cache
  * is flushed (or at release time if the buffer is uncached).
diff --git a/libxfs/trans.c b/libxfs/trans.c
index 4c208422..e23ae598 100644
--- a/libxfs/trans.c
+++ b/libxfs/trans.c
@@ -863,7 +863,7 @@  buf_item_done(
 
 	hold = (bip->bli_flags & XFS_BLI_HOLD);
 	if (bip->bli_flags & XFS_BLI_DIRTY)
-		libxfs_writebuf_int(bp, 0);
+		libxfs_buf_dirty(bp, 0);
 
 	bip->bli_flags &= ~XFS_BLI_HOLD;
 	xfs_buf_item_put(bip);