/fs/romfs/ |
D | storage.c | 27 static int romfs_mtd_read(struct super_block *sb, unsigned long pos, in romfs_mtd_read() argument 33 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf); in romfs_mtd_read() 41 unsigned long pos, size_t maxlen) in romfs_mtd_strnlen() argument 52 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strnlen() 59 pos += len; in romfs_mtd_strnlen() 70 static int romfs_mtd_strcmp(struct super_block *sb, unsigned long pos, in romfs_mtd_strcmp() argument 83 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strcmp() 91 pos += len; in romfs_mtd_strcmp() 107 static int romfs_blk_read(struct super_block *sb, unsigned long pos, in romfs_blk_read() argument 116 offset = pos & (ROMBSIZE - 1); in romfs_blk_read() [all …]
|
/fs/ |
D | read_write.c | 302 loff_t pos; in rw_verify_area() local 308 pos = *ppos; in rw_verify_area() 309 if (unlikely(pos < 0)) { in rw_verify_area() 312 if (count >= -pos) /* both values are in 0..LLONG_MAX */ in rw_verify_area() 314 } else if (unlikely((loff_t) (pos + count) < 0)) { in rw_verify_area() 322 inode, file, pos, count); in rw_verify_area() 353 ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) in vfs_read() argument 364 ret = rw_verify_area(READ, file, pos, count); in vfs_read() 368 ret = file->f_op->read(file, buf, count, pos); in vfs_read() 370 ret = do_sync_read(file, buf, count, pos); in vfs_read() [all …]
|
D | seq_file.c | 99 loff_t pos = 0, index; in traverse() local 129 if (pos + m->count > offset) { in traverse() 130 m->from = offset - pos; in traverse() 135 pos += m->count; in traverse() 137 if (pos == offset) { in traverse() 168 loff_t pos; in seq_read() local 227 pos = m->index; in seq_read() 228 p = m->op->start(m, &pos); in seq_read() 239 p = m->op->next(m, p, &pos); in seq_read() 240 m->index = pos; in seq_read() [all …]
|
D | libfs.c | 394 loff_t pos, unsigned len, unsigned flags, in simple_write_begin() argument 400 index = pos >> PAGE_CACHE_SHIFT; in simple_write_begin() 409 unsigned from = pos & (PAGE_CACHE_SIZE - 1); in simple_write_begin() 438 loff_t pos, unsigned len, unsigned copied, in simple_write_end() argument 442 loff_t last_pos = pos + copied; in simple_write_end() 446 unsigned from = pos & (PAGE_CACHE_SIZE - 1); in simple_write_end() 585 loff_t pos = *ppos; in simple_read_from_buffer() local 588 if (pos < 0) in simple_read_from_buffer() 590 if (pos >= available || !count) in simple_read_from_buffer() 592 if (count > available - pos) in simple_read_from_buffer() [all …]
|
/fs/ncpfs/ |
D | file.c | 104 off_t pos; in ncp_file_read() local 113 pos = *ppos; in ncp_file_read() 120 if (pos > inode->i_sb->s_maxbytes) in ncp_file_read() 122 if (pos + count > inode->i_sb->s_maxbytes) { in ncp_file_read() 123 count = inode->i_sb->s_maxbytes - pos; in ncp_file_read() 144 bufsize - (pos % bufsize), in ncp_file_read() 149 pos, to_read, buf, &read_this_time, in ncp_file_read() 155 pos += read_this_time; in ncp_file_read() 165 *ppos = pos; in ncp_file_read() 182 off_t pos; in ncp_file_write() local [all …]
|
D | ncpsign_kernel.c | 23 #define BVAL(buf,pos) (((const __u8 *)(buf))[pos]) argument 24 #define PVAL(buf,pos) ((unsigned)BVAL(buf,pos)) argument 25 #define BSET(buf,pos,val) (((__u8 *)(buf))[pos] = (val)) argument 28 WVAL_LH(const __u8 * buf, int pos) in WVAL_LH() argument 30 return PVAL(buf, pos) | PVAL(buf, pos + 1) << 8; in WVAL_LH() 33 DVAL_LH(const __u8 * buf, int pos) in DVAL_LH() argument 35 return WVAL_LH(buf, pos) | WVAL_LH(buf, pos + 2) << 16; in DVAL_LH() 38 WSET_LH(__u8 * buf, int pos, __u16 val) in WSET_LH() argument 40 BSET(buf, pos, val & 0xff); in WSET_LH() 41 BSET(buf, pos + 1, val >> 8); in WSET_LH() [all …]
|
/fs/hpfs/ |
D | ea.c | 16 unsigned pos = 0; in hpfs_ea_ext_remove() local 17 while (pos < len) { in hpfs_ea_ext_remove() 20 if (pos + 4 > len) { in hpfs_ea_ext_remove() 25 if (hpfs_ea_read(s, a, ano, pos, 4, ex)) return; in hpfs_ea_ext_remove() 29 ano ? "anode" : "sectors", a, pos); in hpfs_ea_ext_remove() 32 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 9, ex+4)) in hpfs_ea_ext_remove() 36 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_ea_ext_remove() 76 unsigned pos; in hpfs_read_ea() local 95 pos = 0; in hpfs_read_ea() 96 while (pos < len) { in hpfs_read_ea() [all …]
|
/fs/jffs2/ |
D | compr_rtime.c | 38 int pos=0; in jffs2_rtime_compress() local 42 while (pos < (*sourcelen) && outpos <= (*dstlen)-2) { in jffs2_rtime_compress() 46 value = data_in[pos]; in jffs2_rtime_compress() 48 cpage_out[outpos++] = data_in[pos++]; in jffs2_rtime_compress() 51 positions[value]=pos; in jffs2_rtime_compress() 53 while ((backpos < pos) && (pos < (*sourcelen)) && in jffs2_rtime_compress() 54 (data_in[pos]==data_in[backpos++]) && (runlen<255)) { in jffs2_rtime_compress() 55 pos++; in jffs2_rtime_compress() 61 if (outpos >= pos) { in jffs2_rtime_compress() 67 *sourcelen = pos; in jffs2_rtime_compress() [all …]
|
/fs/sysfs/ |
D | dir.c | 98 struct sysfs_dirent *pos; in sysfs_link_sibling() local 101 pos = to_sysfs_dirent(*node); in sysfs_link_sibling() 103 result = sysfs_sd_compare(sd, pos); in sysfs_link_sibling() 105 node = &pos->s_rb.rb_left; in sysfs_link_sibling() 107 node = &pos->s_rb.rb_right; in sysfs_link_sibling() 832 struct rb_node *pos; in __sysfs_remove_dir() local 839 pos = rb_first(&dir_sd->s_dir.children); in __sysfs_remove_dir() 840 while (pos) { in __sysfs_remove_dir() 841 struct sysfs_dirent *sd = to_sysfs_dirent(pos); in __sysfs_remove_dir() 842 pos = rb_next(pos); in __sysfs_remove_dir() [all …]
|
/fs/logfs/ |
D | dir.c | 67 loff_t pos) in write_dir() argument 69 return logfs_inode_write(dir, dd, sizeof(*dd), pos, WF_LOCK, NULL); in write_dir() 77 static s64 dir_seek_data(struct inode *inode, s64 pos) in dir_seek_data() argument 79 s64 new_pos = logfs_seek_data(inode, pos); in dir_seek_data() 81 return max(pos, new_pos - 1); in dir_seek_data() 86 loff_t pos = bix << inode->i_sb->s_blocksize_bits; in beyond_eof() local 87 return pos >= i_size_read(inode); in beyond_eof() 288 loff_t pos = file->f_pos - IMPLICIT_NODES; in __logfs_readdir() local 293 BUG_ON(pos < 0); in __logfs_readdir() 294 for (;; pos++) { in __logfs_readdir() [all …]
|
/fs/ext4/ |
D | dir.c | 145 offset = ctx->pos & (sb->s_blocksize - 1); in ext4_readdir() 147 while (ctx->pos < inode->i_size) { in ext4_readdir() 150 map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb); in ext4_readdir() 172 (unsigned long long) ctx->pos); in ext4_readdir() 176 if (ctx->pos > inode->i_blocks << 9) in ext4_readdir() 178 ctx->pos += sb->s_blocksize - offset; in ext4_readdir() 188 (unsigned long long)ctx->pos); in ext4_readdir() 189 ctx->pos += sb->s_blocksize - offset; in ext4_readdir() 217 ctx->pos = (ctx->pos & ~(sb->s_blocksize - 1)) in ext4_readdir() 222 while (ctx->pos < inode->i_size in ext4_readdir() [all …]
|
D | file.c | 78 ext4_unaligned_aio(struct inode *inode, struct iov_iter *from, loff_t pos) 83 if (pos >= i_size_read(inode)) 86 if ((pos | iov_iter_alignment(from)) & blockmask) 103 loff_t pos = iocb->ki_pos; 113 ext4_unaligned_aio(inode, from, pos))) { 121 iocb->ki_pos = pos = i_size_read(inode); 130 if ((pos > sbi->s_bitmap_maxbytes) || 131 (pos == sbi->s_bitmap_maxbytes && length > 0)) { 137 if (pos + length > sbi->s_bitmap_maxbytes) 138 iov_iter_truncate(from, sbi->s_bitmap_maxbytes - pos); [all …]
|
/fs/ceph/ |
D | file.c | 316 u64 pos, this_len; in striped_read() local 327 pos = off; in striped_read() 336 page_align = (pos - io_align + buf_align) & ~PAGE_MASK; in striped_read() 338 page_align = pos & ~PAGE_MASK; in striped_read() 341 &ci->i_layout, pos, &this_len, in striped_read() 349 dout("striped_read %llu~%u (read %u) got %d%s%s\n", pos, left, read, in striped_read() 355 if (read < pos - off) { in striped_read() 356 dout(" zero gap %llu to %llu\n", off + read, pos); in striped_read() 358 pos - off - read, pages); in striped_read() 360 pos += ret; in striped_read() [all …]
|
/fs/ecryptfs/ |
D | read_write.c | 113 loff_t pos; in ecryptfs_write() local 122 pos = ecryptfs_file_size; in ecryptfs_write() 124 pos = offset; in ecryptfs_write() 125 while (pos < (offset + size)) { in ecryptfs_write() 126 pgoff_t ecryptfs_page_idx = (pos >> PAGE_CACHE_SHIFT); in ecryptfs_write() 127 size_t start_offset_in_page = (pos & ~PAGE_CACHE_MASK); in ecryptfs_write() 129 loff_t total_remaining_bytes = ((offset + size) - pos); in ecryptfs_write() 138 if (pos < offset) { in ecryptfs_write() 140 loff_t total_remaining_zeros = (offset - pos); in ecryptfs_write() 163 if (pos < offset || !start_offset_in_page) { in ecryptfs_write() [all …]
|
/fs/nfs/ |
D | nfs4client.c | 307 struct nfs_client *pos, *prev = NULL; in nfs40_walk_client_list() local 315 list_for_each_entry(pos, &nn->nfs_client_list, cl_share_link) { in nfs40_walk_client_list() 318 if (pos->cl_cons_state > NFS_CS_READY) { in nfs40_walk_client_list() 319 atomic_inc(&pos->cl_count); in nfs40_walk_client_list() 324 prev = pos; in nfs40_walk_client_list() 326 status = nfs_wait_client_init_complete(pos); in nfs40_walk_client_list() 331 if (pos->cl_cons_state != NFS_CS_READY) in nfs40_walk_client_list() 334 if (pos->rpc_ops != new->rpc_ops) in nfs40_walk_client_list() 337 if (pos->cl_proto != new->cl_proto) in nfs40_walk_client_list() 340 if (pos->cl_minorversion != new->cl_minorversion) in nfs40_walk_client_list() [all …]
|
D | direct.c | 124 ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned lon… in nfs_direct_IO() argument 129 (long long) pos, nr_segs); in nfs_direct_IO() 137 return nfs_file_direct_read(iocb, iov, nr_segs, pos, in nfs_direct_IO() 139 return nfs_file_direct_write(iocb, iov, nr_segs, pos, in nfs_direct_IO() 312 loff_t pos, bool uio) in nfs_direct_read_schedule_segment() argument 375 req->wb_index = pos >> PAGE_SHIFT; in nfs_direct_read_schedule_segment() 376 req->wb_offset = pos & ~PAGE_MASK; in nfs_direct_read_schedule_segment() 386 pos += req_len; in nfs_direct_read_schedule_segment() 404 loff_t pos, bool uio) in nfs_direct_read_schedule_iovec() argument 418 result = nfs_direct_read_schedule_segment(&desc, vec, pos, uio); in nfs_direct_read_schedule_iovec() [all …]
|
/fs/ntfs/ |
D | bitmap.c | 55 int pos, len; in __ntfs_bitmap_set_bits_in_run() local 85 pos = (start_bit >> 3) & ~PAGE_CACHE_MASK; in __ntfs_bitmap_set_bits_in_run() 92 u8 *byte = kaddr + pos; in __ntfs_bitmap_set_bits_in_run() 105 pos++; in __ntfs_bitmap_set_bits_in_run() 111 len = min_t(s64, cnt >> 3, PAGE_CACHE_SIZE - pos); in __ntfs_bitmap_set_bits_in_run() 112 memset(kaddr + pos, value ? 0xff : 0, len); in __ntfs_bitmap_set_bits_in_run() 117 len += pos; in __ntfs_bitmap_set_bits_in_run() 174 pos = __ntfs_bitmap_set_bits_in_run(vi, start_bit, count - cnt, in __ntfs_bitmap_set_bits_in_run() 177 pos = 0; in __ntfs_bitmap_set_bits_in_run() 178 if (!pos) { in __ntfs_bitmap_set_bits_in_run() [all …]
|
D | logfile.c | 52 RESTART_PAGE_HEADER *rp, s64 pos) in ntfs_check_restart_page_header() argument 77 if (pos && pos != logfile_system_page_size) { in ntfs_check_restart_page_header() 350 RESTART_PAGE_HEADER *rp, s64 pos, RESTART_PAGE_HEADER **wrp, in ntfs_check_and_load_restart_page() argument 359 if (!ntfs_check_restart_page_header(vi, rp, pos)) { in ntfs_check_and_load_restart_page() 384 size = PAGE_CACHE_SIZE - (pos & ~PAGE_CACHE_MASK); in ntfs_check_and_load_restart_page() 397 idx = (pos + size) >> PAGE_CACHE_SHIFT; in ntfs_check_and_load_restart_page() 398 BUG_ON((pos + size) & ~PAGE_CACHE_MASK); in ntfs_check_and_load_restart_page() 486 s64 size, pos; in ntfs_check_logfile() local 541 for (pos = 0; pos < size; pos <<= 1) { in ntfs_check_logfile() 542 pgoff_t idx = pos >> PAGE_CACHE_SHIFT; in ntfs_check_logfile() [all …]
|
D | file.c | 482 unsigned nr_pages, s64 pos, size_t bytes) in ntfs_prepare_pages_for_non_resident_write() argument 519 (long long)pos, bytes); in ntfs_prepare_pages_for_non_resident_write() 543 cpos = pos >> vol->cluster_size_bits; in ntfs_prepare_pages_for_non_resident_write() 544 end = pos + bytes; in ntfs_prepare_pages_for_non_resident_write() 586 if ((bh_pos < pos && bh_end > pos) || in ntfs_prepare_pages_for_non_resident_write() 642 if (bh_end <= pos || bh_pos >= end) in ntfs_prepare_pages_for_non_resident_write() 658 bh_end > pos && in ntfs_prepare_pages_for_non_resident_write() 659 (bh_pos < pos || in ntfs_prepare_pages_for_non_resident_write() 693 if (bh_end <= pos || bh_pos >= end) { in ntfs_prepare_pages_for_non_resident_write() 704 (bh_pos < pos || bh_end > end)) { in ntfs_prepare_pages_for_non_resident_write() [all …]
|
/fs/cifs/ |
D | cifs_dfs_ref.c | 69 char *pos; in cifs_build_devname() local 78 pos = nodename + unclen - 1; in cifs_build_devname() 81 while (*pos == '\\') { in cifs_build_devname() 82 --pos; in cifs_build_devname() 96 pos = dev; in cifs_build_devname() 98 *pos = '/'; in cifs_build_devname() 99 ++pos; in cifs_build_devname() 100 *pos = '/'; in cifs_build_devname() 101 ++pos; in cifs_build_devname() 104 memcpy(pos, nodename, unclen); in cifs_build_devname() [all …]
|
/fs/sysv/ |
D | dir.c | 41 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len) in dir_commit_chunk() argument 47 block_write_end(NULL, mapping, pos, len, len, page, NULL); in dir_commit_chunk() 48 if (pos+len > dir->i_size) { in dir_commit_chunk() 49 i_size_write(dir, pos+len); in dir_commit_chunk() 70 unsigned long pos = filp->f_pos; in sysv_readdir() local 73 unsigned offset = pos & ~PAGE_CACHE_MASK; in sysv_readdir() 74 unsigned long n = pos >> PAGE_CACHE_SHIFT; in sysv_readdir() 77 pos = (pos + SYSV_DIRSIZE-1) & ~(SYSV_DIRSIZE-1); in sysv_readdir() 78 if (pos >= inode->i_size) in sysv_readdir() 192 loff_t pos; in sysv_add_link() local [all …]
|
/fs/proc/ |
D | interrupts.c | 11 static void *int_seq_start(struct seq_file *f, loff_t *pos) in int_seq_start() argument 13 return (*pos <= nr_irqs) ? pos : NULL; in int_seq_start() 16 static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos) in int_seq_next() argument 18 (*pos)++; in int_seq_next() 19 if (*pos > nr_irqs) in int_seq_next() 21 return pos; in int_seq_next()
|
D | devices.c | 26 static void *devinfo_start(struct seq_file *f, loff_t *pos) in devinfo_start() argument 28 if (*pos < (BLKDEV_MAJOR_HASH_SIZE + CHRDEV_MAJOR_HASH_SIZE)) in devinfo_start() 29 return pos; in devinfo_start() 33 static void *devinfo_next(struct seq_file *f, void *v, loff_t *pos) in devinfo_next() argument 35 (*pos)++; in devinfo_next() 36 if (*pos >= (BLKDEV_MAJOR_HASH_SIZE + CHRDEV_MAJOR_HASH_SIZE)) in devinfo_next() 38 return pos; in devinfo_next()
|
/fs/squashfs/ |
D | page_actor.c | 46 int i, avail, pos = 0; in squashfs_actor_to_buf() local 48 for (i = 0; i < actor->pages && pos < length; ++i) { in squashfs_actor_to_buf() 49 avail = min_t(int, length - pos, PAGE_SIZE); in squashfs_actor_to_buf() 52 memcpy(buf + pos, pageaddr, avail); in squashfs_actor_to_buf() 55 pos += avail; in squashfs_actor_to_buf() 63 int i, avail, pos = 0; in squashfs_buf_to_actor() local 65 for (i = 0; i < actor->pages && pos < length; ++i) { in squashfs_buf_to_actor() 66 avail = min_t(int, length - pos, PAGE_SIZE); in squashfs_buf_to_actor() 69 memcpy(pageaddr, buf + pos, avail); in squashfs_buf_to_actor() 72 pos += avail; in squashfs_buf_to_actor()
|
/fs/minix/ |
D | dir.c | 53 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len) in dir_commit_chunk() argument 58 block_write_end(NULL, mapping, pos, len, len, page, NULL); in dir_commit_chunk() 60 if (pos+len > dir->i_size) { in dir_commit_chunk() 61 i_size_write(dir, pos+len); in dir_commit_chunk() 87 unsigned long pos = filp->f_pos; in minix_readdir() local 90 unsigned offset = pos & ~PAGE_CACHE_MASK; in minix_readdir() 91 unsigned long n = pos >> PAGE_CACHE_SHIFT; in minix_readdir() 98 pos = (pos + chunk_size-1) & ~(chunk_size-1); in minix_readdir() 99 if (pos >= inode->i_size) in minix_readdir() 221 loff_t pos; in minix_add_link() local [all …]
|