提交 d8bf97a0 编写于 作者: N Nathan Chancellor 提交者: Greg Kroah-Hartman

cachefiles: Explicitly cast enumerated type in put_object

[ Upstream commit b7e768b7e3522695ed36dcb48ecdcd344bd30a9b ]

Clang warns when one enumerated type is implicitly converted to another.

fs/cachefiles/namei.c:247:50: warning: implicit conversion from
enumeration type 'enum cachefiles_obj_ref_trace' to different
enumeration type 'enum fscache_obj_ref_trace' [-Wenum-conversion]
        cache->cache.ops->put_object(&xobject->fscache,
cachefiles_obj_put_wait_retry);

Silence this warning by explicitly casting to fscache_obj_ref_trace,
which is also done in put_object.
Reported-by: NNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: NNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 02bd7b74
...@@ -244,11 +244,13 @@ static int cachefiles_mark_object_active(struct cachefiles_cache *cache, ...@@ -244,11 +244,13 @@ static int cachefiles_mark_object_active(struct cachefiles_cache *cache,
ASSERT(!test_bit(CACHEFILES_OBJECT_ACTIVE, &xobject->flags)); ASSERT(!test_bit(CACHEFILES_OBJECT_ACTIVE, &xobject->flags));
cache->cache.ops->put_object(&xobject->fscache, cachefiles_obj_put_wait_retry); cache->cache.ops->put_object(&xobject->fscache,
(enum fscache_obj_ref_trace)cachefiles_obj_put_wait_retry);
goto try_again; goto try_again;
requeue: requeue:
cache->cache.ops->put_object(&xobject->fscache, cachefiles_obj_put_wait_timeo); cache->cache.ops->put_object(&xobject->fscache,
(enum fscache_obj_ref_trace)cachefiles_obj_put_wait_timeo);
_leave(" = -ETIMEDOUT"); _leave(" = -ETIMEDOUT");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册