From 9dcf4021ba845fd7f15e26d44f52d61e588650f7 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 7 Oct 2010 13:21:26 -0400 Subject: [PATCH] pnfs: check status of pnfs_file_device_io_unit() avoids crashing against misconfigured servers Signed-off-by: Casey Bodley --- daemon/pnfs_io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/pnfs_io.c b/daemon/pnfs_io.c index 38e55a0..819d77a 100644 --- a/daemon/pnfs_io.c +++ b/daemon/pnfs_io.c @@ -147,7 +147,9 @@ static enum pnfs_status thread_next_unit( /* loop until we find an io unit that matches this thread */ while (thread->offset < thread->offset_end) { - pnfs_file_device_io_unit(pattern, thread->offset, io); + status = pnfs_file_device_io_unit(pattern, thread->offset, io); + if (status) + break; #ifdef PNFS_THREAD_BY_SERVER if (io->serverid == thread->id) {