On Thu, 20 Sep 2007 16:26:15 +0900,
Tejun Heo <[EMAIL PROTECTED]> wrote:

> Sysfs now allows direct suicide.  Make suicidial sysfs nodes to use
> it and remove now unncessary callback mechanism.
> 
> Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
> ---
>  drivers/base/core.c         |   33 ----------------------
>  drivers/s390/cio/ccwgroup.c |   25 +++-------------
>  drivers/scsi/scsi_sysfs.c   |   13 +--------
>  fs/sysfs/file.c             |   63 
> -------------------------------------------
>  include/linux/device.h      |    6 ----
>  include/linux/sysfs.h       |    9 ------
>  6 files changed, 6 insertions(+), 143 deletions(-)

ccwgroup was implicitly relying on a held reference, fix that.

Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]>

---
 drivers/s390/cio/ccwgroup.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.orig/drivers/s390/cio/ccwgroup.c
+++ linux-2.6/drivers/s390/cio/ccwgroup.c
@@ -72,7 +72,7 @@ ccwgroup_ungroup_store(struct device *de
        struct ccwgroup_device *gdev;
        int rc;
 
-       gdev = to_ccwgroupdev(dev);
+       gdev = to_ccwgroupdev(get_device(dev));
 
        if (gdev->state != CCWGROUP_OFFLINE)
                return -EINVAL;
@@ -81,6 +81,7 @@ ccwgroup_ungroup_store(struct device *de
        __ccwgroup_remove_symlinks(gdev);
        device_unregister(dev);
        mutex_unlock(&gdev->reg_mutex);
+       put_device(dev);
 
        return count;
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to