This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch andyp-removeexit
in repository gfs2-utils.
commit 4ec44027fbaf99bf4749dd2e83e358416e794974
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Jan 11 10:41:31 2023 +0000
Remove some exit() calls
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/fs_ops.c | 6 +++---
gfs2/libgfs2/recovery.c | 4 ++--
gfs2/libgfs2/structures.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index 515b527f..66809014 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -617,9 +617,9 @@ int lgfs2_readi(struct lgfs2_inode *ip, void *buf, uint64_t offset,
unsigned int
if (!extlen) {
if (sdp->gfs1) {
if (lgfs2_gfs1_block_map(ip, lblock, ¬_new, &dblock, &extlen, 0))
- exit(1);
+ return -1;
} else if (lgfs2_block_map(ip, lblock, ¬_new, &dblock, &extlen, 0))
- exit(1);
+ return -1;
}
if (dblock) {
@@ -702,7 +702,7 @@ int __lgfs2_writei(struct lgfs2_inode *ip, void *buf,
if (!extlen) {
new = 1;
if (lgfs2_block_map(ip, lblock, &new, &dblock, &extlen, 0))
- exit(1);
+ return -1;
}
if (new) {
diff --git a/gfs2/libgfs2/recovery.c b/gfs2/libgfs2/recovery.c
index 7d5057e7..9db19fff 100644
--- a/gfs2/libgfs2/recovery.c
+++ b/gfs2/libgfs2/recovery.c
@@ -29,7 +29,7 @@ int lgfs2_replay_read_block(struct lgfs2_inode *ip, unsigned int blk,
uint64_t dblock;
if (lgfs2_block_map(ip, blk, &new, &dblock, NULL, 0))
- exit(1);
+ return -EINVAL;
if (!dblock)
return -EIO;
@@ -243,7 +243,7 @@ int lgfs2_clean_journal(struct lgfs2_inode *ip, struct
lgfs2_log_header *head)
lblock = head->lh_blkno;
lgfs2_replay_incr_blk(ip, &lblock);
if (lgfs2_block_map(ip, lblock, &new, &dblock, NULL, 0))
- exit(1);
+ return -EINVAL;
if (!dblock)
return -EIO;
diff --git a/gfs2/libgfs2/structures.c b/gfs2/libgfs2/structures.c
index aeb20ba8..fa413f7d 100644
--- a/gfs2/libgfs2/structures.c
+++ b/gfs2/libgfs2/structures.c
@@ -161,7 +161,7 @@ static struct lgfs2_buffer_head *lgfs2_get_file_buf(struct lgfs2_inode
*ip, uint
return NULL;
if (lgfs2_block_map(ip, lbn, &new, &dbn, NULL, prealloc))
- exit(1);
+ return NULL;
if (!dbn)
return NULL;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.