]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: don't report fsconfig errors with "nofail"
authorKarel Zak <kzak@redhat.com>
Thu, 11 Sep 2025 07:35:58 +0000 (09:35 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 11 Sep 2025 07:35:58 +0000 (09:35 +0200)
commit8a7bc1ab00d91e8a17ca8cb2907ca3c2a73381dd
treeae02997e6ee3a92bf9e0607cae85d0a617ca764d
parent6134498c46cdcf4954331d36ba4da87af2e35e8e
libmount: don't report fsconfig errors with "nofail"

The new kernel API returns EINVAL on FSCONFIG_CMD_CREATE if the mount
source is inaccessible. We do not want to report this as an error when
the "nofail" mount option is specified.

Note that EINVAL may also be returned by other fsconfig() settings, so
we need to check whether a source is specified and whether it is really
inaccessible. This is just a heuristic (as with the old mount(2)).

Fixes: https://github.com/util-linux/util-linux/issues/3741
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_mount.c