X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fcache.c;h=211c2b9e5b2ecbad22e77390a468f4408cba632e;hb=de946bbcea4c0bc0c92a858eae4d5c668e923c83;hp=1f10db0d3b119f4221f32cfabbbbf1cad96a3bd8;hpb=d2e23899649c348326f306b61d12fbd4f6fb0b66;p=bluesky.git diff --git a/bluesky/cache.c b/bluesky/cache.c index 1f10db0..211c2b9 100644 --- a/bluesky/cache.c +++ b/bluesky/cache.c @@ -32,6 +32,10 @@ static void writeback_complete(gpointer a, gpointer i) if (inode->change_count == inode->change_commit) { /* If inode is no longer dirty... */ inode->change_time = 0; + g_mutex_lock(inode->fs->lock); + bluesky_list_unlink(&inode->fs->dirty_list, inode->dirty_list); + inode->dirty_list = NULL; + g_mutex_unlock(inode->fs->lock); } g_mutex_unlock(inode->lock); @@ -70,6 +74,12 @@ static void flushd_inode(gpointer value, gpointer user_data) if (g_hash_table_remove(fs->inodes, &inode->inum)) bluesky_inode_unref(inode); } + bluesky_list_unlink(&inode->fs->accessed_list, + inode->accessed_list); + inode->accessed_list = NULL; + bluesky_list_unlink(&inode->fs->dirty_list, + inode->dirty_list); + inode->dirty_list = NULL; g_mutex_unlock(fs->lock); } }