)]}'
{
  "commit": "77573fa310d95e4293efdec98dace74cd9e52f43",
  "tree": "a7a12a6a10ef23409c6d213179d5ac3afad8d6ae",
  "parents": [
    "88149082bb8ef31b289673669e080ec6a00c2e59"
  ],
  "author": {
    "name": "Hao Li",
    "email": "lihao2018.fnst@cn.fujitsu.com",
    "time": "Tue Dec 08 10:10:50 2020 +0800"
  },
  "committer": {
    "name": "Al Viro",
    "email": "viro@zeniv.linux.org.uk",
    "time": "Thu Dec 10 17:33:17 2020 -0500"
  },
  "message": "fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set\n\nIf DCACHE_REFERENCED is set, fast_dput() will return true, and then\nretain_dentry() have no chance to check DCACHE_DONTCACHE. As a result,\nthe dentry won\u0027t be killed and the corresponding inode can\u0027t be evicted.\nIn the following example, the DAX policy can\u0027t take effects unless we\ndo a drop_caches manually.\n\n  # DCACHE_LRU_LIST will be set\n  echo abcdefg \u003e test.txt\n\n  # DCACHE_REFERENCED will be set and DCACHE_DONTCACHE can\u0027t do anything\n  xfs_io -c \u0027chattr +x\u0027 test.txt\n\n  # Drop caches to make DAX changing take effects\n  echo 2 \u003e /proc/sys/vm/drop_caches\n\nWhat this patch does is preventing fast_dput() from returning true if\nDCACHE_DONTCACHE is set. Then retain_dentry() will detect the\nDCACHE_DONTCACHE and will return false. As a result, the dentry will be\nkilled and the inode will be evicted. In this way, if we change per-file\nDAX policy, it will take effects automatically after this file is closed\nby all processes.\n\nI also add some comments to make the code more clear.\n\nSigned-off-by: Hao Li \u003clihao2018.fnst@cn.fujitsu.com\u003e\nReviewed-by: Jan Kara \u003cjack@suse.cz\u003e\nReviewed-by: Ira Weiny \u003cira.weiny@intel.com\u003e\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ea0485861d9377311a858359ab1183a1bae4e042",
      "old_mode": 33188,
      "old_path": "fs/dcache.c",
      "new_id": "97e81a844a966c6683e4688347f78149f886e16f",
      "new_mode": 33188,
      "new_path": "fs/dcache.c"
    }
  ]
}
