diff options
author | Kiran Kumar Modukuri <kiran.modukuri@gmail.com> | 2018-06-21 23:25:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-05 10:20:02 +0300 |
commit | 6194fba249cd4ffc05d2b6311b5364d5b8e57338 (patch) | |
tree | 33313d5f628551fdfb45228dc8a0a60e6abb228e /fs/cachefiles | |
parent | 75960a41a598cd279d70a6d9d92e77896c6b8248 (diff) | |
download | linux-6194fba249cd4ffc05d2b6311b5364d5b8e57338.tar.xz |
cachefiles: Wait rather than BUG'ing on "Unexpected object collision"
[ Upstream commit c2412ac45a8f8f1cd582723c1a139608694d410d ]
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: 9ae326a69004 ("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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cachefiles')
-rw-r--r-- | fs/cachefiles/namei.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 41df8a27d7eb..2026885702a2 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -195,7 +195,6 @@ wait_for_old_object: pr_err("\n"); pr_err("Error: Unexpected object collision\n"); cachefiles_printk_object(object, xobject); - BUG(); } atomic_inc(&xobject->usage); write_unlock(&cache->active_lock); |