mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
commit
8dd4dd5d52
5 changed files with 10 additions and 6 deletions
2
balloc.c
2
balloc.c
|
|
@ -7,7 +7,7 @@
|
|||
#include <linux/blkdev.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
|
||||
#include <linux/sched/signal.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
8
dir.c
8
dir.c
|
|
@ -64,7 +64,7 @@ static void exfat_get_uniname_from_ext_entry(struct super_block *sb,
|
|||
static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_entry *dir_entry)
|
||||
{
|
||||
int i, dentries_per_clu, dentries_per_clu_bits = 0, num_ext;
|
||||
unsigned int type, clu_offset;
|
||||
unsigned int type, clu_offset, max_dentries;
|
||||
sector_t sector;
|
||||
struct exfat_chain dir, clu;
|
||||
struct exfat_uni_name uni_name;
|
||||
|
|
@ -87,6 +87,8 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent
|
|||
|
||||
dentries_per_clu = sbi->dentries_per_clu;
|
||||
dentries_per_clu_bits = ilog2(dentries_per_clu);
|
||||
max_dentries = (unsigned int)min_t(u64, MAX_EXFAT_DENTRIES,
|
||||
(u64)sbi->num_clusters << dentries_per_clu_bits);
|
||||
|
||||
clu_offset = dentry >> dentries_per_clu_bits;
|
||||
exfat_chain_dup(&clu, &dir);
|
||||
|
|
@ -110,7 +112,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent
|
|||
}
|
||||
}
|
||||
|
||||
while (clu.dir != EXFAT_EOF_CLUSTER) {
|
||||
while (clu.dir != EXFAT_EOF_CLUSTER && dentry < max_dentries) {
|
||||
i = dentry & (dentries_per_clu - 1);
|
||||
|
||||
for ( ; i < dentries_per_clu; i++, dentry++) {
|
||||
|
|
@ -246,7 +248,7 @@ static int exfat_iterate(struct file *filp, struct dir_context *ctx)
|
|||
if (err)
|
||||
goto unlock;
|
||||
get_new:
|
||||
if (cpos >= i_size_read(inode))
|
||||
if (ei->flags == ALLOC_NO_FAT_CHAIN && cpos >= i_size_read(inode))
|
||||
goto end_of_dir;
|
||||
|
||||
err = exfat_readdir(inode, &cpos, &de);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include <linux/ratelimit.h>
|
||||
#include <linux/nls.h>
|
||||
|
||||
#define EXFAT_VERSION "5.12.3"
|
||||
#define EXFAT_VERSION "5.14.1"
|
||||
|
||||
#define EXFAT_SUPER_MAGIC 0x2011BAB0UL
|
||||
#define EXFAT_ROOT_INO 1
|
||||
|
|
|
|||
2
misc.c
2
misc.c
|
|
@ -119,6 +119,8 @@ void exfat_get_entry_time(struct exfat_sb_info *sbi, struct timespec *ts,
|
|||
void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts,
|
||||
u8 *tz, __le16 *time, __le16 *date, u8 *time_cs)
|
||||
#else
|
||||
#undef EXFAT_MAX_TIMESTAMP_SECS
|
||||
#define EXFAT_MAX_TIMESTAMP_SECS 0xffffffff
|
||||
void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec *ts,
|
||||
u8 *tz, __le16 *time, __le16 *date, u8 *time_cs)
|
||||
#endif
|
||||
|
|
|
|||
2
super.c
2
super.c
|
|
@ -984,7 +984,7 @@ static int exfat_fill_super(struct super_block *sb, void *data, int silent)
|
|||
if (!sb->s_root) {
|
||||
exfat_err(sb, "failed to get the root dentry");
|
||||
err = -ENOMEM;
|
||||
goto put_inode;
|
||||
goto free_table;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue