The patch titled
     fs/partitions/check.c: add error handling for kobject_add
has been removed from the -mm tree.  Its filename was
     fs-partitions-checkc-add-error-handling-for.patch

This patch was dropped because of rejects

------------------------------------------------------
Subject: fs/partitions/check.c: add error handling for kobject_add
From: Borislav Petkov <[EMAIL PROTECTED]>

Add error handling to the kobject_add()-call and signal (the even highly
unlikely) error condition.

(akpm: clashes hugely with the presently-reverted
gregkh-driver-block-device.patch)

Signed-off-by: Borislav Petkov <[EMAIL PROTECTED]>
Cc: Greg KH <[EMAIL PROTECTED]>
Cc: Kay Sievers <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 fs/partitions/check.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff -puN fs/partitions/check.c~fs-partitions-checkc-add-error-handling-for 
fs/partitions/check.c
--- a/fs/partitions/check.c~fs-partitions-checkc-add-error-handling-for
+++ a/fs/partitions/check.c
@@ -371,11 +371,12 @@ void delete_partition(struct gendisk *di
 void add_partition(struct gendisk *disk, int part, sector_t start, sector_t 
len, int flags)
 {
        struct hd_struct *p;
+       int err = -EINVAL;
 
        p = kzalloc(sizeof(*p), GFP_KERNEL);
        if (!p)
                return;
-       
+
        p->start_sect = start;
        p->nr_sects = len;
        p->partno = part;
@@ -390,7 +391,13 @@ void add_partition(struct gendisk *disk,
        p->kobj.parent = &disk->kobj;
        p->kobj.ktype = &ktype_part;
        kobject_init(&p->kobj);
-       kobject_add(&p->kobj);
+
+       err = kobject_add(&p->kobj);
+       if (err) {
+               pr_err("%s: error adding %s to sysfs.\n", __FUNCTION__,
+                               kobject_name(&p->kobj));
+       }
+
        if (!disk->part_uevent_suppress)
                kobject_uevent(&p->kobj, KOBJ_ADD);
        sysfs_create_link(&p->kobj, &block_subsys.kobj, "subsystem");
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

fs-partitions-checkc-add-error-handling-for.patch
usbserial-fix-inconsistent-lock-state.patch
keyspan-init-termios-properly.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to