]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
cachefiles: Wait rather than BUG'ing on "Unexpected object collision"
authorKiran Kumar Modukuri <kiran.modukuri@gmail.com>
Thu, 2 Aug 2018 04:17:34 +0000 (14:17 +1000)
committerKamal Mostafa <kamal@canonical.com>
Wed, 22 Aug 2018 20:41:20 +0000 (13:41 -0700)
commit93ccb0a70a270e5d6fd585fdd023429ca214cf13
tree9bef2e1e6455c9e7e0ad92addc254d7619880382
parent42553302c899a5bc2b18c316951a4aa3bde1ffb6
cachefiles: Wait rather than BUG'ing on "Unexpected object collision"

BugLink: https://bugs.launchpad.net/bugs/1776254
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>
(cherry picked from commit c2412ac45a8f8f1cd582723c1a139608694d410d)
Signed-off-by: Daniel Axtens <daniel.axtens@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/cachefiles/namei.c