)]}'
{
  "commit": "67245ff332064c01b760afa7a384ccda024bfd24",
  "tree": "bf77d422b16306ba9fdcf2f7e1f340a409f8a0f6",
  "parents": [
    "2e572599139d27db3aaf540b0d34f0a4f58dfca1"
  ],
  "author": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Sat Apr 16 15:16:07 2016 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon Apr 18 13:43:02 2016 -0700"
  },
  "message": "devpts: clean up interface to pty drivers\n\nThis gets rid of the horrible notion of having that\n\n    struct inode *ptmx_inode\n\nbe the linchpin of the interface between the pty code and devpts.\n\nBy de-emphasizing the ptmx inode, a lot of things actually get cleaner,\nand we will have a much saner way forward.  In particular, this will\nallow us to associate with any particular devpts instance at open-time,\nand not be artificially tied to one particular ptmx inode.\n\nThe patch itself is actually fairly straightforward, and apart from some\nlocking and return path cleanups it\u0027s pretty mechanical:\n\n - the interfaces that devpts exposes all take \"struct pts_fs_info *\"\n   instead of \"struct inode *ptmx_inode\" now.\n\n   NOTE! The \"struct pts_fs_info\" thing is a completely opaque structure\n   as far as the pty driver is concerned: it\u0027s still declared entirely\n   internally to devpts. So the pty code can\u0027t actually access it in any\n   way, just pass it as a \"cookie\" to the devpts code.\n\n - the \"look up the pts fs info\" is now a single clear operation, that\n   also does the reference count increment on the pts superblock.\n\n   So \"devpts_add/del_ref()\" is gone, and replaced by a \"lookup and get\n   ref\" operation (devpts_get_ref(inode)), along with a \"put ref\" op\n   (devpts_put_ref()).\n\n - the pty master \"tty-\u003edriver_data\" field now contains the pts_fs_info,\n   not the ptmx inode.\n\n - because we don\u0027t care about the ptmx inode any more as some kind of\n   base index, the ref counting can now drop the inode games - it just\n   gets the ref on the superblock.\n\n - the pts_fs_info now has a back-pointer to the super_block. That\u0027s so\n   that we can easily look up the information we actually need. Although\n   quite often, the pts fs info was actually all we wanted, and not having\n   to look it up based on some magical inode makes things more\n   straightforward.\n\nIn particular, now that \"devpts_get_ref(inode)\" operation should really\nbe the *only* place we need to look up what devpts instance we\u0027re\nassociated with, and we do it exactly once, at ptmx_open() time.\n\nThe other side of this is that one ptmx node could now be associated\nwith multiple different devpts instances - you could have a single\n/dev/ptmx node, and then have multiple mount namespaces with their own\ninstances of devpts mounted on /dev/pts/.  And that\u0027s all perfectly sane\nin a model where we just look up the pts instance at open time.\n\nThis will eventually allow us to get rid of our odd single-vs-multiple\npts instance model, but this patch in itself changes no semantics, only\nan internal binding model.\n\nCc: Eric Biederman \u003cebiederm@xmission.com\u003e\nCc: Peter Anvin \u003chpa@zytor.com\u003e\nCc: Andy Lutomirski \u003cluto@amacapital.net\u003e\nCc: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: Peter Hurley \u003cpeter@hurleysoftware.com\u003e\nCc: Serge Hallyn \u003cserge.hallyn@ubuntu.com\u003e\nCc: Willy Tarreau \u003cw@1wt.eu\u003e\nCc: Aurelien Jarno \u003caurelien@aurel32.net\u003e\nCc: Alan Cox \u003cgnomes@lxorguk.ukuu.org.uk\u003e\nCc: Jann Horn \u003cjann@thejh.net\u003e\nCc: Greg KH \u003cgreg@kroah.com\u003e\nCc: Jiri Slaby \u003cjslaby@suse.com\u003e\nCc: Florian Weimer \u003cfw@deneb.enyo.de\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e16a49b507efbd57734b0b8f522d0e2a5dfe03ce",
      "old_mode": 33188,
      "old_path": "drivers/tty/pty.c",
      "new_id": "0058d9fbf9314b4938fb9009c201ac1bc0a20573",
      "new_mode": 33188,
      "new_path": "drivers/tty/pty.c"
    },
    {
      "type": "modify",
      "old_id": "655f21f991606b5bf2bef600a54b814994dbed98",
      "old_mode": 33188,
      "old_path": "fs/devpts/inode.c",
      "new_id": "0af8e7d70d2751afa67fd85867ef107a5c4ee3eb",
      "new_mode": 33188,
      "new_path": "fs/devpts/inode.c"
    },
    {
      "type": "modify",
      "old_id": "e0ee0b3000b2da107c975137165fc989777d8a58",
      "old_mode": 33188,
      "old_path": "include/linux/devpts_fs.h",
      "new_id": "358a4db72a27d76e4df8cf41802cce72c8477c92",
      "new_mode": 33188,
      "new_path": "include/linux/devpts_fs.h"
    }
  ]
}
