|
Kmods SIG |
d83023 |
From 0056b273757b3057a5aff73f96a7fa134641caf4 Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
d83023 |
From: Kari Argillander <kari.argillander@gmail.com>
|
|
Kmods SIG |
d83023 |
Date: Thu, 9 Sep 2021 21:09:40 +0300
|
|
Kmods SIG |
d83023 |
Subject: [Backport 0056b273757b] src: Remove tmp pointer upcase in
|
|
Kmods SIG |
d83023 |
fill_super
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
We can survive without this tmp point upcase. So remove it we don't have
|
|
Kmods SIG |
d83023 |
so many tmp pointer in this function.
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
|
|
Kmods SIG |
d83023 |
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
|
|
Kmods SIG |
d83023 |
---
|
|
Kmods SIG |
d83023 |
src/super.c | 11 ++++-------
|
|
Kmods SIG |
d83023 |
1 file changed, 4 insertions(+), 7 deletions(-)
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
diff --git a/src/super.c b/src/super.c
|
|
Kmods SIG |
d83023 |
index e5ec808bd0522cb986ef11cbcc3ece57f6988916..8ce0d4f439a1e26b9f12dbdab0fbb946da859adb 100644
|
|
Kmods SIG |
d83023 |
--- a/src/super.c
|
|
Kmods SIG |
d83023 |
+++ b/src/super.c
|
|
Kmods SIG |
d83023 |
@@ -884,7 +884,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
|
Kmods SIG |
d83023 |
const struct VOLUME_INFO *info;
|
|
Kmods SIG |
d83023 |
u32 idx, done, bytes;
|
|
Kmods SIG |
d83023 |
struct ATTR_DEF_ENTRY *t;
|
|
Kmods SIG |
d83023 |
- u16 *upcase;
|
|
Kmods SIG |
d83023 |
u16 *shared;
|
|
Kmods SIG |
d83023 |
struct MFT_REF ref;
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
@@ -1184,11 +1183,9 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
|
Kmods SIG |
d83023 |
goto out;
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- upcase = sbi->upcase;
|
|
Kmods SIG |
d83023 |
-
|
|
Kmods SIG |
d83023 |
for (idx = 0; idx < (0x10000 * sizeof(short) >> PAGE_SHIFT); idx++) {
|
|
Kmods SIG |
d83023 |
const __le16 *src;
|
|
Kmods SIG |
d83023 |
- u16 *dst = Add2Ptr(upcase, idx << PAGE_SHIFT);
|
|
Kmods SIG |
d83023 |
+ u16 *dst = Add2Ptr(sbi->upcase, idx << PAGE_SHIFT);
|
|
Kmods SIG |
d83023 |
struct page *page = ntfs_map_page(inode->i_mapping, idx);
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
if (IS_ERR(page)) {
|
|
Kmods SIG |
d83023 |
@@ -1207,10 +1204,10 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
|
Kmods SIG |
d83023 |
ntfs_unmap_page(page);
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
- shared = ntfs_set_shared(upcase, 0x10000 * sizeof(short));
|
|
Kmods SIG |
d83023 |
- if (shared && upcase != shared) {
|
|
Kmods SIG |
d83023 |
+ shared = ntfs_set_shared(sbi->upcase, 0x10000 * sizeof(short));
|
|
Kmods SIG |
d83023 |
+ if (shared && sbi->upcase != shared) {
|
|
Kmods SIG |
d83023 |
+ kvfree(sbi->upcase);
|
|
Kmods SIG |
d83023 |
sbi->upcase = shared;
|
|
Kmods SIG |
d83023 |
- kvfree(upcase);
|
|
Kmods SIG |
d83023 |
}
|
|
Kmods SIG |
d83023 |
|
|
Kmods SIG |
d83023 |
iput(inode);
|
|
Kmods SIG |
d83023 |
--
|
|
Kmods SIG |
d83023 |
2.31.1
|
|
Kmods SIG |
d83023 |
|