)]}'
{
  "commit": "12debc4248a4a7f1873e47cda2cdd7faca80b099",
  "tree": "1ad80b77d213ea09cb746d6e4d50c4316462a452",
  "parents": [
    "755aedc15900ff7d83dd046f632af9a680b0c28f"
  ],
  "author": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Thu Feb 07 00:15:52 2008 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@woody.linux-foundation.org",
    "time": "Thu Feb 07 08:42:29 2008 -0800"
  },
  "message": "iget: remove iget() and the read_inode() super op as being obsolete\n\nRemove the old iget() call and the read_inode() superblock operation it uses\nas these are really obsolete, and the use of read_inode() does not produce\nproper error handling (no distinction between ENOMEM and EIO when marking an\ninode bad).\n\nFurthermore, this removes the temptation to use iget() to find an inode by\nnumber in a filesystem from code outside that filesystem.\n\niget_locked() should be used instead.  A new function is added in an earlier\npatch (iget_failed) that is to be called to mark an inode as bad, unlock it\nand release it should the get routine fail.  Mark iget() and read_inode() as\nbeing obsolete and remove references to them from the documentation.\n\nTypically a filesystem will be modified such that the read_inode function\nbecomes an internal iget function, for example the following:\n\n\tvoid thingyfs_read_inode(struct inode *inode)\n\t{\n\t\t...\n\t}\n\nwould be changed into something like:\n\n\tstruct inode *thingyfs_iget(struct super_block *sp, unsigned long ino)\n\t{\n\t\tstruct inode *inode;\n\t\tint ret;\n\n\t\tinode \u003d iget_locked(sb, ino);\n\t\tif (!inode)\n\t\t\treturn ERR_PTR(-ENOMEM);\n\t\tif (!(inode-\u003ei_state \u0026 I_NEW))\n\t\t\treturn inode;\n\n\t\t...\n\t\tunlock_new_inode(inode);\n\t\treturn inode;\n\terror:\n\t\tiget_failed(inode);\n\t\treturn ERR_PTR(ret);\n\t}\n\nand then thingyfs_iget() would be called rather than iget(), for example:\n\n\tret \u003d -EINVAL;\n\tinode \u003d iget(sb, ino);\n\tif (!inode || is_bad_inode(inode))\n\t\tgoto error;\n\nbecomes:\n\n\tinode \u003d thingyfs_iget(sb, ino);\n\tif (IS_ERR(inode)) {\n\t\tret \u003d PTR_ERR(inode);\n\t\tgoto error;\n\t}\n\nNote that is_bad_inode() does not need to be called.  The error returned by\nthingyfs_iget() should render it unnecessary.\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\nAcked-by: Christoph Hellwig \u003chch@lst.de\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": "37c10cba717725f599ec999eb0a0a4ff6b1fc483",
      "old_mode": 33188,
      "old_path": "Documentation/filesystems/Locking",
      "new_id": "42d4b30b10459966c9ea0db1ae111272e0af1482",
      "new_mode": 33188,
      "new_path": "Documentation/filesystems/Locking"
    },
    {
      "type": "modify",
      "old_id": "fbd3815a5f577b970ace353473cf23b96c513f7d",
      "old_mode": 33188,
      "old_path": "Documentation/filesystems/porting",
      "new_id": "92b888d540a667c17a630e8dc005cd672c726058",
      "new_mode": 33188,
      "new_path": "Documentation/filesystems/porting"
    },
    {
      "type": "modify",
      "old_id": "9d019d35728f28bcb9ecfeaf5bd3a4227f026586",
      "old_mode": 33188,
      "old_path": "Documentation/filesystems/vfs.txt",
      "new_id": "bd55038b56f5464df637c618abe0a06318f39e72",
      "new_mode": 33188,
      "new_path": "Documentation/filesystems/vfs.txt"
    },
    {
      "type": "modify",
      "old_id": "276ffd6b6fdd61cee59073bf6df95624fead672a",
      "old_mode": 33188,
      "old_path": "fs/inode.c",
      "new_id": "53245ffcf93dc8a4dd4d852257e5cc2e52ed64d6",
      "new_mode": 33188,
      "new_path": "fs/inode.c"
    },
    {
      "type": "modify",
      "old_id": "d202600d36bd5e6cb0484a54f965bf0b2a4a7a7c",
      "old_mode": 33188,
      "old_path": "include/linux/fs.h",
      "new_id": "36b7abefacbe4b743ba128afcdcfee7b5c05a885",
      "new_mode": 33188,
      "new_path": "include/linux/fs.h"
    }
  ]
}
