mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 16:53:58 -05:00
fs/ntfs3: Remove tmp pointer upcase in fill_super
We can survive without this tmp point upcase. So remove it we don't have so many tmp pointer in this function. Signed-off-by: Kari Argillander <kari.argillander@gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
parent
4ea41b3eb5
commit
0056b27375
1 changed files with 4 additions and 7 deletions
|
@ -884,7 +884,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
||||||
const struct VOLUME_INFO *info;
|
const struct VOLUME_INFO *info;
|
||||||
u32 idx, done, bytes;
|
u32 idx, done, bytes;
|
||||||
struct ATTR_DEF_ENTRY *t;
|
struct ATTR_DEF_ENTRY *t;
|
||||||
u16 *upcase;
|
|
||||||
u16 *shared;
|
u16 *shared;
|
||||||
struct MFT_REF ref;
|
struct MFT_REF ref;
|
||||||
|
|
||||||
|
@ -1184,11 +1183,9 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
upcase = sbi->upcase;
|
|
||||||
|
|
||||||
for (idx = 0; idx < (0x10000 * sizeof(short) >> PAGE_SHIFT); idx++) {
|
for (idx = 0; idx < (0x10000 * sizeof(short) >> PAGE_SHIFT); idx++) {
|
||||||
const __le16 *src;
|
const __le16 *src;
|
||||||
u16 *dst = Add2Ptr(upcase, idx << PAGE_SHIFT);
|
u16 *dst = Add2Ptr(sbi->upcase, idx << PAGE_SHIFT);
|
||||||
struct page *page = ntfs_map_page(inode->i_mapping, idx);
|
struct page *page = ntfs_map_page(inode->i_mapping, idx);
|
||||||
|
|
||||||
if (IS_ERR(page)) {
|
if (IS_ERR(page)) {
|
||||||
|
@ -1207,10 +1204,10 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
||||||
ntfs_unmap_page(page);
|
ntfs_unmap_page(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
shared = ntfs_set_shared(upcase, 0x10000 * sizeof(short));
|
shared = ntfs_set_shared(sbi->upcase, 0x10000 * sizeof(short));
|
||||||
if (shared && upcase != shared) {
|
if (shared && sbi->upcase != shared) {
|
||||||
|
kvfree(sbi->upcase);
|
||||||
sbi->upcase = shared;
|
sbi->upcase = shared;
|
||||||
kvfree(upcase);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
iput(inode);
|
iput(inode);
|
||||||
|
|
Loading…
Add table
Reference in a new issue