)]}'
{
  "commit": "14358e6ddaed27499d7d366b3e65c3e46b39e1c4",
  "tree": "de5a8919db855568577d0388fe30b5d7689e1f90",
  "parents": [
    "d475fd428ce77aa2a8bc650d230e17663a4f49c3"
  ],
  "author": {
    "name": "Peter Zijlstra",
    "email": "a.p.zijlstra@chello.nl",
    "time": "Sun Oct 14 01:38:33 2007 +0200"
  },
  "committer": {
    "name": "Peter Zijlstra",
    "email": "a.p.zijlstra@chello.nl",
    "time": "Sun Oct 14 01:38:33 2007 +0200"
  },
  "message": "lockdep: annotate dir vs file i_mutex\n\nOn Mon, 2007-09-24 at 22:13 -0400, Steven Rostedt wrote:\n\u003e The circular lock seems to be this:\n\u003e \n\u003e #1:\n\u003e \n\u003e   sys_mmap2:              down_write(\u0026mm-\u003emmap_sem);\n\u003e   nfs_revalidate_mapping: mutex_lock(\u0026inode-\u003ei_mutex);\n\u003e \n\u003e \n\u003e #0:\n\u003e \n\u003e   vfs_readdir:     mutex_lock(\u0026inode-\u003ei_mutex);\n\u003e    - during the readdir (filldir64), we take a user fault (missing page?)\n\u003e     and call do_page_fault -\n\u003e   do_page_fault:   down_read(\u0026mm-\u003emmap_sem);\n\u003e \n\u003e \n\u003e So it does indeed look like a circular locking. Now the question is, \"is\n\u003e this a bug?\".  Looking like the inode of #1 must be a file or something\n\u003e else that you can mmap and the inode of #0 seems it must be a directory.\n\u003e I would say \"no\".\n\u003e \n\u003e Now if you can readdir on a file or mmap a directory, then this could be\n\u003e an issue.\n\u003e \n\u003e Otherwise, I\u0027d love to see someone teach lockdep about this issue! ;-)\n\nMake a distinction between file and dir usage of i_mutex.\nThe inode should be complete and unused at unlock_new_inode(), re-init\ni_mutex depending on its type.\n\nSigned-off-by: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bf6adf122c688b337abf5d7c00288857b74a5927",
      "old_mode": 33188,
      "old_path": "fs/inode.c",
      "new_id": "f97de0aeb3b69dcd320668ccbf6bbeb6e9d57932",
      "new_mode": 33188,
      "new_path": "fs/inode.c"
    },
    {
      "type": "modify",
      "old_id": "0cad20e125852527f4c243b82922966e218fcce5",
      "old_mode": 33188,
      "old_path": "include/linux/fs.h",
      "new_id": "6d760f1ad87521c932d12d649cc0171d8e14f696",
      "new_mode": 33188,
      "new_path": "include/linux/fs.h"
    }
  ]
}
