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