summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorMatthias Goergens <matthias.goergens@gmail.com>2026-10-02 12:34:58 +0800
committerNamjae Jeon <linkinjeon@kernel.org>2026-10-20 18:41:52 +0900
commitc6ee0986b80715c44d547e9cbdc1a72ad855071c (patch)
treea82e0bc7014dbb4947640b7a2b14d7bd6790db2b /scripts/Makefile.thinlto
parent258239e79b842e5246fb7f50758d9d15430f4102 (diff)
downloadlinux-c6ee0986b80715c44d547e9cbdc1a72ad855071c.tar.gz
linux-c6ee0986b80715c44d547e9cbdc1a72ad855071c.zip
ntfs: add a runlist merge that leaves the source runlist to the caller
ntfs_runlists_merge() frees the source runlist once its runs are in the destination. A caller that may have to undo the merge then has to work out its runs again from the merged runlist, where the first and the last of them may have been coalesced with neighbouring runs. Add ntfs_runlists_merge_keep_src(), which neither modifies nor frees the source runlist. For that, ntfs_rl_append() and ntfs_rl_replace() now merge the right-hand end into the copied run in the destination instead of into the last source run before copying it, and the merge helpers take the source as const, so the compiler checks that none of them writes to it. The merged runlist is the same as before. For every caller, a source runlist without any mapped run, which the merge already warns about, now fails with -EINVAL instead of carrying on with nothing to insert: with no run copied, the right-hand merge into the destination would index before the insertion point. The next patch uses ntfs_runlists_merge_keep_src() to free exactly the clusters it allocated when it has to undo an $MFT data extension. Suggested-by: Hyunchul Lee <hyc.lee@gmail.com> Cc: stable@vger.kernel.org # needed by the next patch Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions