summaryrefslogtreecommitdiff
path: root/linux/blkdev.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-04-13 09:36:26 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-04-13 21:10:24 -0400
commite99da4dddbbd17d57aecc0d287a92c378a623244 (patch)
treec34ae1c73bfdccc5c6d9be1b6c9d839337993b59 /linux/blkdev.c
parent7b35cb1e4a4b5fa01f9be108192af0b3036229c3 (diff)
xclose()
Add a helper to check for close errrors - especially bad file descriptors, that can be a fun source of heisenbugs. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'linux/blkdev.c')
-rw-r--r--linux/blkdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/blkdev.c b/linux/blkdev.c
index eb257d8b..d073ed6a 100644
--- a/linux/blkdev.c
+++ b/linux/blkdev.c
@@ -356,8 +356,8 @@ static void aio_cleanup(void)
put_task_struct(p);
- close(fds[0]);
- close(fds[1]);
+ xclose(fds[0]);
+ xclose(fds[1]);
}
static void aio_op(struct bio *bio, struct iovec *iov, unsigned i, int opcode)