Re: [PATCH v1 07/12] f2fs: cache: use node cache
Wenjie Qi <[email protected]>
| Newsgroups | gmane.linux.file-systems.f2fs,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Chao, > entry = fn->entry; > f2fs_cache_get(entry); > spin_unlock_irqrestore(&sbi->fsync_node_lock, flags); > > f2fs_cache_wait_writeback(entry); The entry reference keeps the entry allocated, but the waiter does not hold the entry lock. After WRITEBACK is cleared, invalidation can detach the entry and set `entry->cache` to NULL. `f2fs_cache_wait_writeback()` checks and uses `entry->cache` through separate accesses. Does the reference taken here also guarantee that the parent cache remains attached across the wait helper's check and use?