[Sheepdog] [PATCH] sheep/simple_store: fix a NULL pointer exception

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Feb 27 19:33:51 CET 2012


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/simple_store.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sheep/simple_store.c b/sheep/simple_store.c
index 3597926..e1cfeca 100644
--- a/sheep/simple_store.c
+++ b/sheep/simple_store.c
@@ -32,7 +32,7 @@ extern mode_t def_fmode;
 
 static int def_store_flags = O_DSYNC | O_RDWR;
 
-struct store_driver store;
+static int simple_store_write(uint64_t oid, struct siocb *iocb);
 
 static int simple_store_init(char *path)
 {
@@ -95,7 +95,7 @@ static int store_write_last_sector(uint64_t oid, struct siocb *iocb)
 	iocb->buf = buf;
 	iocb->length = size;
 	iocb->offset = SD_DATA_OBJ_SIZE - size;
-	ret = store.write(oid, iocb);
+	ret = simple_store_write(oid, iocb);
 	free(buf);
 
 	return ret;
-- 
1.7.2.5




More information about the sheepdog mailing list