diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index ab0bbe93b398ce68dd0dc04652a626635d2c7c23..b5d6dd72dfa0f6ac4357456a3269ff0a2e53dfcc 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -186,6 +186,7 @@ static int cachefiles_mark_object_active(struct cachefiles_cache *cache, * need to wait for it to be destroyed */ wait_for_old_object: trace_cachefiles_wait_active(object, dentry, xobject); + clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags); if (fscache_object_is_live(&xobject->fscache)) { pr_err("\n"); @@ -248,7 +249,6 @@ static int cachefiles_mark_object_active(struct cachefiles_cache *cache, goto try_again; requeue: - clear_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags); cache->cache.ops->put_object(&xobject->fscache, cachefiles_obj_put_wait_timeo); _leave(" = -ETIMEDOUT"); return -ETIMEDOUT;