)]}'
{
  "commit": "b70540e5730910d5359c4060158b7a7ca64d4a4a",
  "tree": "e4602dee83e01fd3fe5e472ef83db479064a874c",
  "parents": [
    "c00cc3c7b177571cbb9fe457d11bbeefe9cf2dd5"
  ],
  "author": {
    "name": "Chao Yu",
    "email": "chao@kernel.org",
    "time": "Wed Sep 09 13:06:34 2026 +0800"
  },
  "committer": {
    "name": "Jaegeuk Kim",
    "email": "jaegeuk@kernel.org",
    "time": "Thu Sep 10 21:28:54 2026 +0000"
  },
  "message": "fsck.f2fs: fix to avoid selecting current section in find_next_free_block\n\nIn find_next_free_block(), when searching for a free block or allocating a\nnew section, it checks:\n\n\tif (!(get_sb(feature) \u0026 F2FS_FEATURE_RO) \u0026\u0026\n\t\t\t\t\tIS_CUR_SEGNO(sbi, segno))\n\t\tgoto next_segment;\n\nHowever, when large section is enabled (segs_per_sec \u003e 1), checking only\nIS_CUR_SEGNO(sbi, segno) is insufficient. If segment 0 of a section is\nempty, but segment 1 is an active curseg (e.g. CURSEG_WARM_NODE),\nIS_CUR_SEGNO(sbi, segno) evaluates to false.\n\nConsequently, find_next_free_block() can treat the section as completely\nfree and call set_section_type(sbi, segno, want_type). This overwrites the\nsegment type of all segments in the section, clobbering active curseg\nsegments (e.g. from NODE to DATA) and leading to an assertion crash in\nupdate_data_blkaddr():\n\n  [update_data_blkaddr:2527] NAT and SIT is inconsistent: ino: 4, nid: 23, blkaddr: 21925780, segtype: 1\n  [ASSERT] (update_data_blkaddr:2529) 0\n\nFix this by using IS_CUR_SECNO(sbi, GET_SEC_FROM_SEG(sbi, segno)) to ensure\nthat any segment belonging to an active current section is skipped.\n\nSigned-off-by: Chao Yu \u003cchao@kernel.org\u003e\nSigned-off-by: Jaegeuk Kim \u003cjaegeuk@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a202f3d1c05cb5f9b34e2d86ea25f0633e7f3418",
      "old_mode": 33188,
      "old_path": "fsck/mount.c",
      "new_id": "2fd8e1cb1f5268898410b58e4f2c491aca5b5201",
      "new_mode": 33188,
      "new_path": "fsck/mount.c"
    }
  ]
}
