]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] s390: dcss block driver fix
authorAndrew Morton <akpm@osdl.org>
Mon, 12 Apr 2004 06:42:53 +0000 (23:42 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 12 Apr 2004 06:42:53 +0000 (23:42 -0700)
From: Martin Schwidefsky <schwidefsky@de.ibm.com>

DCSS block device driver changes:
 - Fix remove_store function, put_device is called too early.

drivers/s390/block/dcssblk.c

index 5b6544bc5a059fd238f7667edd3df3d384de5b23..8a30b525002b2b020404575c26a4ca38eefbd27a 100644 (file)
@@ -548,10 +548,10 @@ dcssblk_remove_store(struct device *dev, const char *buf, size_t count)
        dev_info->gd->queue = NULL;
        put_disk(dev_info->gd);
        device_unregister(&dev_info->dev);
-       put_device(&dev_info->dev);
        segment_unload(dev_info->segment_name);
        PRINT_DEBUG("Segment %s unloaded successfully\n",
                        dev_info->segment_name);
+       put_device(&dev_info->dev);
        rc = count;
 out_buf:
        kfree(local_buf);