Merge branch 'cleanup-bd_claim' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorJens Axboe <jaxboe@fusionio.com>
Sat, 27 Nov 2010 18:49:18 +0000 (19:49 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 27 Nov 2010 18:49:18 +0000 (19:49 +0100)
1  2 
block/ioctl.c
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_nl.c
drivers/md/md.c
fs/partitions/check.c
fs/xfs/linux-2.6/xfs_super.c

diff --cc block/ioctl.c
Simple merge
Simple merge
Simple merge
@@@ -1267,20 -1235,16 +1240,16 @@@ static int drbd_nl_disk_conf(struct drb
   force_diskless_dec:
        put_ldev(mdev);
   force_diskless:
 -      drbd_force_state(mdev, NS(disk, D_DISKLESS));
 +      drbd_force_state(mdev, NS(disk, D_FAILED));
        drbd_md_sync(mdev);
-  release_bdev2_fail:
-       if (nbc)
-               bd_release(nbc->md_bdev);
-  release_bdev_fail:
-       if (nbc)
-               bd_release(nbc->backing_bdev);
   fail:
        if (nbc) {
-               if (nbc->lo_file)
-                       fput(nbc->lo_file);
-               if (nbc->md_file)
-                       fput(nbc->md_file);
+               if (nbc->backing_bdev)
+                       blkdev_put(nbc->backing_bdev,
+                                  FMODE_READ | FMODE_WRITE | FMODE_EXCL);
+               if (nbc->md_bdev)
+                       blkdev_put(nbc->md_bdev,
+                                  FMODE_READ | FMODE_WRITE | FMODE_EXCL);
                kfree(nbc);
        }
        lc_destroy(resync_lru);
diff --cc drivers/md/md.c
Simple merge
Simple merge
Simple merge