]> git.hungrycats.org Git - linux/commitdiff
[PATCH] md 16 of 22 - Next small step to improved mddev management.
authorNeil Brown <neilb@cse.unsw.edu.au>
Tue, 18 Jun 2002 11:17:19 +0000 (04:17 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 18 Jun 2002 11:17:19 +0000 (04:17 -0700)
md_ioctl doesn't need to mddev_find, as the mddev must
be in the bd_inode->u.generic_ip.  This means we don't need
to mddev_put either.

drivers/md/md.c

index 234e47ab1fb3917ffbdb142989a624f134398b0d..1bd0c4f8bb6ac1f32a127cb28fa2219a14efa651 100644 (file)
@@ -2490,10 +2490,10 @@ static int md_ioctl(struct inode *inode, struct file *file,
         * Commands creating/starting a new array:
         */
 
-       mddev = mddev_find(minor);
+       mddev = inode->i_bdev->bd_inode->u.generic_ip;
 
        if (!mddev) {
-               err = -ENOMEM;
+               BUG();
                goto abort;
        }
 
@@ -2679,7 +2679,6 @@ static int md_ioctl(struct inode *inode, struct file *file,
 done_unlock:
 abort_unlock:
        unlock_mddev(mddev);
-       mddev_put(mddev);
 
        return err;
 done: