nmount: Ignore errors when copying out an error string

In general we copy error strings as part of reporting an error from
lower layers, so if the copyout() fails there's nothing to do since we'd
prefer to preserve the original error.

This is in preparation for annotating copyin() and related functions
with __result_use_check.

Reviewed by:	olce, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D43147
This commit is contained in:
Mark Johnston 2023-12-25 20:43:21 -05:00
parent bbf221e3e8
commit 099d25c354

View file

@ -1024,7 +1024,7 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions)
fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base,
fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len);
} else {
copyout(errmsg,
(void)copyout(errmsg,
fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base,
fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len);
}