mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
Merge branch 'dev' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git
This commit is contained in:
commit
7f8ba7d724
@ -122,7 +122,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent
|
||||
type = exfat_get_entry_type(ep);
|
||||
if (type == TYPE_UNUSED) {
|
||||
brelse(bh);
|
||||
break;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (type != TYPE_FILE && type != TYPE_DIR) {
|
||||
@ -170,6 +170,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
dir_entry->namebuf.lfn[0] = '\0';
|
||||
*cpos = EXFAT_DEN_TO_B(dentry);
|
||||
return 0;
|
||||
|
@ -201,6 +201,8 @@ static int __exfat_free_cluster(struct inode *inode, struct exfat_chain *p_chain
|
||||
|
||||
if (err || n_clu == EXFAT_EOF_CLUSTER)
|
||||
sync = true;
|
||||
else if (num_clusters >= p_chain->size)
|
||||
break;
|
||||
else
|
||||
next_cmap_i =
|
||||
BITMAP_OFFSET_SECTOR_INDEX(sb, CLUSTER_TO_BITMAP_ENT(n_clu));
|
||||
|
@ -545,6 +545,7 @@ static int exfat_extend_valid_size(struct file *file, loff_t new_valid_size)
|
||||
while (pos < new_valid_size) {
|
||||
u32 len;
|
||||
struct folio *folio;
|
||||
unsigned long off;
|
||||
|
||||
len = PAGE_SIZE - (pos & (PAGE_SIZE - 1));
|
||||
if (pos + len > new_valid_size)
|
||||
@ -554,6 +555,9 @@ static int exfat_extend_valid_size(struct file *file, loff_t new_valid_size)
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
off = offset_in_folio(folio, pos);
|
||||
folio_zero_new_buffers(folio, off, off + len);
|
||||
|
||||
err = ops->write_end(file, mapping, pos, len, len, folio, NULL);
|
||||
if (err < 0)
|
||||
goto out;
|
||||
@ -563,6 +567,8 @@ static int exfat_extend_valid_size(struct file *file, loff_t new_valid_size)
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
@ -330,8 +330,8 @@ static int exfat_find_empty_entry(struct inode *inode,
|
||||
|
||||
while ((dentry = exfat_search_empty_slot(sb, &hint_femp, p_dir,
|
||||
num_entries, es)) < 0) {
|
||||
if (dentry == -EIO)
|
||||
break;
|
||||
if (dentry != -ENOSPC)
|
||||
return dentry;
|
||||
|
||||
if (exfat_check_max_dentries(inode))
|
||||
return -ENOSPC;
|
||||
|
Loading…
x
Reference in New Issue
Block a user