inode.c (7ae9fb1b7ecbb5d85d07857943f677fd1a559b18) inode.c (39c1ce8eafc0ff64fb9e28536ccc7df6a8e2999d)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
4 */
5
6#include <linux/init.h>
7#include <linux/buffer_head.h>
8#include <linux/mpage.h>

--- 206 unchanged lines hidden (view full) ---

215 if (new_clu.flags == ALLOC_FAT_CHAIN)
216 if (exfat_ent_set(sb, last_clu, new_clu.dir))
217 return -EIO;
218 }
219
220 num_clusters += num_to_be_allocated;
221 *clu = new_clu.dir;
222
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
4 */
5
6#include <linux/init.h>
7#include <linux/buffer_head.h>
8#include <linux/mpage.h>

--- 206 unchanged lines hidden (view full) ---

215 if (new_clu.flags == ALLOC_FAT_CHAIN)
216 if (exfat_ent_set(sb, last_clu, new_clu.dir))
217 return -EIO;
218 }
219
220 num_clusters += num_to_be_allocated;
221 *clu = new_clu.dir;
222
223 inode->i_blocks +=
224 num_to_be_allocated << sbi->sect_per_clus_bits;
223 inode->i_blocks += EXFAT_CLU_TO_B(num_to_be_allocated, sbi) >> 9;
225
226 /*
227 * Move *clu pointer along FAT chains (hole care) because the
228 * caller of this function expect *clu to be the last cluster.
229 * This only works when num_to_be_allocated >= 2,
230 * *clu = (the first cluster of the allocated chain) =>
231 * (the last cluster of ...)
232 */

--- 338 unchanged lines hidden (view full) ---

571 size++;
572 }
573
574 ei->i_size_aligned = size;
575 ei->i_size_ondisk = size;
576
577 exfat_save_attr(inode, info->attr);
578
224
225 /*
226 * Move *clu pointer along FAT chains (hole care) because the
227 * caller of this function expect *clu to be the last cluster.
228 * This only works when num_to_be_allocated >= 2,
229 * *clu = (the first cluster of the allocated chain) =>
230 * (the last cluster of ...)
231 */

--- 338 unchanged lines hidden (view full) ---

570 size++;
571 }
572
573 ei->i_size_aligned = size;
574 ei->i_size_ondisk = size;
575
576 exfat_save_attr(inode, info->attr);
577
579 inode->i_blocks = round_up(i_size_read(inode), sbi->cluster_size) >>
580 inode->i_blkbits;
578 inode->i_blocks = round_up(i_size_read(inode), sbi->cluster_size) >> 9;
581 inode->i_mtime = info->mtime;
582 inode->i_ctime = info->mtime;
583 ei->i_crtime = info->crtime;
584 inode->i_atime = info->atime;
585
586 return 0;
587}
588

--- 44 unchanged lines hidden ---
579 inode->i_mtime = info->mtime;
580 inode->i_ctime = info->mtime;
581 ei->i_crtime = info->crtime;
582 inode->i_atime = info->atime;
583
584 return 0;
585}
586

--- 44 unchanged lines hidden ---