projects
/
bluesky.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add reference counting to asynchronous storage operations.
[bluesky.git]
/
bluesky
/
inode.c
diff --git
a/bluesky/inode.c
b/bluesky/inode.c
index
12cf7f7
..
44ef63c
100644
(file)
--- a/
bluesky/inode.c
+++ b/
bluesky/inode.c
@@
-170,6
+170,10
@@
BlueSkyInode *bluesky_get_inode(BlueSkyFS *fs, uint64_t inum)
{
BlueSkyInode *inode = NULL;
+ if (inum == 0) {
+ return NULL;
+ }
+
g_mutex_lock(fs->lock);
inode = (BlueSkyInode *)g_hash_table_lookup(fs->inodes, &inum);
@@
-232,4
+236,3
@@
void bluesky_superblock_flush(BlueSkyFS *fs)
bluesky_store_put(fs->store, "superblock", data);
}
-