)]}'
{
  "commit": "1aac1400319d30786f32b9290e9cc923937b3d57",
  "tree": "14b44023c7645a5d264f0d537838fea77244eecc",
  "parents": [
    "1635f6a74152f1dcd1b888231609d64875f0a81a"
  ],
  "author": {
    "name": "Hugh Dickins",
    "email": "hughd@google.com",
    "time": "Tue May 29 15:06:42 2012 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Tue May 29 16:22:23 2012 -0700"
  },
  "message": "tmpfs: quit when fallocate fills memory\n\nAs it stands, a large fallocate() on tmpfs is liable to fill memory with\npages, freed on failure except when they run into swap, at which point\nthey become fixed into the file despite the failure.  That feels quite\nwrong, to be consuming resources precisely when they\u0027re in short supply.\n\nGo the other way instead: shmem_fallocate() indicate the range it has\nfallocated to shmem_writepage(), keeping count of pages it\u0027s allocating;\nshmem_writepage() reactivate instead of swapping out pages fallocated by\nthis syscall (but happily swap out those from earlier occasions), keeping\ncount; shmem_fallocate() compare counts and give up once the reactivated\npages have started to coming back to writepage (approximately: some zones\nwould in fact recycle faster than others).\n\nThis is a little unusual, but works well: although we could consider the\nfailure to swap as a bug, and fix it later with SWAP_MAP_FALLOC handling\nadded in swapfile.c and memcontrol.c, I doubt that we shall ever want to.\n\n(If there\u0027s no swap, an over-large fallocate() on tmpfs is limited in the\nsame way as writing: stopped by rlimit, or by tmpfs mount size if that was\nset sensibly, or by __vm_enough_memory() heuristics if OVERCOMMIT_GUESS or\nOVERCOMMIT_NEVER.  If OVERCOMMIT_ALWAYS, then it is liable to OOM-kill\nothers as writing would, but stops and frees if interrupted.)\n\nNow that everything is freed on failure, we can then skip updating ctime.\n\nSigned-off-by: Hugh Dickins \u003chughd@google.com\u003e\nCc: Christoph Hellwig \u003chch@infradead.org\u003e\nCc: Cong Wang \u003camwang@redhat.com\u003e\nCc: Kay Sievers \u003ckay@vrfy.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": "793dcd1bac8b3e0f5c9cac36b233a38ae33c4b5f",
      "old_mode": 33188,
      "old_path": "mm/shmem.c",
      "new_id": "191663a8def3ad851c2c667783c31014f3bfda2f",
      "new_mode": 33188,
      "new_path": "mm/shmem.c"
    }
  ]
}
