/openbmc/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 …]
|
/openbmc/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()
|
/openbmc/linux/drivers/hid/ |
H A D | hid-kye.c | 405 unsigned int newsize; in kye_tablet_fixup() local 423 newsize = info->has_punk ? sizeof(kye_tablet_rdesc) : 112; in kye_tablet_fixup() 424 memcpy(rdesc, kye_tablet_rdesc, newsize); in kye_tablet_fixup() 444 if (newsize + info->control_rsize > *rsize) in kye_tablet_fixup() 447 memcpy(rdesc + newsize, info->control_rdesc, info->control_rsize); in kye_tablet_fixup() 448 newsize += info->control_rsize; in kye_tablet_fixup() 452 *rsize = newsize; in kye_tablet_fixup()
|
/openbmc/u-boot/common/ |
H A D | dlmalloc.c | 1658 INTERNAL_SIZE_T newsize; /* its size */ local 1693 newsize = oldsize = chunksize(oldp); 1732 if ((long)(nextsize + newsize) >= (long)(nb + MINSIZE)) 1734 newsize += nextsize; 1736 set_head(top, (newsize - nb) | PREV_INUSE); 1743 else if (((long)(nextsize + newsize) >= (long)(nb))) 1746 newsize += nextsize; 1770 if ((long)(nextsize + prevsize + newsize) >= (long)(nb + MINSIZE)) 1774 newsize += prevsize + nextsize; 1778 set_head(top, (newsize - nb) | PREV_INUSE); [all …]
|
/openbmc/linux/fs/xfs/ |
H A D | xfs_iops.c | 794 xfs_off_t oldsize, newsize; in xfs_setattr_size() local 807 newsize = iattr->ia_size; in xfs_setattr_size() 812 if (newsize == 0 && oldsize == 0 && ip->i_df.if_nextents == 0) { in xfs_setattr_size() 845 if (newsize > oldsize) { in xfs_setattr_size() 846 trace_xfs_zero_eof(ip, oldsize, newsize - oldsize); in xfs_setattr_size() 847 error = xfs_zero_range(ip, oldsize, newsize - oldsize, in xfs_setattr_size() 856 error = filemap_write_and_wait_range(inode->i_mapping, newsize, in xfs_setattr_size() 857 newsize); in xfs_setattr_size() 860 error = xfs_truncate_page(ip, newsize, &did_zeroing); in xfs_setattr_size() 887 truncate_setsize(inode, newsize); in xfs_setattr_size() [all …]
|
/openbmc/qemu/hw/ppc/ |
H A D | spapr_vhyp_mmu.c | 434 void *new_hpt, uint64_t newsize, in rehash_hpte() argument 438 uint64_t new_hash_mask = (newsize >> 7) - 1; in rehash_hpte() 495 assert((oldsize != newsize) || (pteg == new_pteg)); in rehash_hpte() 504 assert(newsize < oldsize); in rehash_hpte() 522 void *new_hpt, uint64_t newsize) in rehash_hpt() argument 539 rc = rehash_hpte(cpu, hptes, old_hpt, oldsize, new_hpt, newsize, in rehash_hpt() 559 size_t newsize; in vhyp_mmu_resize_hpt_commit() local 578 newsize = 1ULL << pending->shift; in vhyp_mmu_resize_hpt_commit() 580 pending->hpt, newsize); in vhyp_mmu_resize_hpt_commit()
|
/openbmc/linux/mm/ |
H A D | readahead.c | 345 unsigned long newsize = roundup_pow_of_two(size); in get_init_ra_size() local 347 if (newsize <= max / 32) in get_init_ra_size() 348 newsize = newsize * 4; in get_init_ra_size() 349 else if (newsize <= max / 4) in get_init_ra_size() 350 newsize = newsize * 2; in get_init_ra_size() 352 newsize = max; in get_init_ra_size() 354 return newsize; in get_init_ra_size()
|
H A D | truncate.c | 726 void truncate_pagecache(struct inode *inode, loff_t newsize) in truncate_pagecache() argument 729 loff_t holebegin = round_up(newsize, PAGE_SIZE); in truncate_pagecache() 741 truncate_inode_pages(mapping, newsize); in truncate_pagecache() 759 void truncate_setsize(struct inode *inode, loff_t newsize) in truncate_setsize() argument 763 i_size_write(inode, newsize); in truncate_setsize() 764 if (newsize > oldsize) in truncate_setsize() 765 pagecache_isize_extended(inode, oldsize, newsize); in truncate_setsize() 766 truncate_pagecache(inode, newsize); in truncate_setsize()
|
/openbmc/linux/scripts/dtc/ |
H A D | data.c | 27 unsigned int newsize; in data_grow_for() local 34 newsize = xlen; in data_grow_for() 36 while ((d.len + xlen) > newsize) in data_grow_for() 37 newsize *= 2; in data_grow_for() 39 nd.val = xrealloc(d.val, newsize); in data_grow_for()
|
/openbmc/u-boot/scripts/dtc/ |
H A D | data.c | 42 int newsize; in data_grow_for() local 49 newsize = xlen; in data_grow_for() 51 while ((d.len + xlen) > newsize) in data_grow_for() 52 newsize *= 2; in data_grow_for() 54 nd.val = xrealloc(d.val, newsize); in data_grow_for()
|
/openbmc/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);
|
/openbmc/linux/fs/xfs/libxfs/ |
H A D | xfs_dir2_sf.c | 946 int newsize; /* new inode size */ in xfs_dir2_sf_removename() local 983 newsize = oldsize - entsize; in xfs_dir2_sf_removename() 994 dp->i_disk_size = newsize; in xfs_dir2_sf_removename() 998 xfs_idata_realloc(dp, newsize - oldsize, XFS_DATA_FORK); in xfs_dir2_sf_removename() 1022 int newsize; in xfs_dir2_sf_replace_needblock() local 1029 newsize = dp->i_df.if_bytes + (sfp->count + 1) * XFS_INO64_DIFF; in xfs_dir2_sf_replace_needblock() 1032 sfp->i8count == 0 && newsize > xfs_inode_data_fork_size(dp); in xfs_dir2_sf_replace_needblock() 1162 int newsize; /* new inode size */ in xfs_dir2_sf_toino4() local 1184 newsize = oldsize - (oldsfp->count + 1) * XFS_INO64_DIFF; in xfs_dir2_sf_toino4() 1186 xfs_idata_realloc(dp, newsize, XFS_DATA_FORK); in xfs_dir2_sf_toino4() [all …]
|
/openbmc/u-boot/scripts/dtc/libfdt/ |
H A D | fdt_rw.c | 433 int newsize; in fdt_open_into() local 465 newsize = FDT_ALIGN(sizeof(struct fdt_header), 8) + mem_rsv_size in fdt_open_into() 468 if (bufsize < newsize) in fdt_open_into() 474 if (((tmp + newsize) > fdtstart) && (tmp < fdtend)) { in fdt_open_into() 477 if ((tmp + newsize) > ((char *)buf + bufsize)) in fdt_open_into() 482 memmove(buf, tmp, newsize); in fdt_open_into()
|
/openbmc/linux/scripts/dtc/libfdt/ |
H A D | fdt_rw.c | 423 int newsize; in fdt_open_into() local 458 newsize = FDT_ALIGN(sizeof(struct fdt_header), 8) + mem_rsv_size in fdt_open_into() 461 if (bufsize < newsize) in fdt_open_into() 467 if (((tmp + newsize) > fdtstart) && (tmp < fdtend)) { in fdt_open_into() 470 if ((tmp + newsize) > ((char *)buf + bufsize)) in fdt_open_into() 476 memmove(buf, tmp, newsize); in fdt_open_into()
|
/openbmc/linux/fs/ceph/ |
H A D | quota.c | 436 bool ceph_quota_is_max_bytes_exceeded(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_exceeded() argument 444 if (newsize <= size) in ceph_quota_is_max_bytes_exceeded() 447 return check_quota_exceeded(inode, QUOTA_CHECK_MAX_BYTES_OP, (newsize - size)); in ceph_quota_is_max_bytes_exceeded() 458 bool ceph_quota_is_max_bytes_approaching(struct inode *inode, loff_t newsize) in ceph_quota_is_max_bytes_approaching() argument 466 if (newsize <= size) in ceph_quota_is_max_bytes_approaching() 470 (newsize - size)); in ceph_quota_is_max_bytes_approaching()
|
/openbmc/linux/fs/jfs/ |
H A D | inode.c | 367 loff_t newsize; in jfs_truncate_nolock() local 388 newsize = xtTruncate(tid, ip, length, in jfs_truncate_nolock() 390 if (newsize < 0) { in jfs_truncate_nolock() 402 } while (newsize > length); /* Truncate isn't always atomic */ in jfs_truncate_nolock()
|
/openbmc/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()
|
/openbmc/linux/fs/gfs2/ |
H A D | bmap.c | 1316 static int gfs2_journaled_truncate(struct inode *inode, u64 oldsize, u64 newsize) in gfs2_journaled_truncate() argument 1323 while (oldsize != newsize) { in gfs2_journaled_truncate() 1327 chunk = oldsize - newsize; in gfs2_journaled_truncate() 1351 static int trunc_start(struct inode *inode, u64 newsize) in trunc_start() argument 1362 unsigned int offs = newsize & (blocksize - 1); in trunc_start() 1364 error = gfs2_block_zero_range(inode, newsize, in trunc_start() 1384 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + newsize); in trunc_start() 1388 i_size_write(inode, newsize); in trunc_start() 1393 error = gfs2_journaled_truncate(inode, oldsize, newsize); in trunc_start() 1395 truncate_pagecache(inode, newsize); in trunc_start() [all …]
|
/openbmc/linux/fs/f2fs/ |
H A D | xattr.c | 635 int found, newsize; in __f2fs_setxattr() local 712 newsize = XATTR_ALIGN(sizeof(struct f2fs_xattr_entry) + len + size); in __f2fs_setxattr() 725 if (unlikely(free < newsize)) { in __f2fs_setxattr() 760 new_hsize += newsize; in __f2fs_setxattr() 766 *(u32 *)((u8 *)last + newsize) = 0; in __f2fs_setxattr()
|
/openbmc/linux/fs/udf/ |
H A D | inode.c | 645 static int udf_extend_file(struct inode *inode, loff_t newsize) in udf_extend_file() argument 653 sector_t first_block = newsize >> sb->s_blocksize_bits, offset; in udf_extend_file() 700 (newsize & (sb->s_blocksize - 1)); in udf_extend_file() 1272 int udf_setsize(struct inode *inode, loff_t newsize) in udf_setsize() argument 1285 if (newsize > inode->i_size) { in udf_setsize() 1288 (udf_file_entry_alloc_offset(inode) + newsize)) { in udf_setsize() 1290 iinfo->i_lenAlloc = newsize; in udf_setsize() 1298 err = udf_extend_file(inode, newsize); in udf_setsize() 1302 truncate_setsize(inode, newsize); in udf_setsize() 1307 memset(iinfo->i_data + iinfo->i_lenEAttr + newsize, in udf_setsize() [all …]
|
/openbmc/linux/drivers/md/ |
H A D | md-cluster.h | 30 int (*resize_bitmaps)(struct mddev *mddev, sector_t newsize, sector_t oldsize);
|
/openbmc/linux/fs/affs/ |
H A D | file.c | 559 affs_extent_file_ofs(struct inode *inode, u32 newsize) in affs_extent_file_ofs() argument 567 pr_debug("%s(%lu, %d)\n", __func__, inode->i_ino, newsize); in affs_extent_file_ofs() 577 tmp = min(bsize - boff, newsize - size); in affs_extent_file_ofs() 591 while (size < newsize) { in affs_extent_file_ofs() 596 tmp = min(bsize, newsize - size); in affs_extent_file_ofs() 621 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs() 625 inode->i_size = AFFS_I(inode)->mmu_private = newsize; in affs_extent_file_ofs()
|
/openbmc/u-boot/net/ |
H A D | tftp.c | 146 ulong newsize = offset + len; in store_block() local 185 if (net_boot_file_size < newsize) in store_block() 186 net_boot_file_size = newsize; in store_block()
|
/openbmc/linux/fs/ntfs3/ |
H A D | file.c | 690 loff_t newsize, oldsize; in ntfs3_setattr() local 699 newsize = attr->ia_size; in ntfs3_setattr() 701 if (newsize <= oldsize) in ntfs3_setattr() 702 err = ntfs_truncate(inode, newsize); in ntfs3_setattr() 704 err = ntfs_extend(inode, newsize, 0, NULL); in ntfs3_setattr() 710 i_size_write(inode, newsize); in ntfs3_setattr()
|
/openbmc/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()
|