Skip to content

lib/kobject: kset_create_and_add return error clean up

Jeff Liu lkml 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 of 24 patches 31 repliesApplied

22 of 24 patches are in this archive. The cover letter announces 24.

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/24kobject: return actual error on kset_create_and_addlib/kobject.c+2 -211 replies
2/24sample/kobject: update kset-example codesamples/kobject/kset-example.c+2 -22 replies
3/24slub: return actual error on sysfs functionsmm/slub.c+4 -41 reply
4/24powerpc: check/return actual error on sysfs functionsarch/powerpc/platforms/powernv/opal-dump.c arch/powerpc/platforms/powernv/opal-elog.c+3 -32 replies
6/24crypt: return actual error code on pcrypt_initcrypto/pcrypt.c+4 -21 reply
7/24kernel: return actual error on param_sysfs_initkernel/params.c+3 -41 reply
8/24drivers/firmware: return actual error on sysfs initdrivers/firmware/dmi-sysfs.c drivers/firmware/edd.c drivers/firmware/efi/efivars.c +2 more+11 -91 reply
9/24drivers/iommu: check actual error on iommu_initdrivers/iommu/iommu.c+1 -12 replies
10/24drivers/base: return actual error on sysfs initdrivers/base/bus.c drivers/base/class.c drivers/base/core.c+12 -121 reply
11/24drviers/scsi: check sysfs init return value via IS_ERR at iscsi_boot_create_ksetdrivers/scsi/iscsi_boot_sysfs.c+1 -11 reply
12/24drivers/parisc: return actual error on pdc_stable_initdrivers/parisc/pdc_stable.c+2 -21 reply
13/24drivers/pci: return actual error on pci_slot_initdrivers/pci/slot.c+2 -21 reply
15/24drivers/of: return actual error on of_initdrivers/of/base.c+2 -21 reply
16/24btrfs: return actual error on btrfs_init_sysfsfs/btrfs/sysfs.c+2 -21 reply
17/24gfs2: return actual error on gfs2_sys_inifs/gfs2/sys.c+2 -20 replies
17/24gfs2: return actual error on gfs2_sys_ini+0 -00 replies
19/24fs/dlm: return actual error on dlm_lockspace_initfs/dlm/lockspace.c+2 -20 replies
20/24ext4: return actual error on ext4_init_fsfs/ext4/super.c+2 -21 reply
21/24f2fs: return actual error on init_f2fs_fsfs/f2fs/super.c+2 -21 reply
22/24ocfs2: return actual error on sysfs functionsfs/ocfs2/cluster/sys.c fs/ocfs2/stackglue.c+4 -40 replies
22/24ocfs2: return actual error on sysfs functions+0 -00 replies
23/24net: return actual error on register_queue_kobjectsnet/core/net-sysfs.c+2 -21 reply

Reviews trailers per patch

3 of 22 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLukas CzernerTheodore Ts'oJoerg RoedelChristoph Lameter
SeriesA-b
1/24
2/24
3/24A-b
4/24
6/24
7/24
8/24
9/24A-b
10/24
11/24
12/24
13/24
15/24
16/24
17/24
17/24
19/24
20/24R-b
21/24
22/24
22/24
23/24

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [patch 00/24] lib/kobject: kset_create_and_add return error clean up

Hello,

Currently, to verify if kset_create_and_add() is succeed or not, almost all subsystems with sysfs support are check up the return value against NULL, then return -ENOMEM on failure, since kset_create_and_add() always return NULL in case of anything wrong. However, kset_register() can fail due to other reasons, hence it's better to return the actual error on kset_create_and_add(), this patch series is just did that and this is inspired by Christoph in another thread:
http://www.spinics.net/lists/linux-mm/msg74729.html

Jeff Liu (24)
kobject: return actual error on kset_create_and_add
sample/kobject: update kset-example code
slub: return actual error on sysfs_slab_add
powerpc: check/return acutal error on sysfs init
s390: check/return actual error on sysfs init
crypt: return actual error code on pcrypt_init
kernel: return actual error on param_sysfs_init
drivers/firmware: return actual error on sysfs init
drivers/iommu: check actual error on iommu_init
drivers/base: return actual error on sysfs init
drviers/scsi: check sysfs init return value via IS_ERR at iscsi_boot_create_kset drivers/parisc: return actual error on pdc_stable_init
drivers/pci: return actual error on pci_slot_init
drivers/s390: return actual error on sysfs init functions drivers/of: return actual error on of_init
btrfs: return actual error on btrfs_init_sysfs
gfs2: return actual error on gfs2_sys_init
exofs: return actual error on exofs_sysfs_odev_add
fs/dlm: return actual error on dlm_lockspace_init
ext4: return actual error on ext4_init_fs
f2fs: return actual error on init_f2fs_fs
ocfs2: return actual error on sysfs init
net: return actual error on register_queue_kobjects
security/smack: return acutal error on smk_init_sysfs

Cheers,
-Jeff