diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ntfs3/run.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ntfs3/run.c b/fs/ntfs3/run.c index 19aa044fd1fcc..ad7db67514ef7 100644 --- a/fs/ntfs3/run.c +++ b/fs/ntfs3/run.c @@ -1297,9 +1297,12 @@ bool run_remove_range(struct runs_tree *run, CLST vcn, CLST len, CLST *done) if (r_end > end) { /* Remove a middle part, split. */ + CLST tail_lcn = r->lcn == SPARSE_LCN ? + SPARSE_LCN : (r->lcn + (end - r->vcn)); + *done += len; r->len = d; - return run_add_entry(run, end, r->lcn, r_end - end, + return run_add_entry(run, end, tail_lcn, r_end - end, false); } /* Remove tail of run .*/ |
