Skip to content

Commit c2412ac

Browse files
kiran-modukuridhowells
authored andcommitted
cachefiles: Wait rather than BUG'ing on "Unexpected object collision"
If we meet a conflicting object that is marked FSCACHE_OBJECT_IS_LIVE in the active object tree, we have been emitting a BUG after logging information about it and the new object. Instead, we should wait for the CACHEFILES_OBJECT_ACTIVE flag to be cleared on the old object (or return an error). The ACTIVE flag should be cleared after it has been removed from the active object tree. A timeout of 60s is used in the wait, so we shouldn't be able to get stuck there. Fixes: 9ae326a ("CacheFiles: A cache that backs onto a mounted filesystem") Signed-off-by: Kiran Kumar Modukuri <kiran.modukuri@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com>
1 parent 5ce83d4 commit c2412ac

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

fs/cachefiles/namei.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ static int cachefiles_mark_object_active(struct cachefiles_cache *cache,
192192
pr_err("\n");
193193
pr_err("Error: Unexpected object collision\n");
194194
cachefiles_printk_object(object, xobject);
195-
BUG();
196195
}
197196
atomic_inc(&xobject->usage);
198197
write_unlock(&cache->active_lock);

0 commit comments

Comments
 (0)