Commit ff238170 authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Only need two spare runlist elements when reallocating memory in

fs/ntfs/lcnalloc.c::ntfs_cluster_alloc(), not three since we no longer
add a starting element.
Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent 5390e71a
......@@ -322,10 +322,10 @@ runlist_element *ntfs_cluster_alloc(ntfs_volume *vol, const VCN start_vcn,
}
/*
* Allocate more memory if needed, including space for
* the not-mapped and terminator elements.
* the terminator element.
* ntfs_malloc_nofs() operates on whole pages only.
*/
if ((rlpos + 3) * sizeof(*rl) > rlsize) {
if ((rlpos + 2) * sizeof(*rl) > rlsize) {
runlist_element *rl2;
ntfs_debug("Reallocating memory.");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment