[PATCH 6/8] cachefiles: Modify inappropriate error return value in cachefiles_daemon_secctx()

David Howells dhowells at redhat.com
Thu Oct 10 22:31:36 AEDT 2024


Zizhi Wo <wozizhi at huawei.com> wrote:

> In cachefiles_daemon_secctx(), if it is detected that secctx has been
> written to the cache, the error code returned is -EINVAL, which is
> inappropriate and does not distinguish the situation well.

I disagree: it is an invalid parameter, not an already extant file, and a
message is logged for clarification.  I'd prefer to avoid filesystem errors as
we are also doing filesystem operations.

David



More information about the Linux-erofs mailing list