/fs/nfsd/ |
D | nfsctl.c | 79 static ssize_t write_svc(struct file *file, char *buf, size_t size); 80 static ssize_t write_add(struct file *file, char *buf, size_t size); 81 static ssize_t write_del(struct file *file, char *buf, size_t size); 82 static ssize_t write_export(struct file *file, char *buf, size_t size); 83 static ssize_t write_unexport(struct file *file, char *buf, size_t size); 84 static ssize_t write_getfd(struct file *file, char *buf, size_t size); 85 static ssize_t write_getfs(struct file *file, char *buf, size_t size); 86 static ssize_t write_filehandle(struct file *file, char *buf, size_t size); 87 static ssize_t write_unlock_ip(struct file *file, char *buf, size_t size); 88 static ssize_t write_unlock_fs(struct file *file, char *buf, size_t size); [all …]
|
/fs/hfs/ |
D | trans.c | 39 int srclen, dstlen, size; in hfs_mac2asc() local 50 size = nls_disk->char2uni(src, srclen, &ch); in hfs_mac2asc() 51 if (size <= 0) { in hfs_mac2asc() 53 size = 1; in hfs_mac2asc() 55 src += size; in hfs_mac2asc() 56 srclen -= size; in hfs_mac2asc() 63 size = nls_io->uni2char(ch, dst, dstlen); in hfs_mac2asc() 64 if (size < 0) { in hfs_mac2asc() 65 if (size == -ENAMETOOLONG) in hfs_mac2asc() 68 size = 1; in hfs_mac2asc() [all …]
|
D | mdb.c | 32 sector_t *start, sector_t *size) in hfs_get_last_session() argument 40 *size = sb->s_bdev->bd_inode->i_size >> 9; in hfs_get_last_session() 72 int off2, len, size, sect; in hfs_mdb_get() local 78 size = sb_min_blocksize(sb, HFS_SECTOR_SIZE); in hfs_mdb_get() 79 if (!size) in hfs_mdb_get() 101 HFS_SB(sb)->alloc_blksz = size = be32_to_cpu(mdb->drAlBlkSiz); in hfs_mdb_get() 102 if (!size || (size & (HFS_SECTOR_SIZE - 1))) { in hfs_mdb_get() 103 printk(KERN_ERR "hfs: bad allocation block size %d\n", size); in hfs_mdb_get() 107 size = min(HFS_SB(sb)->alloc_blksz, (u32)PAGE_SIZE); in hfs_mdb_get() 109 while (size & (size - 1)) in hfs_mdb_get() [all …]
|
D | attr.c | 17 const void *value, size_t size, int flags) in hfs_setxattr() argument 40 if (size == 4) in hfs_setxattr() 45 if (size == 4) in hfs_setxattr() 60 void *value, size_t size) in hfs_getxattr() argument 71 if (size) { in hfs_getxattr() 85 if (size >= 4) { in hfs_getxattr() 89 res = size ? -ERANGE : 4; in hfs_getxattr() 91 if (size >= 4) { in hfs_getxattr() 95 res = size ? -ERANGE : 4; in hfs_getxattr() 99 if (size) in hfs_getxattr() [all …]
|
/fs/ |
D | xattr.c | 71 size_t size, int flags) in vfs_setxattr() argument 81 error = security_inode_setxattr(dentry, name, value, size, flags); in vfs_setxattr() 86 error = inode->i_op->setxattr(dentry, name, value, size, flags); in vfs_setxattr() 90 size, flags); in vfs_setxattr() 96 size, flags); in vfs_setxattr() 108 size_t size) in xattr_getsecurity() argument 113 if (!value || !size) { in xattr_getsecurity() 121 if (size < len) { in xattr_getsecurity() 134 vfs_getxattr(struct dentry *dentry, const char *name, void *value, size_t size) in vfs_getxattr() argument 150 int ret = xattr_getsecurity(inode, suffix, value, size); in vfs_getxattr() [all …]
|
D | seq_file.c | 79 m->buf = kmalloc(m->size = PAGE_SIZE, GFP_KERNEL); in traverse() 95 if (m->count == m->size) in traverse() 119 m->buf = kmalloc(m->size <<= 1, GFP_KERNEL); in traverse() 132 ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) in seq_read() argument 172 m->buf = kmalloc(m->size = PAGE_SIZE, GFP_KERNEL); in seq_read() 178 n = min(m->count, size); in seq_read() 184 size -= n; in seq_read() 189 if (!size) in seq_read() 209 if (m->count < m->size) in seq_read() 213 m->buf = kmalloc(m->size <<= 1, GFP_KERNEL); in seq_read() [all …]
|
/fs/xfs/linux-2.6/ |
D | xfs_xattr.c | 52 void *buffer, size_t size) in xfs_xattr_system_get() argument 60 return xfs_acl_vget(inode, buffer, size, acl); in xfs_xattr_system_get() 65 const void *value, size_t size, int flags) in xfs_xattr_system_set() argument 78 return xfs_acl_vset(inode, (void *)value, size, acl); in xfs_xattr_system_set() 95 void *value, size_t size, int xflags) in __xfs_xattr_get() argument 98 int error, asize = size; in __xfs_xattr_get() 104 if (!size) { in __xfs_xattr_get() 117 size_t size, int flags, int xflags) in __xfs_xattr_set() argument 132 return -xfs_attr_set(ip, name, (void *)value, size, xflags); in __xfs_xattr_set() 137 void *value, size_t size) in xfs_xattr_user_get() argument [all …]
|
D | kmem.c | 31 kmem_alloc(size_t size, unsigned int __nocast flags) in kmem_alloc() argument 38 if (unlikely(!(flags & KM_LARGE) && (size > PAGE_SIZE))) { in kmem_alloc() 40 __func__, (long)size); in kmem_alloc() 46 if (size < MAX_SLAB_SIZE || retries > MAX_VMALLOCS) in kmem_alloc() 47 ptr = kmalloc(size, lflags); in kmem_alloc() 49 ptr = __vmalloc(size, lflags, PAGE_KERNEL); in kmem_alloc() 61 kmem_zalloc(size_t size, unsigned int __nocast flags) in kmem_zalloc() argument 65 ptr = kmem_alloc(size, flags); in kmem_zalloc() 67 memset((char *)ptr, 0, (int)size); in kmem_zalloc() 72 kmem_zalloc_greedy(size_t *size, size_t minsize, size_t maxsize, in kmem_zalloc_greedy() argument [all …]
|
/fs/xfs/ |
D | xfs_bit.c | 34 xfs_bitmap_empty(uint *map, uint size) in xfs_bitmap_empty() argument 39 for (i = 0; i < size; i++) { in xfs_bitmap_empty() 51 xfs_contig_bits(uint *map, uint size, uint start_bit) in xfs_contig_bits() argument 57 size <<= BIT_TO_WORD_SHIFT; in xfs_contig_bits() 59 ASSERT(start_bit < size); in xfs_contig_bits() 60 size -= start_bit & ~(NBWORD - 1); in xfs_contig_bits() 69 size -= NBWORD; in xfs_contig_bits() 71 while (size) { in xfs_contig_bits() 75 size -= NBWORD; in xfs_contig_bits() 90 int xfs_next_bit(uint *map, uint size, uint start_bit) in xfs_next_bit() argument [all …]
|
/fs/jffs2/ |
D | nodelist.c | 58 uint32_t jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint32_t size) in jffs2_truncate_fragtree() argument 60 struct jffs2_node_frag *frag = jffs2_lookup_node_frag(list, size); in jffs2_truncate_fragtree() 62 dbg_fragtree("truncating fragtree to 0x%08x bytes\n", size); in jffs2_truncate_fragtree() 65 if (frag && frag->ofs != size) { in jffs2_truncate_fragtree() 66 if (frag->ofs+frag->size > size) { in jffs2_truncate_fragtree() 67 frag->size = size - frag->ofs; in jffs2_truncate_fragtree() 71 while (frag && frag->ofs >= size) { in jffs2_truncate_fragtree() 79 if (size == 0) in jffs2_truncate_fragtree() 87 if (frag->ofs + frag->size < size) in jffs2_truncate_fragtree() 88 return frag->ofs + frag->size; in jffs2_truncate_fragtree() [all …]
|
D | acl.c | 36 static int jffs2_acl_count(size_t size) in jffs2_acl_count() argument 40 size -= sizeof(struct jffs2_acl_header); in jffs2_acl_count() 41 s = size - 4 * sizeof(struct jffs2_acl_entry_short); in jffs2_acl_count() 43 if (size % sizeof(struct jffs2_acl_entry_short)) in jffs2_acl_count() 45 return size / sizeof(struct jffs2_acl_entry_short); in jffs2_acl_count() 53 static struct posix_acl *jffs2_acl_from_medium(void *value, size_t size) in jffs2_acl_from_medium() argument 55 void *end = value + size; in jffs2_acl_from_medium() 64 if (size < sizeof(struct jffs2_acl_header)) in jffs2_acl_from_medium() 73 count = jffs2_acl_count(size); in jffs2_acl_from_medium() 118 static void *jffs2_acl_to_medium(const struct posix_acl *acl, size_t *size) in jffs2_acl_to_medium() argument [all …]
|
/fs/btrfs/ |
D | acl.c | 45 int size; in btrfs_get_acl() local 72 size = __btrfs_getxattr(inode, name, "", 0); in btrfs_get_acl() 73 if (size > 0) { in btrfs_get_acl() 74 value = kzalloc(size, GFP_NOFS); in btrfs_get_acl() 77 size = __btrfs_getxattr(inode, name, value, size); in btrfs_get_acl() 78 if (size > 0) { in btrfs_get_acl() 79 acl = posix_acl_from_xattr(value, size); in btrfs_get_acl() 83 } else if (size == -ENOENT) { in btrfs_get_acl() 92 void *value, size_t size) in btrfs_xattr_get_acl() argument 103 ret = posix_acl_to_xattr(acl, value, size); in btrfs_xattr_get_acl() [all …]
|
/fs/ocfs2/ |
D | ocfs2_fs.h | 885 #define OCFS2_XATTR_SIZE(size) (((size) + OCFS2_XATTR_ROUND) & \ argument 1089 int size; in ocfs2_extent_recs_per_inode() local 1091 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode() 1094 return size / sizeof(struct ocfs2_extent_rec); in ocfs2_extent_recs_per_inode() 1101 int size; in ocfs2_extent_recs_per_inode_with_xattr() local 1105 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode_with_xattr() 1109 size = sb->s_blocksize - in ocfs2_extent_recs_per_inode_with_xattr() 1112 return size / sizeof(struct ocfs2_extent_rec); in ocfs2_extent_recs_per_inode_with_xattr() 1117 int size; in ocfs2_chain_recs_per_inode() local 1119 size = sb->s_blocksize - in ocfs2_chain_recs_per_inode() [all …]
|
D | acl.c | 41 static struct posix_acl *ocfs2_acl_from_xattr(const void *value, size_t size) in ocfs2_acl_from_xattr() argument 48 if (size < sizeof(struct posix_acl_entry)) in ocfs2_acl_from_xattr() 51 count = size / sizeof(struct posix_acl_entry); in ocfs2_acl_from_xattr() 76 static void *ocfs2_acl_to_xattr(const struct posix_acl *acl, size_t *size) in ocfs2_acl_to_xattr() argument 82 *size = acl->a_count * sizeof(struct posix_acl_entry); in ocfs2_acl_to_xattr() 84 ocfs2_acl = kmalloc(*size, GFP_NOFS); in ocfs2_acl_to_xattr() 185 size_t size = 0; in ocfs2_set_acl() local 216 value = ocfs2_acl_to_xattr(acl, &size); in ocfs2_set_acl() 223 "", value, size, 0, in ocfs2_set_acl() 226 ret = ocfs2_xattr_set(inode, name_index, "", value, size, 0); in ocfs2_set_acl() [all …]
|
/fs/hpfs/ |
D | ea.c | 50 static char *get_indirect_ea(struct super_block *s, int ano, secno a, int size) in get_indirect_ea() argument 53 if (!(ret = kmalloc(size + 1, GFP_NOFS))) { in get_indirect_ea() 57 if (hpfs_ea_read(s, a, ano, 0, size, ret)) { in get_indirect_ea() 61 ret[size] = 0; in get_indirect_ea() 66 int size) in set_indirect_ea() argument 68 hpfs_ea_write(s, a, ano, 0, size, data); in set_indirect_ea() 74 char *buf, int size) in hpfs_read_ea() argument 85 if (ea->valuelen >= size) in hpfs_read_ea() 109 if (ea->valuelen >= size) in hpfs_read_ea() 120 if (ea_len(ea) >= size) in hpfs_read_ea() [all …]
|
/fs/ecryptfs/ |
D | read_write.c | 40 loff_t offset, size_t size) in ecryptfs_write_lower() argument 53 octets_written = vfs_write(inode_info->lower_file, data, size, in ecryptfs_write_lower() 58 "expected [%td]\n", __func__, octets_written, size); in ecryptfs_write_lower() 84 size_t offset_in_page, size_t size) in ecryptfs_write_lower_page_segment() argument 93 rc = ecryptfs_write_lower(ecryptfs_inode, virt, offset, size); in ecryptfs_write_lower_page_segment() 117 size_t size) in ecryptfs_write() argument 135 while (pos < (offset + size)) { in ecryptfs_write() 139 size_t total_remaining_bytes = ((offset + size) - pos); in ecryptfs_write() 196 if ((offset + size) > ecryptfs_file_size) { in ecryptfs_write() 197 i_size_write(ecryptfs_file->f_dentry->d_inode, (offset + size)); in ecryptfs_write() [all …]
|
/fs/ext2/ |
D | acl.c | 20 ext2_acl_from_disk(const void *value, size_t size) in ext2_acl_from_disk() argument 22 const char *end = (char *)value + size; in ext2_acl_from_disk() 28 if (size < sizeof(ext2_acl_header)) in ext2_acl_from_disk() 34 count = ext2_acl_count(size); in ext2_acl_from_disk() 85 ext2_acl_to_disk(const struct posix_acl *acl, size_t *size) in ext2_acl_to_disk() argument 91 *size = ext2_acl_size(acl->a_count); in ext2_acl_to_disk() 223 size_t size = 0; in ext2_set_acl() local 258 value = ext2_acl_to_disk(acl, &size); in ext2_set_acl() 263 error = ext2_xattr_set(inode, name_index, "", value, size, 0); in ext2_set_acl() 398 const size_t size = sizeof(POSIX_ACL_XATTR_ACCESS); in ext2_xattr_list_acl_access() local [all …]
|
/fs/ntfs/ |
D | malloc.h | 42 static inline void *__ntfs_malloc(unsigned long size, gfp_t gfp_mask) in __ntfs_malloc() argument 44 if (likely(size <= PAGE_SIZE)) { in __ntfs_malloc() 45 BUG_ON(!size); in __ntfs_malloc() 50 if (likely(size >> PAGE_SHIFT < num_physpages)) in __ntfs_malloc() 51 return __vmalloc(size, gfp_mask, PAGE_KERNEL); in __ntfs_malloc() 64 static inline void *ntfs_malloc_nofs(unsigned long size) in ntfs_malloc_nofs() argument 66 return __ntfs_malloc(size, GFP_NOFS | __GFP_HIGHMEM); in ntfs_malloc_nofs() 81 static inline void *ntfs_malloc_nofs_nofail(unsigned long size) in ntfs_malloc_nofs_nofail() argument 83 return __ntfs_malloc(size, GFP_NOFS | __GFP_HIGHMEM | __GFP_NOFAIL); in ntfs_malloc_nofs_nofail()
|
/fs/ext4/ |
D | acl.c | 21 ext4_acl_from_disk(const void *value, size_t size) in ext4_acl_from_disk() argument 23 const char *end = (char *)value + size; in ext4_acl_from_disk() 29 if (size < sizeof(ext4_acl_header)) in ext4_acl_from_disk() 35 count = ext4_acl_count(size); in ext4_acl_from_disk() 87 ext4_acl_to_disk(const struct posix_acl *acl, size_t *size) in ext4_acl_to_disk() argument 93 *size = ext4_acl_size(acl->a_count); in ext4_acl_to_disk() 229 size_t size = 0; in ext4_set_acl() local 262 value = ext4_acl_to_disk(acl, &size); in ext4_set_acl() 268 value, size, 0); in ext4_set_acl() 422 const size_t size = sizeof(POSIX_ACL_XATTR_ACCESS); in ext4_xattr_list_acl_access() local [all …]
|
/fs/reiserfs/ |
D | xattr_acl.c | 17 xattr_set_acl(struct inode *inode, int type, const void *value, size_t size) in xattr_set_acl() argument 28 acl = posix_acl_from_xattr(value, size); in xattr_set_acl() 47 xattr_get_acl(struct inode *inode, int type, void *buffer, size_t size) in xattr_get_acl() argument 60 error = posix_acl_to_xattr(acl, buffer, size); in xattr_get_acl() 69 static struct posix_acl *posix_acl_from_disk(const void *value, size_t size) in posix_acl_from_disk() argument 71 const char *end = (char *)value + size; in posix_acl_from_disk() 77 if (size < sizeof(reiserfs_acl_header)) in posix_acl_from_disk() 83 count = reiserfs_acl_count(size); in posix_acl_from_disk() 131 static void *posix_acl_to_disk(const struct posix_acl *acl, size_t * size) in posix_acl_to_disk() argument 137 *size = reiserfs_acl_size(acl->a_count); in posix_acl_to_disk() [all …]
|
/fs/ext3/ |
D | acl.c | 21 ext3_acl_from_disk(const void *value, size_t size) in ext3_acl_from_disk() argument 23 const char *end = (char *)value + size; in ext3_acl_from_disk() 29 if (size < sizeof(ext3_acl_header)) in ext3_acl_from_disk() 35 count = ext3_acl_count(size); in ext3_acl_from_disk() 86 ext3_acl_to_disk(const struct posix_acl *acl, size_t *size) in ext3_acl_to_disk() argument 92 *size = ext3_acl_size(acl->a_count); in ext3_acl_to_disk() 229 size_t size = 0; in ext3_set_acl() local 262 value = ext3_acl_to_disk(acl, &size); in ext3_set_acl() 268 value, size, 0); in ext3_set_acl() 422 const size_t size = sizeof(POSIX_ACL_XATTR_ACCESS); in ext3_xattr_list_acl_access() local [all …]
|
/fs/partitions/ |
D | acorn.c | 88 unsigned long size = nr_sects > 2 ? 2 : nr_sects; in riscix_partition() local 93 put_partition(state, slot++, first_sect, size); in riscix_partition() 132 unsigned long size = nr_sects > 2 ? 2 : nr_sects; in linux_partition() local 136 put_partition(state, slot++, first_sect, size); in linux_partition() 308 __le32 size; member 374 for (slot = 1, p = (const struct ics_part *)data; p->size; p++) { in adfspart_check_ICS() 376 s32 size = le32_to_cpu(p->size); /* yes, it's signed. */ in adfspart_check_ICS() local 386 if (size < 0) { in adfspart_check_ICS() 387 size = -size; in adfspart_check_ICS() 395 if (size > 1 && adfspart_check_ICSLinux(bdev, start)) { in adfspart_check_ICS() [all …]
|
/fs/qnx4/ |
D | bitmap.c | 32 static void count_bits(register const char *bmPart, register int size, in count_bits() argument 38 if (size > QNX4_BLOCK_SIZE) { in count_bits() 39 size = QNX4_BLOCK_SIZE; in count_bits() 59 size--; in count_bits() 60 } while (size != 0); in count_bits() 70 int size = le32_to_cpu(qnx4_sb(sb)->BitMap->di_size); in qnx4_count_free_blocks() local 73 while (total < size) { in qnx4_count_free_blocks() 78 count_bits(bh->b_data, size - total, &total_free); in qnx4_count_free_blocks() 92 int size = le32_to_cpu(qnx4_sb(sb)->BitMap->di_size); in qnx4_is_free() local 100 (void) size; /* CHECKME */ in qnx4_is_free() [all …]
|
/fs/squashfs/ |
D | dir.c | 86 &index_offset, le32_to_cpu(dir_index.size) + 1); in get_dir_index_using_offset() 109 int offset = squashfs_i(inode)->offset, length = 0, dir_count, size, in squashfs_readdir() local 137 size = 1; in squashfs_readdir() 141 size = 2; in squashfs_readdir() 146 dirent, name, size, file->f_pos, i_ino, in squashfs_readdir() 149 if (filldir(dirent, name, size, file->f_pos, i_ino, in squashfs_readdir() 155 file->f_pos += size; in squashfs_readdir() 185 size = le16_to_cpu(dire->size) + 1; in squashfs_readdir() 188 &block, &offset, size); in squashfs_readdir() 192 length += sizeof(*dire) + size; in squashfs_readdir() [all …]
|
/fs/ubifs/ |
D | xattr.c | 100 const struct qstr *nm, const void *value, int size) in create_xattr() argument 106 .new_ino_d = ALIGN(size, 8), .dirtied_ino = 1, in create_xattr() 140 ui->data = kmalloc(size, GFP_NOFS); in create_xattr() 145 memcpy(ui->data, value, size); in create_xattr() 146 inode->i_size = ui->ui_size = size; in create_xattr() 147 ui->data_len = size; in create_xattr() 153 host_ui->xattr_size += CALC_XATTR_BYTES(size); in create_xattr() 169 host_ui->xattr_size -= CALC_XATTR_BYTES(size); in create_xattr() 192 struct inode *inode, const void *value, int size) in change_xattr() argument 198 .dirtied_ino_d = ALIGN(size, 8) + ALIGN(host_ui->data_len, 8) }; in change_xattr() [all …]
|