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
index 29e5c70e4e26c7f6e35b8bb1bec0b7f65442f3a0,650e43ba4f7c8d655cb5d776027fa9415545160f..8cbfaa687d723152b27955cfbc4a43c1af858121
@@@ -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