All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Liu <jeff.liu@oracle.com>
To: gregkh@linuxfoundation.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <cl@gentwo.org>,
	Pekka Enberg <penberg@kernel.org>, Matt Mackall <mpm@selenic.com>,
	benh@kernel.crashing.org, paulus@samba.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	stefanr@s5r6.in-berlin.de, joro@8bytes.org,
	jejb@parisc-linux.org, deller@gmx.de, bhelgaas@google.com,
	clm@fb.com, Josef Bacik <jbacik@fb.com>,
	swhiteho@redhat.com, bharrosh@panasas.com,
	bhalevy@primarydata.com, ccaulfie@redhat.com,
	teigland@redhat.com, "Theodore Ts'o" <tytso@mit.edu>,
	adilger.kernel@dilger.ca, jaegeuk@kernel.org,
	cm224.lee@samsung.com, Mark Fasheh <mfasheh@suse.com>,
	Joel Becker <jlbec@evilplan.org>,
	casey@schaufler-ca.com, LKML <linux-kernel@vger.kernel.org>
Subject: [patch 00/24] lib/kobject: kset_create_and_add return error clean up
Date: Tue, 17 Jun 2014 22:25:30 +0800	[thread overview]
Message-ID: <53A04FDA.6070101@oracle.com> (raw)

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

             reply	other threads:[~2014-06-17 14:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 14:25 Jeff Liu [this message]
2014-06-17 15:14 ` [patch 00/24] lib/kobject: kset_create_and_add return error clean up Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A04FDA.6070101@oracle.com \
    --to=jeff.liu@oracle.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=bhalevy@primarydata.com \
    --cc=bharrosh@panasas.com \
    --cc=bhelgaas@google.com \
    --cc=casey@schaufler-ca.com \
    --cc=ccaulfie@redhat.com \
    --cc=cl@gentwo.org \
    --cc=clm@fb.com \
    --cc=cm224.lee@samsung.com \
    --cc=davem@davemloft.net \
    --cc=deller@gmx.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jaegeuk@kernel.org \
    --cc=jbacik@fb.com \
    --cc=jejb@parisc-linux.org \
    --cc=jlbec@evilplan.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=mpm@selenic.com \
    --cc=paulus@samba.org \
    --cc=penberg@kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=stefanr@s5r6.in-berlin.de \
    --cc=swhiteho@redhat.com \
    --cc=teigland@redhat.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.