deepin-kernel/fs/configfs
Zijun Hu 3578203b17 configfs: Do not override creating attribute file failure in populate_attrs()
commit f830edbae247b89228c3e09294151b21e0dc849c upstream.

populate_attrs() may override failure for creating attribute files
by success for creating subsequent bin attribute files, and have
wrong return value.

Fix by creating bin attribute files under successfully creating
attribute files.

Fixes: 03607ace80 ("configfs: implement binary attributes")
Cc: stable@vger.kernel.org
Reviewed-by: Joel Becker <jlbec@evilplan.org>
Reviewed-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250507-fix_configfs-v3-2-fe2d96de8dc4@quicinc.com
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 0df5e4c7de27dde3601e132632bb094afd464339)
2025-07-03 11:31:49 +08:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
configfs_internal.h fs: port ->symlink() to pass mnt_idmap 2023-01-19 09:24:25 +01:00
dir.c configfs: Do not override creating attribute file failure in populate_attrs() 2025-07-03 11:31:49 +08:00
file.c configfs: restore the kernel v5.13 text attribute write behavior 2021-08-09 16:56:00 +02:00
inode.c configfs: convert to ctime accessor functions 2023-07-13 10:28:05 +02:00
item.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
mount.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
symlink.c fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00