* *clu = (~0), if it's unable to allocate a new cluster
*/
static int exfat_map_cluster(struct inode *inode, unsigned int clu_offset,
- unsigned int *clu, unsigned int *count, int create)
+ unsigned int *clu, unsigned int *count, int create,
+ bool *balloc)
{
int ret;
unsigned int last_clu;
if (exfat_cluster_walk(sb, clu, num_to_be_allocated - 1, ei->flags))
return -EIO;
*count = 1;
+ if (balloc)
+ *balloc = true;
}
/* hint information */
/* Is this block already allocated? */
count = exfat_bytes_to_cluster_round_up(sbi, bh_result->b_size);
err = exfat_map_cluster(inode, iblock >> sbi->sect_per_clus_bits,
- &cluster, &count, create);
+ &cluster, &count, create, NULL);
if (err) {
if (err != -ENOSPC)
exfat_fs_error_ratelimit(sb,