)]}'
{
  "commit": "71c5576fbd809f2015f4eddf72e501e298720cf3",
  "tree": "b2d1ac56e6c3c9a60946a180cd45d493fc60738a",
  "parents": [
    "fd3d664fef97cf01f8e28fe0b024ad52f3bbc1bc"
  ],
  "author": {
    "name": "Andrew Morton",
    "email": "akpm@linux-foundation.org",
    "time": "Tue Dec 09 13:14:13 2008 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Wed Dec 10 08:01:52 2008 -0800"
  },
  "message": "revert \"percpu counter: clean up percpu_counter_sum_and_set()\"\n\nRevert\n\n    commit 1f7c14c62ce63805f9574664a6c6de3633d4a354\n    Author: Mingming Cao \u003ccmm@us.ibm.com\u003e\n    Date:   Thu Oct 9 12:50:59 2008 -0400\n\n        percpu counter: clean up percpu_counter_sum_and_set()\n\nBefore this patch we had the following:\n\npercpu_counter_sum(): return the percpu_counter\u0027s value\n\npercpu_counter_sum_and_set(): return the percpu_counter\u0027s value, copying\nthat value into the central value and zeroing the per-cpu counters before\nreturning.\n\nAfter this patch, percpu_counter_sum_and_set() has gone, and\npercpu_counter_sum() gets the old percpu_counter_sum_and_set()\nfunctionality.\n\nProblem is, as Eric points out, the old percpu_counter_sum_and_set()\nfunctionality was racy and wrong.  It zeroes out counters on \"other\" cpus,\nwithout holding any locks which will prevent races agaist updates from\nthose other CPUS.\n\nThis patch reverts 1f7c14c62ce63805f9574664a6c6de3633d4a354.  This means\nthat percpu_counter_sum_and_set() still has the race, but\npercpu_counter_sum() does not.\n\nNote that this is not a simple revert - ext4 has since started using\npercpu_counter_sum() for its dirty_blocks counter as well.\n\nNote that this revert patch changes percpu_counter_sum() semantics.\n\nBefore the patch, a call to percpu_counter_sum() will bring the counter\u0027s\ncentral counter mostly up-to-date, so a following percpu_counter_read()\nwill return a close value.\n\nAfter this patch, a call to percpu_counter_sum() will leave the counter\u0027s\ncentral accumulator unaltered, so a subsequent call to\npercpu_counter_read() can now return a significantly inaccurate result.\n\nIf there is any code in the tree which was introduced after\ne8ced39d5e8911c662d4d69a342b9d053eaaac4e was merged, and which depends\nupon the new percpu_counter_sum() semantics, that code will break.\n\nReported-by: Eric Dumazet \u003cdada1@cosmosbay.com\u003e\nCc: \"David S. Miller\" \u003cdavem@davemloft.net\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Mingming Cao \u003ccmm@us.ibm.com\u003e\nCc: \u003clinux-ext4@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d2003cdc36aa687ab998a8c558144ddcc23ae6bb",
      "old_mode": 33188,
      "old_path": "fs/ext4/balloc.c",
      "new_id": "c17f69bcd7dd10b0f287695a945d7de66c1f918e",
      "new_mode": 33188,
      "new_path": "fs/ext4/balloc.c"
    },
    {
      "type": "modify",
      "old_id": "9007ccdfc1127cfe73db03e31dd82a843f8f4fa8",
      "old_mode": 33188,
      "old_path": "include/linux/percpu_counter.h",
      "new_id": "20838883535704c89cf72bafe29a28d12dea45e3",
      "new_mode": 33188,
      "new_path": "include/linux/percpu_counter.h"
    },
    {
      "type": "modify",
      "old_id": "71b265c330ce364326328151a03fec07c3e9adb0",
      "old_mode": 33188,
      "old_path": "lib/percpu_counter.c",
      "new_id": "dba1530a5b2912e1fa9afb2c8c32e385b0826fc1",
      "new_mode": 33188,
      "new_path": "lib/percpu_counter.c"
    }
  ]
}
