[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 11 Nov 2018 19:49:05 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org,
"Kiran Kumar Modukuri" <kiran.modukuri@...il.com>,
"David Howells" <dhowells@...hat.com>
Subject: [PATCH 3.16 292/366] cachefiles: Wait rather than BUG'ing on
"Unexpected object collision"
3.16.61-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Kiran Kumar Modukuri <kiran.modukuri@...il.com>
commit c2412ac45a8f8f1cd582723c1a139608694d410d upstream.
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@...il.com>
Signed-off-by: David Howells <dhowells@...hat.com>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
fs/cachefiles/namei.c | 1 -
1 file changed, 1 deletion(-)
--- a/fs/cachefiles/namei.c
+++ b/fs/cachefiles/namei.c
@@ -194,7 +194,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);
Powered by blists - more mailing lists