]> git.baikalelectronics.ru Git - kernel.git/commit
cachefiles: Wait rather than BUG'ing on "Unexpected object collision"
authorKiran Kumar Modukuri <kiran.modukuri@gmail.com>
Thu, 21 Jun 2018 20:25:53 +0000 (13:25 -0700)
committerDavid Howells <dhowells@redhat.com>
Wed, 25 Jul 2018 13:49:00 +0000 (14:49 +0100)
commit0618c0a4f72b85c86d7a3ad133df366908952ab2
tree3db35041a7357511b9e4e3d2054d706bcf8e1f9a
parentb950e18c534cb22a7149732992cda0603624a6b6
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: 5f60092fcbc4 ("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>
fs/cachefiles/namei.c