)]}'
{
  "commit": "2f9092e1020246168b1309b35e085ecd7ff9ff72",
  "tree": "f8318c1e62e789718ae7637869f6c075b815bcb2",
  "parents": [
    "1ba0c7dbbbc24230394100c5f0d0df38cb400cff"
  ],
  "author": {
    "name": "David Woodhouse",
    "email": "dwmw2@infradead.org",
    "time": "Mon Apr 20 23:18:37 2009 +0100"
  },
  "committer": {
    "name": "Al Viro",
    "email": "viro@zeniv.linux.org.uk",
    "time": "Mon Apr 20 23:01:16 2009 -0400"
  },
  "message": "Fix i_mutex vs. readdir handling in nfsd\n\nCommit 14f7dd63 (\"Copy XFS readdir hack into nfsd code\") introduced a\nbug to generic code which had been extant for a long time in the XFS\nversion -- it started to call through into lookup_one_len() and hence\ninto the file systems\u0027 -\u003elookup() methods without i_mutex held on the\ndirectory.\n\nThis patch fixes it by locking the directory\u0027s i_mutex again before\ncalling the filldir functions. The original deadlocks which commit\n14f7dd63 was designed to avoid are still avoided, because they were due\nto fs-internal locking, not i_mutex.\n\nWhile we\u0027re at it, fix the return type of nfsd_buffered_readdir() which\nshould be a __be32 not an int -- it\u0027s an NFS errno, not a Linux errno.\nAnd return nfserrno(-ENOMEM) when allocation fails, not just -ENOMEM.\nSparse would have caught that, if it wasn\u0027t so busy bitching about\n__cold__.\n\nCommit 05f4f678 (\"nfsd4: don\u0027t do lookup within readdir in recovery\ncode\") introduced a similar problem with calling lookup_one_len()\nwithout i_mutex, which this patch also addresses. To fix that, it was\nnecessary to fix the called functions so that they expect i_mutex to be\nheld; that part was done by J. Bruce Fields.\n\nSigned-off-by: David Woodhouse \u003cDavid.Woodhouse@intel.com\u003e\nUmm-I-can-live-with-that-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nReported-by: J. R. Okajima \u003chooanon05@yahoo.co.jp\u003e\nTested-by: J. Bruce Fields \u003cbfields@citi.umich.edu\u003e\nLKML-Reference: \u003c8036.1237474444@jrobl\u003e\nCc: stable@kernel.org\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b8433ebfae055424c5d953ff3ff9c96bc7c7a628",
      "old_mode": 33188,
      "old_path": "fs/namei.c",
      "new_id": "78f253cd2d4fec1795ae17d81648d1f59799c2ba",
      "new_mode": 33188,
      "new_path": "fs/namei.c"
    },
    {
      "type": "modify",
      "old_id": "3444c0052a8764d3098a9a34f2c53872b4d2f3ad",
      "old_mode": 33188,
      "old_path": "fs/nfsd/nfs4recover.c",
      "new_id": "5275097a75651db2303f777c0213cae4a04fcb7e",
      "new_mode": 33188,
      "new_path": "fs/nfsd/nfs4recover.c"
    },
    {
      "type": "modify",
      "old_id": "46e6bd2d4f070101673ac0c52c9f3d7a13f36426",
      "old_mode": 33188,
      "old_path": "fs/nfsd/vfs.c",
      "new_id": "6c68ffd6b4bb01c21174c7294e37635a945cd295",
      "new_mode": 33188,
      "new_path": "fs/nfsd/vfs.c"
    }
  ]
}
