tag | line | file | source code |
filp | 100 | drivers/block/cdu31a.c | static int scd_open(struct inode *inode, struct file *filp); |
filp | 1593 | drivers/block/cdu31a.c | struct file *filp) |
filp | 1671 | drivers/block/cdu31a.c | struct file *filp) |
filp | 1105 | drivers/block/floppy.c | static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, |
filp | 1271 | drivers/block/floppy.c | static int floppy_open(struct inode * inode, struct file * filp) |
filp | 1286 | drivers/block/floppy.c | if (filp && filp->f_mode) |
filp | 1291 | drivers/block/floppy.c | static void floppy_release(struct inode * inode, struct file * filp) |
filp | 568 | drivers/block/hd.c | static int hd_open(struct inode * inode, struct file * filp) |
filp | 1619 | drivers/char/console.c | int con_open(struct tty_struct *tty, struct file * filp) |
filp | 347 | drivers/char/mem.c | static int memory_open(struct inode * inode, struct file * filp) |
filp | 351 | drivers/char/mem.c | filp->f_op = &ram_fops; |
filp | 354 | drivers/char/mem.c | filp->f_op = &mem_fops; |
filp | 357 | drivers/char/mem.c | filp->f_op = &kmem_fops; |
filp | 360 | drivers/char/mem.c | filp->f_op = &null_fops; |
filp | 363 | drivers/char/mem.c | filp->f_op = &port_fops; |
filp | 366 | drivers/char/mem.c | filp->f_op = &zero_fops; |
filp | 369 | drivers/char/mem.c | filp->f_op = &full_fops; |
filp | 374 | drivers/char/mem.c | if (filp->f_op && filp->f_op->open) |
filp | 375 | drivers/char/mem.c | return filp->f_op->open(inode,filp); |
filp | 27 | drivers/char/pty.c | static void pty_close(struct tty_struct * tty, struct file * filp) |
filp | 92 | drivers/char/pty.c | int pty_open(struct tty_struct *tty, struct file * filp) |
filp | 101 | drivers/char/pty.c | if (filp->f_flags & O_NDELAY) |
filp | 1484 | drivers/char/serial.c | static void rs_close(struct tty_struct *tty, struct file * filp) |
filp | 1489 | drivers/char/serial.c | if (tty_hung_up_p(filp)) |
filp | 1591 | drivers/char/serial.c | static int block_til_ready(struct tty_struct *tty, struct file * filp, |
filp | 1618 | drivers/char/serial.c | if (MAJOR(filp->f_rdev) == TTYAUX_MAJOR) { |
filp | 1637 | drivers/char/serial.c | if (filp->f_flags & O_NONBLOCK) { |
filp | 1667 | drivers/char/serial.c | if (tty_hung_up_p(filp) || |
filp | 1696 | drivers/char/serial.c | if (!tty_hung_up_p(filp)) |
filp | 1715 | drivers/char/serial.c | int rs_open(struct tty_struct *tty, struct file * filp) |
filp | 1739 | drivers/char/serial.c | if (MAJOR(filp->f_rdev) == TTY_MAJOR) |
filp | 1751 | drivers/char/serial.c | retval = block_til_ready(tty, filp, info); |
filp | 1810 | drivers/char/tpqic02.c | static int tape_qic02_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 1814 | drivers/char/tpqic02.c | unsigned short flags = filp->f_flags; |
filp | 1820 | drivers/char/tpqic02.c | MINOR(dev), buf, count, filp->f_pos, flags); |
filp | 1941 | drivers/char/tpqic02.c | filp->f_pos += bytes_done; |
filp | 1980 | drivers/char/tpqic02.c | static int tape_qic02_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 1984 | drivers/char/tpqic02.c | unsigned short flags = filp->f_flags; |
filp | 1989 | drivers/char/tpqic02.c | MINOR(dev), buf, count, filp->f_pos, flags); |
filp | 2104 | drivers/char/tpqic02.c | filp->f_pos += bytes_done; |
filp | 2127 | drivers/char/tpqic02.c | static int tape_qic02_open(struct inode * inode, struct file * filp) |
filp | 2130 | drivers/char/tpqic02.c | unsigned short flags = filp->f_flags; |
filp | 2284 | drivers/char/tpqic02.c | static int tape_qic02_readdir(struct inode * inode, struct file * filp, struct dirent * dp, int count) |
filp | 2290 | drivers/char/tpqic02.c | static void tape_qic02_release(struct inode * inode, struct file * filp) |
filp | 2324 | drivers/char/tpqic02.c | static int tape_qic02_ioctl(struct inode * inode, struct file * filp, |
filp | 198 | drivers/char/tty_io.c | static int hung_up_tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 241 | drivers/char/tty_io.c | struct file * filp; |
filp | 248 | drivers/char/tty_io.c | for (filp = first_file, i=0; i<nr_files; i++, filp = filp->f_next) { |
filp | 249 | drivers/char/tty_io.c | if (!filp->f_count) |
filp | 251 | drivers/char/tty_io.c | if (filp->f_rdev != dev) |
filp | 253 | drivers/char/tty_io.c | if (filp->f_inode && filp->f_inode->i_rdev == CONSOLE_DEV) |
filp | 255 | drivers/char/tty_io.c | if (filp->f_op != &tty_fops) |
filp | 257 | drivers/char/tty_io.c | filp->f_op = fops; |
filp | 292 | drivers/char/tty_io.c | int tty_hung_up_p(struct file * filp) |
filp | 294 | drivers/char/tty_io.c | return (filp->f_op == &hung_up_tty_fops); |
filp | 1352 | drivers/char/tty_io.c | static void release_dev(int dev, struct file * filp) |
filp | 1391 | drivers/char/tty_io.c | tty->close(tty, filp); |
filp | 1463 | drivers/char/tty_io.c | static int tty_open(struct inode * inode, struct file * filp) |
filp | 1472 | drivers/char/tty_io.c | noctty = filp->f_flags & O_NOCTTY; |
filp | 1492 | drivers/char/tty_io.c | filp->f_rdev = (major << 8) | minor; |
filp | 1521 | drivers/char/tty_io.c | retval = tty->open(tty, filp); |
filp | 1530 | drivers/char/tty_io.c | release_dev(minor, filp); |
filp | 1546 | drivers/char/tty_io.c | filp->f_rdev = MKDEV(TTY_MAJOR,minor); /* Set it to something normal */ |
filp | 1555 | drivers/char/tty_io.c | static void tty_release(struct inode * inode, struct file * filp) |
filp | 1559 | drivers/char/tty_io.c | dev = filp->f_rdev; |
filp | 1564 | drivers/char/tty_io.c | dev = MINOR(filp->f_rdev); |
filp | 1569 | drivers/char/tty_io.c | release_dev(dev, filp); |
filp | 1572 | drivers/char/tty_io.c | static int tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 1577 | drivers/char/tty_io.c | dev = filp->f_rdev; |
filp | 1582 | drivers/char/tty_io.c | dev = MINOR(filp->f_rdev); |
filp | 1589 | drivers/char/tty_io.c | return (ldiscs[tty->disc].select)(tty, inode, filp, |
filp | 1641 | drivers/char/tty_io.c | struct file *filp; |
filp | 1653 | drivers/char/tty_io.c | filp = (*p)->filp[i]; |
filp | 1654 | drivers/char/tty_io.c | if (filp && (filp->f_op == &tty_fops) && |
filp | 1655 | drivers/char/tty_io.c | (MINOR(filp->f_rdev) == line)) { |
filp | 56 | drivers/scsi/sd.c | static int sd_open(struct inode * inode, struct file * filp) |
filp | 72 | drivers/scsi/sg.c | static int sg_open(struct inode * inode, struct file * filp) |
filp | 75 | drivers/scsi/sg.c | int flags=filp->f_flags; |
filp | 112 | drivers/scsi/sg.c | static void sg_close(struct inode * inode, struct file * filp) |
filp | 153 | drivers/scsi/sg.c | static int sg_read(struct inode *inode,struct file *filp,char *buf,int count) |
filp | 162 | drivers/scsi/sg.c | if (filp->f_flags & O_NONBLOCK) |
filp | 207 | drivers/scsi/sg.c | static int sg_write(struct inode *inode,struct file *filp,char *buf,int count) |
filp | 221 | drivers/scsi/sg.c | if (filp->f_flags & O_NONBLOCK) |
filp | 251 | drivers/scsi/sg.c | if (!(SCpnt=allocate_device(NULL,device->device->index, !(filp->f_flags & O_NONBLOCK)))) |
filp | 260 | drivers/scsi/sr.c | static int sr_open(struct inode * inode, struct file * filp) |
filp | 309 | drivers/scsi/st.c | flush_buffer(struct inode * inode, struct file * filp, int seek_next) |
filp | 335 | drivers/scsi/st.c | result = st_int_ioctl(inode, filp, MTBSF, 1); /* Back over the EOF hit */ |
filp | 342 | drivers/scsi/st.c | result = st_int_ioctl(inode, filp, MTBSR, backspace); |
filp | 351 | drivers/scsi/st.c | scsi_tape_open(struct inode * inode, struct file * filp) |
filp | 382 | drivers/scsi/st.c | flags = filp->f_flags; |
filp | 541 | drivers/scsi/st.c | scsi_tape_close(struct inode * inode, struct file * filp) |
filp | 560 | drivers/scsi/st.c | printk("st%d: File length %d bytes.\n", dev, filp->f_pos); |
filp | 590 | drivers/scsi/st.c | st_int_ioctl(inode, filp, MTBSF, 1); /* Back over the EOF hit */ |
filp | 592 | drivers/scsi/st.c | flush_buffer(inode, filp, 0); |
filp | 597 | drivers/scsi/st.c | st_int_ioctl(inode, filp, MTREW, 1); |
filp | 608 | drivers/scsi/st.c | st_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 634 | drivers/scsi/st.c | retval = flush_buffer(inode, filp, 0); |
filp | 739 | drivers/scsi/st.c | filp->f_pos += do_count - transfer; |
filp | 767 | drivers/scsi/st.c | filp->f_pos += do_count; |
filp | 777 | drivers/scsi/st.c | filp->f_pos += count; |
filp | 823 | drivers/scsi/st.c | st_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 845 | drivers/scsi/st.c | transfer = flush_buffer(inode, filp, 0); |
filp | 989 | drivers/scsi/st.c | filp->f_pos += transfer; |
filp | 387 | fs/binfmt_coff.c | fp = current->filp[fd]; |
filp | 759 | fs/binfmt_coff.c | file = current->filp[fd]; |
filp | 164 | fs/binfmt_elf.c | file = current->filp[elf_exec_fileno]; |
filp | 321 | fs/binfmt_elf.c | file = current->filp[elf_exec_fileno]; |
filp | 561 | fs/binfmt_elf.c | file = current->filp[fd]; |
filp | 17 | fs/block_dev.c | int block_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 41 | fs/block_dev.c | block = filp->f_pos >> blocksize_bits; |
filp | 42 | fs/block_dev.c | offset = filp->f_pos & (blocksize-1); |
filp | 63 | fs/block_dev.c | filp->f_pos += chars; |
filp | 78 | fs/block_dev.c | int block_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 106 | fs/block_dev.c | offset = filp->f_pos; |
filp | 126 | fs/block_dev.c | if (filp->f_reada) { |
filp | 183 | fs/block_dev.c | filp->f_pos += chars; |
filp | 208 | fs/block_dev.c | filp->f_reada = 1; |
filp | 212 | fs/block_dev.c | int block_fsync(struct inode *inode, struct file *filp) |
filp | 172 | fs/buffer.c | int file_fsync (struct inode *inode, struct file *filp) |
filp | 182 | fs/buffer.c | if (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode)) |
filp | 96 | fs/devices.c | int blkdev_open(struct inode * inode, struct file * filp) |
filp | 103 | fs/devices.c | filp->f_op = blkdevs[i].fops; |
filp | 104 | fs/devices.c | if (filp->f_op->open) |
filp | 105 | fs/devices.c | return filp->f_op->open(inode,filp); |
filp | 147 | fs/devices.c | int chrdev_open(struct inode * inode, struct file * filp) |
filp | 154 | fs/devices.c | filp->f_op = chrdevs[i].fops; |
filp | 155 | fs/devices.c | if (filp->f_op->open) |
filp | 156 | fs/devices.c | return filp->f_op->open(inode,filp); |
filp | 67 | fs/exec.c | fpp = current->filp; |
filp | 247 | fs/exec.c | file = current->filp[fd]; |
filp | 813 | fs/exec.c | file = current->filp[fd]; |
filp | 869 | fs/exec.c | file = current->filp[fd]; |
filp | 23 | fs/ext/dir.c | static int ext_dir_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 64 | fs/ext/dir.c | static int ext_readdir(struct inode * inode, struct file * filp, |
filp | 74 | fs/ext/dir.c | if (filp->f_pos % 8 != 0) |
filp | 76 | fs/ext/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 77 | fs/ext/dir.c | offset = filp->f_pos & 1023; |
filp | 78 | fs/ext/dir.c | bh = ext_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
filp | 80 | fs/ext/dir.c | filp->f_pos += 1024-offset; |
filp | 84 | fs/ext/dir.c | while (offset < 1024 && filp->f_pos < inode->i_size) { |
filp | 87 | fs/ext/dir.c | (de->rec_len + filp->f_pos - 1) / 1024 > (filp->f_pos / 1024)) { |
filp | 91 | fs/ext/dir.c | filp->f_pos += 1024-offset; |
filp | 92 | fs/ext/dir.c | if (filp->f_pos > inode->i_size) |
filp | 93 | fs/ext/dir.c | filp->f_pos = inode->i_size; |
filp | 97 | fs/ext/dir.c | filp->f_pos += de->rec_len; |
filp | 72 | fs/ext/file.c | static int ext_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 90 | fs/ext/file.c | offset = filp->f_pos; |
filp | 106 | fs/ext/file.c | if (filp->f_reada) { |
filp | 163 | fs/ext/file.c | filp->f_pos += chars; |
filp | 188 | fs/ext/file.c | filp->f_reada = 1; |
filp | 196 | fs/ext/file.c | static int ext_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 215 | fs/ext/file.c | if (filp->f_flags & O_APPEND) |
filp | 218 | fs/ext/file.c | pos = filp->f_pos; |
filp | 254 | fs/ext/file.c | filp->f_pos = pos; |
filp | 249 | fs/ext/truncate.c | void ext_release(struct inode * inode, struct file * filp) |
filp | 25 | fs/ext2/dir.c | static int ext2_dir_read (struct inode * inode, struct file * filp, |
filp | 91 | fs/ext2/dir.c | static int ext2_readdir (struct inode * inode, struct file * filp, |
filp | 104 | fs/ext2/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 105 | fs/ext2/dir.c | offset = filp->f_pos & (sb->s_blocksize - 1); |
filp | 106 | fs/ext2/dir.c | blk = (filp->f_pos) >> EXT2_BLOCK_SIZE_BITS(sb); |
filp | 109 | fs/ext2/dir.c | filp->f_pos += sb->s_blocksize - offset; |
filp | 133 | fs/ext2/dir.c | while (offset < sb->s_blocksize && filp->f_pos < inode->i_size) { |
filp | 140 | fs/ext2/dir.c | filp->f_pos += de->rec_len; |
filp | 75 | fs/ext2/file.c | static int ext2_file_read (struct inode * inode, struct file * filp, |
filp | 98 | fs/ext2/file.c | offset = filp->f_pos; |
filp | 114 | fs/ext2/file.c | if (filp->f_reada) { |
filp | 182 | fs/ext2/file.c | filp->f_pos += chars; |
filp | 210 | fs/ext2/file.c | filp->f_reada = 1; |
filp | 218 | fs/ext2/file.c | static int ext2_file_write (struct inode * inode, struct file * filp, |
filp | 245 | fs/ext2/file.c | if (filp->f_flags & O_APPEND) |
filp | 248 | fs/ext2/file.c | pos = filp->f_pos; |
filp | 285 | fs/ext2/file.c | filp->f_pos = pos; |
filp | 295 | fs/ext2/file.c | static void ext2_release_file (struct inode * inode, struct file * filp) |
filp | 297 | fs/ext2/file.c | if (filp->f_mode & 2) |
filp | 17 | fs/ext2/ioctl.c | int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, |
filp | 22 | fs/fcntl.c | if (fd >= NR_OPEN || !current->filp[fd]) |
filp | 27 | fs/fcntl.c | if (current->filp[arg]) |
filp | 34 | fs/fcntl.c | (current->filp[arg] = current->filp[fd])->f_count++; |
filp | 40 | fs/fcntl.c | if (oldfd >= NR_OPEN || !current->filp[oldfd]) |
filp | 68 | fs/fcntl.c | struct file * filp; |
filp | 70 | fs/fcntl.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
filp | 84 | fs/fcntl.c | return filp->f_flags; |
filp | 86 | fs/fcntl.c | filp->f_flags &= ~(O_APPEND | O_NONBLOCK); |
filp | 87 | fs/fcntl.c | filp->f_flags |= arg & (O_APPEND | O_NONBLOCK); |
filp | 97 | fs/fcntl.c | if (S_ISSOCK (filp->f_inode->i_mode)) |
filp | 99 | fs/fcntl.c | return (sock_fcntl (filp, cmd, arg)); |
filp | 12 | fs/fifo.c | static int fifo_open(struct inode * inode,struct file * filp) |
filp | 17 | fs/fifo.c | switch( filp->f_mode ) { |
filp | 25 | fs/fifo.c | filp->f_op = &connecting_fifo_fops; |
filp | 28 | fs/fifo.c | if (!(filp->f_flags & O_NONBLOCK) && !PIPE_WRITERS(*inode)) { |
filp | 43 | fs/fifo.c | filp->f_op = &read_fifo_fops; |
filp | 54 | fs/fifo.c | if ((filp->f_flags & O_NONBLOCK) && !PIPE_READERS(*inode)) { |
filp | 58 | fs/fifo.c | filp->f_op = &write_fifo_fops; |
filp | 86 | fs/fifo.c | filp->f_op = &rdwr_fifo_fops; |
filp | 182 | fs/hpfs/hpfs_fs.c | static int hpfs_dir_read(struct inode *inode, struct file *filp, |
filp | 184 | fs/hpfs/hpfs_fs.c | static int hpfs_readdir(struct inode *inode, struct file *filp, |
filp | 862 | fs/hpfs/hpfs_fs.c | static int hpfs_file_read(struct inode *inode, struct file *filp, |
filp | 876 | fs/hpfs/hpfs_fs.c | if (count > inode->i_size - filp->f_pos) |
filp | 877 | fs/hpfs/hpfs_fs.c | count = inode->i_size - filp->f_pos; |
filp | 885 | fs/hpfs/hpfs_fs.c | q = filp->f_pos >> 9; |
filp | 886 | fs/hpfs/hpfs_fs.c | r = filp->f_pos & 511; |
filp | 922 | fs/hpfs/hpfs_fs.c | if (count > inode->i_size - filp->f_pos - n + n0) |
filp | 923 | fs/hpfs/hpfs_fs.c | count = inode->i_size - filp->f_pos - n + n0; |
filp | 931 | fs/hpfs/hpfs_fs.c | filp->f_pos += n; |
filp | 1328 | fs/hpfs/hpfs_fs.c | static int hpfs_readdir(struct inode *inode, struct file *filp, |
filp | 1343 | fs/hpfs/hpfs_fs.c | switch (filp->f_pos) { |
filp | 1346 | fs/hpfs/hpfs_fs.c | filp->f_pos = -1; |
filp | 1352 | fs/hpfs/hpfs_fs.c | filp->f_pos = 1; |
filp | 1359 | fs/hpfs/hpfs_fs.c | de = map_pos_dirent(inode, &filp->f_pos, &qbh); |
filp | 1361 | fs/hpfs/hpfs_fs.c | filp->f_pos = -2; |
filp | 1560 | fs/hpfs/hpfs_fs.c | static int hpfs_dir_read(struct inode *inode, struct file *filp, |
filp | 16 | fs/ioctl.c | static int file_ioctl(struct file *filp,unsigned int cmd,unsigned long arg) |
filp | 23 | fs/ioctl.c | if (filp->f_inode->i_op == NULL) |
filp | 25 | fs/ioctl.c | if (filp->f_inode->i_op->bmap == NULL) |
filp | 31 | fs/ioctl.c | block = filp->f_inode->i_op->bmap(filp->f_inode,block); |
filp | 35 | fs/ioctl.c | if (filp->f_inode->i_sb == NULL) |
filp | 40 | fs/ioctl.c | put_fs_long(filp->f_inode->i_sb->s_blocksize, |
filp | 47 | fs/ioctl.c | put_fs_long(filp->f_inode->i_size - filp->f_pos, |
filp | 51 | fs/ioctl.c | if (filp->f_op && filp->f_op->ioctl) |
filp | 52 | fs/ioctl.c | return filp->f_op->ioctl(filp->f_inode, filp, cmd,arg); |
filp | 59 | fs/ioctl.c | struct file * filp; |
filp | 62 | fs/ioctl.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
filp | 76 | fs/ioctl.c | filp->f_flags |= O_NONBLOCK; |
filp | 78 | fs/ioctl.c | filp->f_flags &= ~O_NONBLOCK; |
filp | 85 | fs/ioctl.c | filp->f_flags |= O_SYNC; |
filp | 87 | fs/ioctl.c | filp->f_flags &= ~O_SYNC; |
filp | 91 | fs/ioctl.c | if (filp->f_inode && S_ISREG(filp->f_inode->i_mode)) |
filp | 92 | fs/ioctl.c | return file_ioctl(filp,cmd,arg); |
filp | 94 | fs/ioctl.c | if (filp->f_op && filp->f_op->ioctl) |
filp | 95 | fs/ioctl.c | return filp->f_op->ioctl(filp->f_inode, filp, cmd,arg); |
filp | 64 | fs/isofs/dir.c | static int isofs_readdir(struct inode * inode, struct file * filp, |
filp | 82 | fs/isofs/dir.c | offset = filp->f_pos & (bufsize - 1); |
filp | 83 | fs/isofs/dir.c | block = isofs_bmap(inode,filp->f_pos>>bufbits); |
filp | 87 | fs/isofs/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 90 | fs/isofs/dir.c | block, offset, filp->f_pos); |
filp | 102 | fs/isofs/dir.c | filp->f_pos = ((filp->f_pos & ~(ISOFS_BLOCK_SIZE - 1)) |
filp | 104 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>>bufbits); |
filp | 118 | fs/isofs/dir.c | filp->f_pos += *((unsigned char *) de); |
filp | 126 | fs/isofs/dir.c | offset = filp->f_pos & (bufsize - 1); |
filp | 127 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>> bufbits); |
filp | 114 | fs/isofs/file.c | static int isofs_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 134 | fs/isofs/file.c | if (filp->f_pos > inode->i_size) |
filp | 137 | fs/isofs/file.c | left = inode->i_size - filp->f_pos; |
filp | 143 | fs/isofs/file.c | block = filp->f_pos >> ISOFS_BUFFER_BITS(inode); |
filp | 144 | fs/isofs/file.c | offset = filp->f_pos & (ISOFS_BUFFER_SIZE(inode)-1); |
filp | 186 | fs/isofs/file.c | if(blocks == 0 && bhrequest && filp->f_reada && bhb != bhe) { |
filp | 231 | fs/isofs/file.c | filp->f_pos += chars; |
filp | 260 | fs/isofs/file.c | filp->f_reada = 1; |
filp | 25 | fs/locks.c | static int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l, |
filp | 29 | fs/locks.c | static int lock_it(struct file *filp, struct file_lock *caller, unsigned int fd); |
filp | 58 | fs/locks.c | struct file *filp; |
filp | 61 | fs/locks.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
filp | 69 | fs/locks.c | if (!copy_flock(filp, &file_lock, &flock, fd)) |
filp | 72 | fs/locks.c | for (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) { |
filp | 97 | fs/locks.c | struct file *filp; |
filp | 105 | fs/locks.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
filp | 111 | fs/locks.c | if (!copy_flock(filp, &file_lock, &flock, fd)) |
filp | 115 | fs/locks.c | if (!(filp->f_mode & 1)) |
filp | 119 | fs/locks.c | if (!(filp->f_mode & 2)) |
filp | 123 | fs/locks.c | if (!(filp->f_mode & 3)) |
filp | 128 | fs/locks.c | if (!(filp->f_mode & 3)) |
filp | 142 | fs/locks.c | for (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) { |
filp | 166 | fs/locks.c | return lock_it(filp, &file_lock, fd); |
filp | 173 | fs/locks.c | void fcntl_remove_locks(struct task_struct *task, struct file *filp, |
filp | 181 | fs/locks.c | before = &filp->f_inode->i_flock; |
filp | 196 | fs/locks.c | static int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l, |
filp | 201 | fs/locks.c | if (!filp->f_inode) /* just in case */ |
filp | 203 | fs/locks.c | if (!S_ISREG(filp->f_inode->i_mode)) |
filp | 210 | fs/locks.c | case 1 /*SEEK_CUR*/ : start = filp->f_pos; break; |
filp | 211 | fs/locks.c | case 2 /*SEEK_END*/ : start = filp->f_inode->i_size; break; |
filp | 272 | fs/locks.c | static int lock_it(struct file *filp, struct file_lock *caller, unsigned int fd) |
filp | 284 | fs/locks.c | before = &filp->f_inode->i_flock; |
filp | 16 | fs/minix/dir.c | static int minix_dir_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 57 | fs/minix/dir.c | static int minix_readdir(struct inode * inode, struct file * filp, |
filp | 69 | fs/minix/dir.c | if (filp->f_pos & (info->s_dirsize - 1)) |
filp | 71 | fs/minix/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 72 | fs/minix/dir.c | offset = filp->f_pos & 1023; |
filp | 73 | fs/minix/dir.c | bh = minix_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
filp | 75 | fs/minix/dir.c | filp->f_pos += 1024-offset; |
filp | 78 | fs/minix/dir.c | while (offset < 1024 && filp->f_pos < inode->i_size) { |
filp | 81 | fs/minix/dir.c | filp->f_pos += info->s_dirsize; |
filp | 66 | fs/minix/file.c | static int minix_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 84 | fs/minix/file.c | offset = filp->f_pos; |
filp | 100 | fs/minix/file.c | if (filp->f_reada) { |
filp | 157 | fs/minix/file.c | filp->f_pos += chars; |
filp | 182 | fs/minix/file.c | filp->f_reada = 1; |
filp | 188 | fs/minix/file.c | static int minix_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 207 | fs/minix/file.c | if (filp->f_flags & O_APPEND) |
filp | 210 | fs/minix/file.c | pos = filp->f_pos; |
filp | 246 | fs/minix/file.c | filp->f_pos = pos; |
filp | 17 | fs/msdos/dir.c | static int msdos_dir_read(struct inode * inode,struct file * filp, char * buf,int count) |
filp | 22 | fs/msdos/dir.c | static int msdos_readdir(struct inode *inode,struct file *filp, |
filp | 57 | fs/msdos/dir.c | static int msdos_readdir(struct inode *inode,struct file *filp, |
filp | 68 | fs/msdos/dir.c | if (filp->f_pos == 2) filp->f_pos = 0; |
filp | 69 | fs/msdos/dir.c | else if (filp->f_pos < 2) { |
filp | 70 | fs/msdos/dir.c | walk = filp->f_pos++ ? ".." : "."; |
filp | 79 | fs/msdos/dir.c | if (filp->f_pos & (sizeof(struct msdos_dir_entry)-1)) return -ENOENT; |
filp | 81 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
filp | 22 | fs/msdos/file.c | static int msdos_file_read(struct inode *inode,struct file *filp,char *buf, |
filp | 24 | fs/msdos/file.c | static int msdos_file_write(struct inode *inode,struct file *filp,char *buf, |
filp | 80 | fs/msdos/file.c | static int msdos_file_read(struct inode *inode,struct file *filp,char *buf, |
filp | 98 | fs/msdos/file.c | if (filp->f_pos >= inode->i_size || count <= 0) return 0; |
filp | 100 | fs/msdos/file.c | while ((left = MIN(inode->i_size-filp->f_pos,count-(buf-start))) > 0){ |
filp | 101 | fs/msdos/file.c | if (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS))) |
filp | 103 | fs/msdos/file.c | offset = filp->f_pos & (SECTOR_SIZE-1); |
filp | 105 | fs/msdos/file.c | filp->f_pos += (size = MIN(SECTOR_SIZE-offset,left)); |
filp | 116 | fs/msdos/file.c | filp->f_pos = inode->i_size; |
filp | 135 | fs/msdos/file.c | static int msdos_file_write(struct inode *inode,struct file *filp,char *buf, |
filp | 156 | fs/msdos/file.c | if (filp->f_flags & O_APPEND) filp->f_pos = inode->i_size; |
filp | 160 | fs/msdos/file.c | while (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS))) |
filp | 166 | fs/msdos/file.c | offset = filp->f_pos & (SECTOR_SIZE-1); |
filp | 173 | fs/msdos/file.c | memcpy_fromfs(data+(filp->f_pos & (SECTOR_SIZE-1)), |
filp | 179 | fs/msdos/file.c | to = (char *) data+(filp->f_pos & (SECTOR_SIZE-1)); |
filp | 198 | fs/msdos/file.c | filp->f_pos += written; |
filp | 199 | fs/msdos/file.c | if (filp->f_pos > inode->i_size) { |
filp | 200 | fs/msdos/file.c | inode->i_size = filp->f_pos; |
filp | 21 | fs/nfs/dir.c | static int nfs_dir_read(struct inode *, struct file *filp, char *buf, |
filp | 72 | fs/nfs/dir.c | static int nfs_dir_read(struct inode *inode, struct file *filp, char *buf, |
filp | 86 | fs/nfs/dir.c | static int nfs_readdir(struct inode *inode, struct file *filp, |
filp | 119 | fs/nfs/dir.c | if (filp->f_pos == c_entry[i].cookie) { |
filp | 135 | fs/nfs/dir.c | filp->f_pos, NFS_READDIR_CACHE_SIZE, c_entry); |
filp | 155 | fs/nfs/dir.c | filp->f_pos = entry->cookie; |
filp | 21 | fs/nfs/inode.c | extern int close_fp(struct file *filp, unsigned int fd); |
filp | 67 | fs/nfs/inode.c | struct file *filp; |
filp | 80 | fs/nfs/inode.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) { |
filp | 85 | fs/nfs/inode.c | if (!S_ISSOCK(filp->f_inode->i_mode)) { |
filp | 90 | fs/nfs/inode.c | filp->f_count++; |
filp | 98 | fs/nfs/inode.c | server->file = filp; |
filp | 58 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 99 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 218 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 258 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 309 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 383 | fs/open.c | if (!current->filp[fd]) |
filp | 391 | fs/open.c | current->filp[fd] = f; |
filp | 400 | fs/open.c | current->filp[fd]=NULL; |
filp | 416 | fs/open.c | current->filp[fd]=NULL; |
filp | 442 | fs/open.c | int close_fp(struct file *filp, unsigned int fd) |
filp | 446 | fs/open.c | if (filp->f_count == 0) { |
filp | 450 | fs/open.c | inode = filp->f_inode; |
filp | 452 | fs/open.c | fcntl_remove_locks(current, filp, fd); |
filp | 453 | fs/open.c | if (filp->f_count > 1) { |
filp | 454 | fs/open.c | filp->f_count--; |
filp | 457 | fs/open.c | if (filp->f_op && filp->f_op->release) |
filp | 458 | fs/open.c | filp->f_op->release(inode,filp); |
filp | 459 | fs/open.c | filp->f_count--; |
filp | 460 | fs/open.c | filp->f_inode = NULL; |
filp | 467 | fs/open.c | struct file * filp; |
filp | 472 | fs/open.c | if (!(filp = current->filp[fd])) |
filp | 474 | fs/open.c | current->filp[fd] = NULL; |
filp | 475 | fs/open.c | return (close_fp (filp, fd)); |
filp | 24 | fs/pipe.c | static int pipe_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 29 | fs/pipe.c | if (filp->f_flags & O_NONBLOCK) { |
filp | 71 | fs/pipe.c | static int pipe_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 93 | fs/pipe.c | if (filp->f_flags & O_NONBLOCK) |
filp | 128 | fs/pipe.c | static int bad_pipe_rw(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 133 | fs/pipe.c | static int pipe_ioctl(struct inode *pino, struct file * filp, |
filp | 149 | fs/pipe.c | static int pipe_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 175 | fs/pipe.c | static int fifo_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 202 | fs/pipe.c | static int connect_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 207 | fs/pipe.c | if (filp->f_flags & O_NONBLOCK) |
filp | 214 | fs/pipe.c | filp->f_op = &read_fifo_fops; |
filp | 215 | fs/pipe.c | return pipe_read(inode,filp,buf,count); |
filp | 218 | fs/pipe.c | static int connect_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 223 | fs/pipe.c | filp->f_op = &read_fifo_fops; |
filp | 246 | fs/pipe.c | static void pipe_read_release(struct inode * inode, struct file * filp) |
filp | 252 | fs/pipe.c | static void pipe_write_release(struct inode * inode, struct file * filp) |
filp | 258 | fs/pipe.c | static void pipe_rdwr_release(struct inode * inode, struct file * filp) |
filp | 397 | fs/pipe.c | if (!current->filp[i]) { |
filp | 398 | fs/pipe.c | current->filp[ fd[j]=i ] = f[j]; |
filp | 402 | fs/pipe.c | current->filp[fd[0]]=NULL; |
filp | 409 | fs/pipe.c | current->filp[fd[0]] = NULL; |
filp | 410 | fs/pipe.c | current->filp[fd[1]] = NULL; |
filp | 132 | fs/proc/base.c | static int proc_readbase(struct inode * inode, struct file * filp, |
filp | 148 | fs/proc/base.c | if (((unsigned) filp->f_pos) < NR_BASE_DIRENTRY) { |
filp | 149 | fs/proc/base.c | de = base_dir + filp->f_pos; |
filp | 150 | fs/proc/base.c | filp->f_pos++; |
filp | 108 | fs/proc/fd.c | if (fd >= NR_OPEN || !p->filp[fd] || !p->filp[fd]->f_inode) |
filp | 126 | fs/proc/fd.c | static int proc_readfd(struct inode * inode, struct file * filp, |
filp | 142 | fs/proc/fd.c | fd = filp->f_pos; |
filp | 143 | fs/proc/fd.c | filp->f_pos++; |
filp | 166 | fs/proc/fd.c | if (!p->filp[fd] || !p->filp[fd]->f_inode) |
filp | 172 | fs/proc/inode.c | if (ino >= NR_OPEN || !p->filp[ino]) |
filp | 81 | fs/proc/link.c | if (ino < NR_OPEN && p->filp[ino]) |
filp | 82 | fs/proc/link.c | inode = p->filp[ino]->f_inode; |
filp | 130 | fs/proc/net.c | static int proc_readnetdir(struct inode * inode, struct file * filp, |
filp | 140 | fs/proc/net.c | if (((unsigned) filp->f_pos) < NR_NET_DIRENTRY) { |
filp | 141 | fs/proc/net.c | de = net_dir + filp->f_pos; |
filp | 142 | fs/proc/net.c | filp->f_pos++; |
filp | 131 | fs/proc/root.c | static int proc_readroot(struct inode * inode, struct file * filp, |
filp | 141 | fs/proc/root.c | nr = filp->f_pos; |
filp | 145 | fs/proc/root.c | filp->f_pos++; |
filp | 158 | fs/proc/root.c | filp->f_pos++; |
filp | 25 | fs/read_write.c | if (fd >= NR_OPEN || !(file = current->filp[fd]) || |
filp | 42 | fs/read_write.c | if (fd >= NR_OPEN || !(file=current->filp[fd]) || !(file->f_inode)) |
filp | 76 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode)) |
filp | 96 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode)) |
filp | 98 | fs/select.c | if (!current->filp[i]) |
filp | 100 | fs/select.c | if (!current->filp[i]->f_inode) |
filp | 119 | fs/select.c | if (FD_ISSET(i,in) && check(SEL_IN,wait,current->filp[i])) { |
filp | 124 | fs/select.c | if (FD_ISSET(i,out) && check(SEL_OUT,wait,current->filp[i])) { |
filp | 129 | fs/select.c | if (FD_ISSET(i,ex) && check(SEL_EX,wait,current->filp[i])) { |
filp | 162 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
filp | 177 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
filp | 23 | fs/sysv/dir.c | static int sysv_dir_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 64 | fs/sysv/dir.c | static int sysv_readdir(struct inode * inode, struct file * filp, |
filp | 76 | fs/sysv/dir.c | if ((unsigned long)(filp->f_pos) % SYSV_DIRSIZE) |
filp | 78 | fs/sysv/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 79 | fs/sysv/dir.c | offset = filp->f_pos & sb->sv_block_size_1; |
filp | 80 | fs/sysv/dir.c | bh = sysv_file_bread(inode, filp->f_pos >> sb->sv_block_size_bits, 0, &bh_data); |
filp | 82 | fs/sysv/dir.c | filp->f_pos += sb->sv_block_size - offset; |
filp | 85 | fs/sysv/dir.c | while (offset < sb->sv_block_size && filp->f_pos < inode->i_size) { |
filp | 88 | fs/sysv/dir.c | filp->f_pos += SYSV_DIRSIZE; |
filp | 98 | fs/sysv/dir.c | inode->i_dev, inode->i_ino, filp->f_pos - SYSV_DIRSIZE, de->inode); |
filp | 109 | fs/sysv/file.c | static int sysv_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 129 | fs/sysv/file.c | offset = filp->f_pos; |
filp | 145 | fs/sysv/file.c | if (filp->f_reada) { |
filp | 211 | fs/sysv/file.c | filp->f_pos += chars; |
filp | 236 | fs/sysv/file.c | filp->f_reada = 1; |
filp | 242 | fs/sysv/file.c | static int sysv_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 268 | fs/sysv/file.c | if (filp->f_flags & O_APPEND) |
filp | 271 | fs/sysv/file.c | pos = filp->f_pos; |
filp | 308 | fs/sysv/file.c | filp->f_pos = pos; |
filp | 60 | fs/xiafs/dir.c | struct file * filp, char * buf, int count) |
filp | 66 | fs/xiafs/dir.c | struct file * filp, struct dirent * dirent, int count) |
filp | 76 | fs/xiafs/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 77 | fs/xiafs/dir.c | offset = filp->f_pos & (XIAFS_ZSIZE(inode->i_sb) - 1); |
filp | 78 | fs/xiafs/dir.c | bh = xiafs_bread(inode, filp->f_pos >> XIAFS_ZSIZE_BITS(inode->i_sb),0); |
filp | 80 | fs/xiafs/dir.c | filp->f_pos += XIAFS_ZSIZE(inode->i_sb)-offset; |
filp | 84 | fs/xiafs/dir.c | while (offset < XIAFS_ZSIZE(inode->i_sb) && filp->f_pos < inode->i_size) { |
filp | 96 | fs/xiafs/dir.c | filp->f_pos += de->d_rec_len; |
filp | 70 | fs/xiafs/file.c | xiafs_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 87 | fs/xiafs/file.c | offset = filp->f_pos; |
filp | 99 | fs/xiafs/file.c | if (filp->f_reada) { |
filp | 155 | fs/xiafs/file.c | filp->f_pos += chars; |
filp | 180 | fs/xiafs/file.c | filp->f_reada = 1; |
filp | 189 | fs/xiafs/file.c | xiafs_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 208 | fs/xiafs/file.c | if (filp->f_flags & O_APPEND) |
filp | 211 | fs/xiafs/file.c | pos = filp->f_pos; |
filp | 247 | fs/xiafs/file.c | filp->f_pos = pos; |
filp | 62 | include/linux/ext_fs.h | extern int ext_open(struct inode * inode, struct file * filp); |
filp | 63 | include/linux/ext_fs.h | extern void ext_release(struct inode * inode, struct file * filp); |
filp | 326 | include/linux/fs.h | extern int blkdev_open(struct inode * inode, struct file * filp); |
filp | 332 | include/linux/fs.h | extern int chrdev_open(struct inode * inode, struct file * filp); |
filp | 167 | include/linux/iso_fs.h | extern int isofs_open(struct inode * inode, struct file * filp); |
filp | 168 | include/linux/iso_fs.h | extern void isofs_release(struct inode * inode, struct file * filp); |
filp | 228 | include/linux/sched.h | struct file * filp[NR_OPEN]; |
filp | 256 | include/linux/tty.h | int (*open)(struct tty_struct * tty, struct file * filp); |
filp | 257 | include/linux/tty.h | void (*close)(struct tty_struct * tty, struct file * filp); |
filp | 418 | include/linux/tty.h | extern void tty_unhangup(struct file *filp); |
filp | 419 | include/linux/tty.h | extern int tty_hung_up_p(struct file * filp); |
filp | 430 | include/linux/tty.h | extern int rs_open(struct tty_struct * tty, struct file * filp); |
filp | 434 | include/linux/tty.h | extern int pty_open(struct tty_struct * tty, struct file * filp); |
filp | 438 | include/linux/tty.h | extern int con_open(struct tty_struct * tty, struct file * filp); |
filp | 369 | kernel/exit.c | if (current->filp[i]) |
filp | 203 | kernel/fork.c | if ((f = p->filp[i]) != NULL) |
filp | 204 | kernel/fork.c | p->filp[i] = copy_fd(f); |
filp | 207 | kernel/fork.c | if ((f = p->filp[i]) != NULL) |
filp | 149 | mm/mmap.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 107 | net/socket.c | if (!current->filp[fd]) break; |
filp | 113 | net/socket.c | current->filp[fd] = file; |
filp | 161 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd])) return(NULL); |
filp | 543 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
filp | 565 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
filp | 591 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 646 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || (file=current->filp[fd]) == NULL) |
filp | 681 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
filp | 694 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
filp | 711 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 730 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 749 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 768 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 788 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 807 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 824 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 834 | net/socket.c | sock_fcntl(struct file *filp, unsigned int cmd, unsigned long arg) |
filp | 838 | net/socket.c | sock = socki_lookup (filp->f_inode); |