[Ocfs2-tools-devel] [PATCH 1/2] Return zero when we find the cache
in io_cache_read_one_block.
Tao Ma
tao.ma at oracle.com
Thu Oct 18 23:57:08 PDT 2007
When we find the cache in io_cache_read_one_block, we will copy
the date cache and return directly, but the return value isn't
initialized. So initialize it to "0" to return.
Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
libocfs2/unix_io.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libocfs2/unix_io.c b/libocfs2/unix_io.c
index de38611..65f2791 100644
--- a/libocfs2/unix_io.c
+++ b/libocfs2/unix_io.c
@@ -238,7 +238,7 @@ static struct io_cache_block *io_cache_pop_lru(struct io_cache *ic)
static errcode_t io_cache_read_one_block(io_channel *channel, int64_t blkno,
char *data)
{
- errcode_t ret;
+ errcode_t ret = 0;
struct io_cache *ic = channel->io_cache;
struct io_cache_block *icb;
--
1.5.3.2.g4f337
More information about the Ocfs2-tools-devel
mailing list