sysfs: refactor sysfs_add_file_mode_ns
authorChristoph Hellwig <hch@lst.de>
Mon, 13 Sep 2021 05:41:13 +0000 (07:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Sep 2021 15:02:58 +0000 (17:02 +0200)
commitd1a1a9606e080c9767e229742f5b331b3b551c0c
treed48e9326214e3cf0049a6e478dff3f05832aa2f1
parent5cf3bb0d3a2d0de94f3f551f0e4211068818aabf
sysfs: refactor sysfs_add_file_mode_ns

Regroup the code so that preallocated attributes and normal attributes are
handled in clearly separate blocks.

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210913054121.616001-6-hch@lst.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/file.c