| /linux/fs/ramfs/ |
| H A D | file-nommu.c | 62 int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) in ramfs_nommu_expand_for_mapping() argument 72 order = get_order(newsize); in ramfs_nommu_expand_for_mapping() 76 ret = inode_newsize_ok(inode, newsize); in ramfs_nommu_expand_for_mapping() 80 i_size_write(inode, newsize); in ramfs_nommu_expand_for_mapping() 90 npages = (newsize + PAGE_SIZE - 1) >> PAGE_SHIFT; in ramfs_nommu_expand_for_mapping() 99 newsize = PAGE_SIZE * npages; in ramfs_nommu_expand_for_mapping() 101 memset(data, 0, newsize); in ramfs_nommu_expand_for_mapping() 132 static int ramfs_nommu_resize(struct inode *inode, loff_t newsize, loff_t size) in ramfs_nommu_resize() argument 139 if (unlikely(newsize >> 32)) in ramfs_nommu_resize() 142 return ramfs_nommu_expand_for_mapping(inode, newsize); in ramfs_nommu_resize() [all …]
|
| /linux/drivers/acpi/x86/ |
| H A D | apple.c | 30 unsigned int i, j = 0, newsize = 0, numprops, numvalid; in acpi_extract_apple_properties() local 79 newsize += key->string.length + 1; in acpi_extract_apple_properties() 81 newsize += val->buffer.length; in acpi_extract_apple_properties() 83 newsize += val->string.length + 1; in acpi_extract_apple_properties() 95 newsize += (1 + 3 * numvalid) * sizeof(union acpi_object); in acpi_extract_apple_properties() 96 newprops = ACPI_ALLOCATE_ZEROED(newsize); in acpi_extract_apple_properties() 140 WARN_ON(free_space != (void *)newprops + newsize); in acpi_extract_apple_properties()
|
| /linux/security/apparmor/ |
| H A D | lib.c | 121 bool aa_resize_str_table(struct aa_str_table *t, int newsize, gfp_t gfp) in aa_resize_str_table() argument 126 if (t->size == newsize) in aa_resize_str_table() 128 n = kzalloc_objs(*n, newsize, gfp); in aa_resize_str_table() 131 for (i = 0; i < min(t->size, newsize); i++) in aa_resize_str_table() 135 if (newsize > t->size) in aa_resize_str_table() 136 memset(&n[t->size], 0, (newsize-t->size)*sizeof(*n)); in aa_resize_str_table() 139 t->size = newsize; in aa_resize_str_table()
|
| /linux/mm/ |
| H A D | readahead.c | 378 unsigned long newsize = roundup_pow_of_two(size); in get_init_ra_size() 380 if (newsize <= max / 32) in get_init_ra_size() 381 newsize = newsize * 4; in get_init_ra_size() 382 else if (newsize <= max / 4) in get_init_ra_size() 383 newsize = newsize * 2; in get_init_ra_size() 385 newsize = max; in get_init_ra_size() 387 return newsize; 375 unsigned long newsize = roundup_pow_of_two(size); get_init_ra_size() local
|
| H A D | truncate.c | 779 void truncate_pagecache(struct inode *inode, loff_t newsize) in truncate_pagecache() argument 782 loff_t holebegin = round_up(newsize, PAGE_SIZE); in truncate_pagecache() 794 truncate_inode_pages(mapping, newsize); in truncate_pagecache() 812 void truncate_setsize(struct inode *inode, loff_t newsize) in truncate_setsize() argument 816 i_size_write(inode, newsize); in truncate_setsize() 817 if (newsize > oldsize) in truncate_setsize() 818 pagecache_isize_extended(inode, oldsize, newsize); in truncate_setsize() 819 truncate_pagecache(inode, newsize); in truncate_setsize()
|
| /linux/include/linux/ |
| H A D | ramfs.h | 14 ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) in ramfs_nommu_expand_for_mapping() argument 19 extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize);
|
| /linux/fs/ceph/ |
| H A D | quota.c | 443 bool ceph_quota_is_max_bytes_exceeded(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_exceeded() argument 451 if (newsize <= size) in ceph_quota_is_max_bytes_exceeded() 454 return check_quota_exceeded(inode, QUOTA_CHECK_MAX_BYTES_OP, (newsize - size)); in ceph_quota_is_max_bytes_exceeded() 465 bool ceph_quota_is_max_bytes_approaching(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_approaching() argument 473 if (newsize <= size) in ceph_quota_is_max_bytes_approaching() 477 (newsize - size)); in ceph_quota_is_max_bytes_approaching()
|
| /linux/fs/jfs/ |
| H A D | inode.c | 375 loff_t newsize; in jfs_truncate_nolock() local 396 newsize = xtTruncate(tid, ip, length, in jfs_truncate_nolock() 398 if (newsize < 0) { in jfs_truncate_nolock() 410 } while (newsize > length); /* Truncate isn't always atomic */ in jfs_truncate_nolock()
|
| H A D | jfs_xtree.h | 108 extern s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int type);
|
| /linux/arch/sh/mm/ |
| H A D | pmb.c | 657 unsigned long span, newsize; in pmb_merge() local 661 span = newsize = head->size; in pmb_merge() 668 newsize = span; in pmb_merge() 683 if (!depth || !pmb_size_valid(newsize)) in pmb_merge() 687 head->flags |= pmb_size_to_flags(newsize); in pmb_merge() 689 head->size = newsize; in pmb_merge()
|
| /linux/fs/gfs2/ |
| H A D | bmap.c | 1337 static int gfs2_journaled_truncate(struct inode *inode, u64 oldsize, u64 newsize) in gfs2_journaled_truncate() argument 1344 while (oldsize != newsize) { in gfs2_journaled_truncate() 1348 chunk = oldsize - newsize; in gfs2_journaled_truncate() 1372 static int trunc_start(struct inode *inode, u64 newsize) in trunc_start() argument 1383 unsigned int offs = newsize & (blocksize - 1); in trunc_start() 1385 error = gfs2_block_zero_range(inode, newsize, in trunc_start() 1405 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + newsize); in trunc_start() 1409 i_size_write(inode, newsize); in trunc_start() 1414 error = gfs2_journaled_truncate(inode, oldsize, newsize); in trunc_start() 1416 truncate_pagecache(inode, newsize); in trunc_start() [all …]
|
| /linux/arch/s390/tools/ |
| H A D | relocs.c | 254 unsigned long newsize = r->size + 50000; in add_reloc() local 255 void *mem = realloc(r->offset, newsize * sizeof(r->offset[0])); in add_reloc() 258 die("realloc of %ld entries for relocs failed\n", newsize); in add_reloc() 261 r->size = newsize; in add_reloc()
|
| /linux/arch/s390/mm/ |
| H A D | dump_pagetables.c | 295 size_t newsize; in add_marker() local 297 newsize = (markers_cnt + 2) * sizeof(*markers); in add_marker() 298 new = kvrealloc(markers, newsize, GFP_KERNEL); in add_marker()
|
| /linux/fs/udf/ |
| H A D | inode.c | 648 static int udf_extend_file(struct inode *inode, loff_t newsize) in udf_extend_file() argument 656 sector_t first_block = newsize >> sb->s_blocksize_bits, offset; in udf_extend_file() 703 (newsize & (sb->s_blocksize - 1)); in udf_extend_file() 1276 int udf_setsize(struct inode *inode, loff_t newsize) in udf_setsize() argument 1287 if (newsize > inode->i_size) { in udf_setsize() 1290 (udf_file_entry_alloc_offset(inode) + newsize)) { in udf_setsize() 1292 iinfo->i_lenAlloc = newsize; in udf_setsize() 1300 err = udf_extend_file(inode, newsize); in udf_setsize() 1304 truncate_setsize(inode, newsize); in udf_setsize() 1309 memset(iinfo->i_data + iinfo->i_lenEAttr + newsize, in udf_setsize() [all …]
|
| /linux/drivers/md/ |
| H A D | md-cluster.h | 34 int (*resize_bitmaps)(struct mddev *mddev, sector_t newsize, sector_t oldsize);
|
| /linux/drivers/md/bcache/ |
| H A D | bset.c | 134 size_t newsize = oldsize + u64s; in __bch_keylist_realloc() local 138 newsize = roundup_pow_of_two(newsize); in __bch_keylist_realloc() 140 if (newsize <= KEYLIST_INLINE || in __bch_keylist_realloc() 141 roundup_pow_of_two(oldsize) == newsize) in __bch_keylist_realloc() 144 new_keys = krealloc(old_keys, sizeof(uint64_t) * newsize, GFP_NOIO); in __bch_keylist_realloc()
|
| /linux/fs/nfs/ |
| H A D | nfs4session.c | 39 static void nfs4_shrink_slot_table(struct nfs4_slot_table *tbl, u32 newsize) in nfs4_shrink_slot_table() argument 42 if (newsize >= tbl->max_slots) in nfs4_shrink_slot_table() 46 while (newsize--) in nfs4_shrink_slot_table()
|
| H A D | direct.c | 137 loff_t newsize = offset + (loff_t)count; in nfs_direct_file_adjust_size_locked() local 140 if (newsize > oldsize) { in nfs_direct_file_adjust_size_locked() 141 i_size_write(inode, newsize); in nfs_direct_file_adjust_size_locked() 143 trace_nfs_size_grow(inode, newsize); in nfs_direct_file_adjust_size_locked()
|
| /linux/drivers/block/rnbd/ |
| H A D | rnbd-clt.h | 141 int rnbd_clt_resize_disk(struct rnbd_clt_dev *dev, sector_t newsize);
|
| /linux/fs/ntfs3/ |
| H A D | file.c | 742 loff_t newsize, oldsize; in ntfs_setattr() local 751 newsize = attr->ia_size; in ntfs_setattr() 753 if (newsize <= oldsize) in ntfs_setattr() 754 err = ntfs_truncate(inode, newsize); in ntfs_setattr() 756 err = ntfs_extend(inode, newsize, 0, NULL); in ntfs_setattr() 762 i_size_write(inode, newsize); in ntfs_setattr()
|
| /linux/fs/nilfs2/ |
| H A D | super.c | 430 int nilfs_resize_fs(struct super_block *sb, __u64 newsize) in nilfs_resize_fs() argument 440 if (newsize > devsize) in nilfs_resize_fs() 447 if (newsize < 4096) { in nilfs_resize_fs() 459 sb2off = NILFS_SB2_OFFSET_BYTES(newsize); in nilfs_resize_fs() 485 sbp[0]->s_dev_size = cpu_to_le64(newsize); in nilfs_resize_fs()
|
| H A D | ioctl.c | 989 __u64 newsize; in nilfs_ioctl_resize() local 1000 if (copy_from_user(&newsize, argp, sizeof(newsize))) in nilfs_ioctl_resize() 1003 ret = nilfs_resize_fs(inode->i_sb, newsize); in nilfs_ioctl_resize()
|
| /linux/arch/x86/tools/ |
| H A D | relocs.c | 684 unsigned long newsize = r->size + 50000; in add_reloc() local 685 void *mem = realloc(r->offset, newsize * sizeof(r->offset[0])); in add_reloc() 688 die("realloc of %ld entries for relocs failed\n", newsize); in add_reloc() 691 r->size = newsize; in add_reloc()
|
| /linux/arch/mips/boot/tools/ |
| H A D | relocs.c | 456 unsigned long newsize = r->size + 50000; in add_reloc() local 457 void *mem = realloc(r->offset, newsize * sizeof(r->offset[0])); in add_reloc() 463 r->size = newsize; in add_reloc()
|
| /linux/security/ |
| H A D | commoncap.c | 581 size_t newsize; in cap_convert_nscap() local 606 newsize = sizeof(struct vfs_ns_cap_data); in cap_convert_nscap() 607 nscap = kmalloc(newsize, GFP_ATOMIC); in cap_convert_nscap() 619 return newsize; in cap_convert_nscap()
|