| /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 if (!newsize) in ramfs_nommu_expand_for_mapping() 75 order = get_order(newsize); in ramfs_nommu_expand_for_mapping() 79 ret = inode_newsize_ok(inode, newsize); in ramfs_nommu_expand_for_mapping() 83 i_size_write(inode, newsize); in ramfs_nommu_expand_for_mapping() 93 npages = (newsize + PAGE_SIZE - 1) >> PAGE_SHIFT; in ramfs_nommu_expand_for_mapping() 102 newsize = PAGE_SIZE * npages; in ramfs_nommu_expand_for_mapping() 104 memset(data, 0, newsize); in ramfs_nommu_expand_for_mapping() 135 static int ramfs_nommu_resize(struct inode *inode, loff_t newsize, loff_t size) in ramfs_nommu_resize() argument 142 if (unlikely(newsize >> 32)) 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/fs/ntfs/ |
| H A D | attrib.h | 112 int __ntfs_attr_truncate_vfs(struct ntfs_inode *ni, const s64 newsize, 114 int ntfs_attr_expand(struct ntfs_inode *ni, const s64 newsize, const s64 prealloc_size); 115 int ntfs_attr_expand_locked(struct ntfs_inode *ni, const s64 newsize, 118 int ntfs_attr_truncate_i(struct ntfs_inode *ni, const s64 newsize, unsigned int holes); 119 int ntfs_attr_truncate_i_locked(struct ntfs_inode *ni, const s64 newsize, 122 int ntfs_attr_truncate(struct ntfs_inode *ni, const s64 newsize);
|
| H A D | attrib.c | 4241 const s64 newsize, in ntfs_non_resident_attr_shrink() argument 4253 (unsigned long long)ni->mft_no, ni->type, (long long)newsize); in ntfs_non_resident_attr_shrink() 4266 err = ntfs_attr_size_bounds_check(vol, ni->type, newsize); in ntfs_non_resident_attr_shrink() 4284 ((newsize - 1) | (ni->itype.compressed.block_size - 1)) + 1); in ntfs_non_resident_attr_shrink() 4287 ntfs_bytes_to_cluster(vol, newsize + vol->cluster_size - 1); in ntfs_non_resident_attr_shrink() 4378 ni->data_size = newsize; in ntfs_non_resident_attr_shrink() 4379 ctx->attr->data.non_resident.data_size = cpu_to_le64(newsize); in ntfs_non_resident_attr_shrink() 4380 if (newsize < ni->initialized_size) { in ntfs_non_resident_attr_shrink() 4381 ni->initialized_size = newsize; in ntfs_non_resident_attr_shrink() 4382 ctx->attr->data.non_resident.initialized_size = cpu_to_le64(newsize); in ntfs_non_resident_attr_shrink() [all …]
|
| /linux/security/apparmor/ |
| H A D | lib.c | 122 bool aa_resize_str_table(struct aa_str_table *t, int newsize, gfp_t gfp) in aa_resize_str_table() argument 127 if (t->size == newsize) in aa_resize_str_table() 129 n = kzalloc_objs(*n, newsize, gfp); in aa_resize_str_table() 132 for (i = 0; i < min(t->size, newsize); i++) in aa_resize_str_table() 136 if (newsize > t->size) in aa_resize_str_table() 137 memset(&n[t->size], 0, (newsize-t->size)*sizeof(*n)); in aa_resize_str_table() 140 t->size = newsize; in aa_resize_str_table()
|
| /linux/mm/ |
| H A D | readahead.c | 392 unsigned long newsize = roundup_pow_of_two(size); in get_init_ra_size() local 394 if (newsize <= max / 32) in get_init_ra_size() 395 newsize = newsize * 4; in get_init_ra_size() 396 else if (newsize <= max / 4) in get_init_ra_size() 397 newsize = newsize * 2; in get_init_ra_size() 399 newsize = max; in get_init_ra_size() 401 return newsize; in get_init_ra_size()
|
| H A D | shmem.c | 189 loff_t oldsize, loff_t newsize) in shmem_reacct_size() argument 192 if (VM_ACCT(newsize) > VM_ACCT(oldsize)) in shmem_reacct_size() 194 VM_ACCT(newsize) - VM_ACCT(oldsize)); in shmem_reacct_size() 195 else if (VM_ACCT(newsize) < VM_ACCT(oldsize)) in shmem_reacct_size() 196 vm_unacct_memory(VM_ACCT(oldsize) - VM_ACCT(newsize)); in shmem_reacct_size() 1350 loff_t newsize = attr->ia_size; in shmem_setattr() local 1353 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || in shmem_setattr() 1354 (newsize > oldsize && (info->seals & F_SEAL_GROW))) in shmem_setattr() 1357 if (newsize != oldsize) { in shmem_setattr() 1361 oldsize, newsize); in shmem_setattr() [all...] |
| H A D | nommu.c | 1835 size_t newsize) in nommu_shrink_inode_mappings() argument 1842 low = newsize >> PAGE_SHIFT; in nommu_shrink_inode_mappings() 1873 if (r_top > newsize) { in nommu_shrink_inode_mappings() 1874 region->vm_top -= r_top - newsize; in nommu_shrink_inode_mappings()
|
| /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/xfs/ |
| H A D | xfs_iops.c | 914 xfs_off_t newsize = iattr->ia_size; in xfs_vn_setattr_size() local 936 if (newsize == 0 && oldsize == 0 && ip->i_df.if_nextents == 0) { in xfs_vn_setattr_size() 991 if (newsize > oldsize) { in xfs_vn_setattr_size() 992 trace_xfs_zero_eof(ip, oldsize, newsize - oldsize); in xfs_vn_setattr_size() 993 error = xfs_zero_range(ip, oldsize, newsize - oldsize, in xfs_vn_setattr_size() 996 error = xfs_truncate_page(ip, newsize, &ac, &did_zeroing); in xfs_vn_setattr_size() 1026 truncate_setsize(inode, newsize); in xfs_vn_setattr_size() 1037 (newsize > ip->i_disk_size && oldsize != ip->i_disk_size)) { in xfs_vn_setattr_size() 1039 ip->i_disk_size, newsize - 1); in xfs_vn_setattr_size() 1072 if (newsize != oldsize && in xfs_vn_setattr_size() [all …]
|
| /linux/fs/ceph/ |
| H A D | quota.c | 457 bool ceph_quota_is_max_bytes_exceeded(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_exceeded() argument 465 if (newsize <= size) in ceph_quota_is_max_bytes_exceeded() 468 return check_quota_exceeded(inode, QUOTA_CHECK_MAX_BYTES_OP, (newsize - size)); in ceph_quota_is_max_bytes_exceeded() 479 bool ceph_quota_is_max_bytes_approaching(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_approaching() argument 487 if (newsize <= size) in ceph_quota_is_max_bytes_approaching() 491 (newsize - size)); in ceph_quota_is_max_bytes_approaching()
|
| /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 | 1353 static int gfs2_journaled_truncate(struct inode *inode, u64 oldsize, u64 newsize) in gfs2_journaled_truncate() argument 1360 while (oldsize != newsize) { in gfs2_journaled_truncate() 1364 chunk = oldsize - newsize; in gfs2_journaled_truncate() 1388 static int trunc_start(struct inode *inode, u64 newsize) in trunc_start() argument 1399 unsigned int offs = newsize & (blocksize - 1); in trunc_start() 1401 error = gfs2_block_zero_range(inode, newsize, in trunc_start() 1421 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + newsize); in trunc_start() 1425 i_size_write(inode, newsize); in trunc_start() 1430 error = gfs2_journaled_truncate(inode, oldsize, newsize); in trunc_start() 1432 truncate_pagecache(inode, newsize); in trunc_start() [all …]
|
| /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/f2fs/ |
| H A D | xattr.c | 640 int found, newsize; in __f2fs_setxattr() local 719 newsize = XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + len + size); in __f2fs_setxattr() 732 if (unlikely(free < newsize)) { in __f2fs_setxattr() 767 new_hsize += newsize; in __f2fs_setxattr() 773 *(u32 *)((u8 *)last + newsize) = 0; in __f2fs_setxattr()
|
| /linux/fs/udf/ |
| H A D | inode.c | 656 static int udf_extend_file(struct inode *inode, loff_t newsize) in udf_extend_file() argument 664 sector_t first_block = newsize >> sb->s_blocksize_bits, offset; in udf_extend_file() 711 (newsize & (sb->s_blocksize - 1)); in udf_extend_file() 1280 int udf_setsize(struct inode *inode, loff_t newsize) in udf_setsize() argument 1291 if (newsize > inode->i_size) { in udf_setsize() 1294 (udf_file_entry_alloc_offset(inode) + newsize)) { in udf_setsize() 1296 iinfo->i_lenAlloc = newsize; in udf_setsize() 1304 err = udf_extend_file(inode, newsize); in udf_setsize() 1308 truncate_setsize(inode, newsize); in udf_setsize() 1313 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/jfs/ |
| H A D | jfs_xtree.h | 108 extern s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int type);
|
| /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()
|
| /linux/fs/ntfs3/ |
| H A D | file.c | 727 loff_t newsize, oldsize; in ntfs_setattr() local 736 newsize = attr->ia_size; in ntfs_setattr() 738 if (newsize != oldsize) { in ntfs_setattr() 739 truncate_setsize(inode, newsize); in ntfs_setattr() 741 err = ntfs_set_size(inode, newsize); in ntfs_setattr()
|