[PATCH 03/25] libxfs: remove LIBXFS_B_EXIT

Darrick J. Wong
2020-02-25T00:11:53Z

Now that we've removed all users of LIBXFS_B_EXIT, remove it as well.

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

diff --git a/libxfs/libxfs_io.h b/libxfs/libxfs_io.h
index 87c6ea3e..716db553 100644
--- a/libxfs/libxfs_io.h
+++ b/libxfs/libxfs_io.h
@@ -91,7 +91,6 @@ bool xfs_verify_magic(struct xfs_buf *bp, __be32 dmagic);
bool xfs_verify_magic16(struct xfs_buf *bp, __be16 dmagic);

/* b_flags bits */
-#define LIBXFS_B_EXIT 0x0001 /* exit if write fails */
#define LIBXFS_B_DIRTY 0x0002 /* buffer has been modified */
#define LIBXFS_B_STALE 0x0004 /* buffer marked as invalid */
#define LIBXFS_B_UPTODATE 0x0008 /* buffer is sync'd to disk */
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index 011b449d..45b535e4 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -1075,14 +1075,10 @@ __write_buf(int fd, void *buf, int len, off64_t offset, int flags)
int error = errno;
fprintf(stderr, _("%s: pwrite failed: %s\n"),
progname, strerror(error));
- if (flags & LIBXFS_B_EXIT)
- exit(1);
return -error;
} else if (sts != len) {
fprintf(stderr, _("%s: error - pwrite only %d of %d bytes\n"),
progname, sts, len);
- if (flags & LIBXFS_B_EXIT)
- exit(1);
return -EIO;
}
return 0;
@@ -1153,8 +1149,7 @@ libxfs_writebufr(xfs_buf_t *bp)
(long long)bp->b_bn, bp->b_bcount, -bp->b_error);
} else {
bp->b_flags |= LIBXFS_B_UPTODATE;
- bp->b_flags &= ~(LIBXFS_B_DIRTY | LIBXFS_B_EXIT |
- LIBXFS_B_UNCHECKED);
+ bp->b_flags &= ~(LIBXFS_B_DIRTY | LIBXFS_B_UNCHECKED);
}
return bp->b_error;
}