)]}'
{
  "commit": "6ee1df3bff435d169d0ab93420bd02b4f9392e66",
  "tree": "8a1a605ee5a6541d492b5718bfcb525350c7cc3d",
  "parents": [
    "5978ac7c68e30bd9a322aa62efc411581263f881"
  ],
  "author": {
    "name": "Tomas Henzl",
    "email": "thenzl@redhat.com",
    "time": "Wed Feb 27 17:03:32 2013 -0800"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Mon Mar 04 06:06:40 2013 +0800"
  },
  "message": "block: fix ext_devt_idr handling\n\ncommit 7b74e912785a11572da43292786ed07ada7e3e0c upstream.\n\nWhile adding and removing a lot of disks disks and partitions this\nsometimes shows up:\n\n  WARNING: at fs/sysfs/dir.c:512 sysfs_add_one+0xc9/0x130() (Not tainted)\n  Hardware name:\n  sysfs: cannot create duplicate filename \u0027/dev/block/259:751\u0027\n  Modules linked in: raid1 autofs4 bnx2fc cnic uio fcoe libfcoe libfc 8021q scsi_transport_fc scsi_tgt garp stp llc sunrpc cpufreq_ondemand powernow_k8 freq_table mperf ipv6 dm_mirror dm_region_hash dm_log power_meter microcode dcdbas serio_raw amd64_edac_mod edac_core edac_mce_amd i2c_piix4 i2c_core k10temp bnx2 sg ixgbe dca mdio ext4 mbcache jbd2 dm_round_robin sr_mod cdrom sd_mod crc_t10dif ata_generic pata_acpi pata_atiixp ahci mptsas mptscsih mptbase scsi_transport_sas dm_multipath dm_mod [last unloaded: scsi_wait_scan]\n  Pid: 44103, comm: async/16 Not tainted 2.6.32-195.el6.x86_64 #1\n  Call Trace:\n    warn_slowpath_common+0x87/0xc0\n    warn_slowpath_fmt+0x46/0x50\n    sysfs_add_one+0xc9/0x130\n    sysfs_do_create_link+0x12b/0x170\n    sysfs_create_link+0x13/0x20\n    device_add+0x317/0x650\n    idr_get_new+0x13/0x50\n    add_partition+0x21c/0x390\n    rescan_partitions+0x32b/0x470\n    sd_open+0x81/0x1f0 [sd_mod]\n    __blkdev_get+0x1b6/0x3c0\n    blkdev_get+0x10/0x20\n    register_disk+0x155/0x170\n    add_disk+0xa6/0x160\n    sd_probe_async+0x13b/0x210 [sd_mod]\n    add_wait_queue+0x46/0x60\n    async_thread+0x102/0x250\n    default_wake_function+0x0/0x20\n    async_thread+0x0/0x250\n    kthread+0x96/0xa0\n    child_rip+0xa/0x20\n    kthread+0x0/0xa0\n    child_rip+0x0/0x20\n\nThis most likely happens because dev_t is freed while the number is\nstill used and idr_get_new() is not protected on every use.  The fix\nadds a mutex where it wasn\u0027t before and moves the dev_t free function so\nit is called after device del.\n\nSigned-off-by: Tomas Henzl \u003cthenzl@redhat.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9cf5583c90ffa75c2b010020fb22fc8ddf55e82a",
      "old_mode": 33188,
      "old_path": "block/genhd.c",
      "new_id": "9433636b88bb2d4006fdfb5ed3532dde3696d7bd",
      "new_mode": 33188,
      "new_path": "block/genhd.c"
    },
    {
      "type": "modify",
      "old_id": "6df5d6928a440c53b44f158ea99b98d7d9a48660",
      "old_mode": 33188,
      "old_path": "block/partition-generic.c",
      "new_id": "7b8b8d17764c858fb5f16310f6c03db4be75bd52",
      "new_mode": 33188,
      "new_path": "block/partition-generic.c"
    }
  ]
}
