diff options
| author | Konstantin Komarov <[email protected]> | 2024-04-23 12:31:56 +0000 |
|---|---|---|
| committer | Konstantin Komarov <[email protected]> | 2024-05-24 09:50:12 +0000 |
| commit | 05afeeebcac850a016ec4fb1f681ceda11963562 (patch) | |
| tree | c6e951a385b23b6a52b6ff70e7a297727bf33390 /drivers/pci/controller/pci-host-common.c | |
| parent | fs/ntfs3: Mark volume as dirty if xattr is broken (diff) | |
| download | kernel-05afeeebcac850a016ec4fb1f681ceda11963562.tar.gz kernel-05afeeebcac850a016ec4fb1f681ceda11963562.zip | |
fs/ntfs3: Fix case when index is reused during tree transformation
In most cases when adding a cluster to the directory index,
they are placed at the end, and in the bitmap, this cluster corresponds
to the last bit. The new directory size is calculated as follows:
data_size = (u64)(bit + 1) << indx->index_bits;
In the case of reusing a non-final cluster from the index,
data_size is calculated incorrectly, resulting in the directory size
differing from the actual size.
A check for cluster reuse has been added, and the size update is skipped.
Fixes: 82cae269cfa95 ("fs/ntfs3: Add initialization of super block")
Signed-off-by: Konstantin Komarov <[email protected]>
Cc: [email protected]
Diffstat (limited to 'drivers/pci/controller/pci-host-common.c')
0 files changed, 0 insertions, 0 deletions
