)]}'
{
  "commit": "f66bf042693b620133d39af8d2f13615f03eadfc",
  "tree": "c126bc57376b5c4b5177ee81bb3b9e47ac68da87",
  "parents": [
    "b2a922cd6c2e3b9c2e36d48683ceb87a5bce8bb8"
  ],
  "author": {
    "name": "Brian Foster",
    "email": "bfoster@redhat.com",
    "time": "Tue Jun 23 08:47:20 2015 +1000"
  },
  "committer": {
    "name": "Dave Chinner",
    "email": "david@fromorbit.com",
    "time": "Tue Jun 23 08:47:20 2015 +1000"
  },
  "message": "xfs: don\u0027t truncate attribute extents if no extents exist\n\nThe xfs_attr3_root_inactive() call from xfs_attr_inactive() assumes that\nattribute blocks exist to invalidate. It is possible to have an\nattribute fork without extents, however. Consider the case where the\nattribute fork is created towards the beginning of xfs_attr_set() but\nsome part of the subsequent attribute set fails.\n\nIf an inode in such a state hits xfs_attr_inactive(), it eventually\ncalls xfs_dabuf_map() and possibly xfs_bmapi_read(). The former emits a\nfilesystem corruption warning, returns an error that bubbles back up to\nxfs_attr_inactive(), and leads to destruction of the in-core attribute\nfork without an on-disk reset. If the inode happens to make it back\nthrough xfs_inactive() in this state (e.g., via a concurrent bulkstat\nthat cycles the inode from the reclaim state and releases it), i_afp\nmight not exist when xfs_bmapi_read() is called and causes a NULL\ndereference panic.\n\nA \u0027-p 2\u0027 fsstress run to ENOSPC on a relatively small fs (1GB)\nreproduces these problems. The behavior is a regression caused by:\n\n6dfe5a0 xfs: xfs_attr_inactive leaves inconsistent attr fork state behind\n\n... which removed logic that avoided the attribute extent truncate when\nno extents exist. Restore this logic to ensure the attribute fork is\ndestroyed and reset correctly if it exists without any allocated\nextents.\n\ncc: stable@vger.kernel.org # 3.12 to 4.0.x\nSigned-off-by: Brian Foster \u003cbfoster@redhat.com\u003e\nReviewed-by: Dave Chinner \u003cdchinner@redhat.com\u003e\nSigned-off-by: Dave Chinner \u003cdavid@fromorbit.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3fbf167cfb4cddfcb42a57ca7d613096d5c97fe0",
      "old_mode": 33188,
      "old_path": "fs/xfs/xfs_attr_inactive.c",
      "new_id": "73e75a87af5027cc8841a915637eaf661644c4b0",
      "new_mode": 33188,
      "new_path": "fs/xfs/xfs_attr_inactive.c"
    }
  ]
}
