)]}'
{
  "commit": "a817e73fe693f0718b6210f4b959478877fb2e2f",
  "tree": "377b6fd9c622f4d67448bf1c716522ebc8601140",
  "parents": [
    "e4880bc5dfb1f02b152e62a894b5c6f3e995b3cf"
  ],
  "author": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue Nov 07 09:04:32 2017 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue Nov 07 09:04:32 2017 -0800"
  },
  "message": "Revert \"scsi: make \u0027state\u0027 device attribute pollable\"\n\nThis reverts commit 8a97712e5314aefe16b3ffb4583a34deaa49de04.\n\nThis commit added a call to sysfs_notify() from within\nscsi_device_set_state(), which in turn turns out to make libata very\nunhappy, because ata_eh_detach_dev() does\n\n        spin_lock_irqsave(ap-\u003elock, flags);\n        ..\n        if (ata_scsi_offline_dev(dev)) {\n                dev-\u003eflags |\u003d ATA_DFLAG_DETACHED;\n                ap-\u003epflags |\u003d ATA_PFLAG_SCSI_HOTPLUG;\n        }\n\nand ata_scsi_offline_dev() then does that scsi_device_set_state() to set\nit offline.\n\nSo now we called sysfs_notify() from within a spinlocked region, which\nreally doesn\u0027t work.  The 0day robot reported this as:\n\n   BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238\n\nbecause sysfs_notify() ends up calling kernfs_find_and_get_ns() which\nthen does mutex_lock(\u0026kernfs_mutex)..\n\nThe pollability of the device state isn\u0027t critical, so revert this all\nfor now, and maybe we\u0027ll do it differently in the future.\n\nReported-by: Fengguang Wu \u003cfengguang.wu@intel.com\u003e\nAcked-by: Tejun Heo \u003ctj@kernel.org\u003e\nAcked-by: Martin K. Petersen \u003cmartin.petersen@oracle.com\u003e\nAcked-by: Hannes Reinecke \u003chare@suse.de\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ad3ea24f08859fb167e7297c2cacef81d646fb00",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi_lib.c",
      "new_id": "bcc1694cebcd3e184f40bba43f3a2200ea56c6e8",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi_lib.c"
    },
    {
      "type": "modify",
      "old_id": "4f6f01cf9968e70c81e4dbd6d5603a3ae4fa4f1c",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi_transport_srp.c",
      "new_id": "36f6190931bc07f194621ff2a51633c83561fa51",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi_transport_srp.c"
    }
  ]
}
