the sync is actually needed when the pages get freed, not precisely
after every item cleanup, as the data technically stays intact until the
deferred free's are called.
{
j->item_done(j, first);
-#ifdef LOCAL_DEBUG
- memset(first, 0xbd, j->item_size);
-#endif
-
/* Find next journal item */
struct lfjour_item *next = lfjour_get_next(j, first);
if (PAGE_HEAD(next) != PAGE_HEAD(first))
/* Free this block */
lfjour_block_rem_node(&j->pending, block);
+
+ /* Wait for possible pending readers of the block */
+ synchronize_rcu();
+
+ /* Now we can finally drop the block */
#ifdef LOCAL_DEBUG
memset(block, 0xbe, page_size);
#endif
/* Update the first and last pointers */
rt_cleanup_update_pointers(&net->best, rpe);
-
- /* Wait for readers before releasing */
- synchronize_rcu();
}
static void
if (is_last)
tab->gc_counter++;
-
- /* Wait for readers before releasing */
- synchronize_rcu();
}
static void