summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2024-11-11 18:09:55 +0300
committerChristian Brauner <brauner@kernel.org>2024-11-12 16:37:12 +0300
commit75ead69a717332efa70303fba85e1876793c74a9 (patch)
treef5908057df9002e0bbc28a5747655ce7a979739e /include/uapi/linux
parentc4d7d90747f4e8b528c8cd0a2d9ac01dc4a9339e (diff)
downloadlinux-75ead69a717332efa70303fba85e1876793c74a9.tar.xz
fs: don't let statmount return empty strings
When one of the statmount_string() handlers doesn't emit anything to seq, the kernel currently sets the corresponding flag and emits an empty string. Given that statmount() returns a mask of accessible fields, just leave the bit unset in this case, and skip any NULL termination. If nothing was emitted to the seq, then the EOVERFLOW and EAGAIN cases aren't applicable and the function can just return immediately. Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://lore.kernel.org/r/20241111-statmount-v4-1-2eaf35d07a80@kernel.org Acked-by: Miklos Szeredi <mszeredi@redhat.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions