tag | line | file | source code |
filp | 98 | drivers/block/cdu31a.c | static int scd_open(struct inode *inode, struct file *filp); |
filp | 1455 | drivers/block/cdu31a.c | struct file *filp) |
filp | 1533 | drivers/block/cdu31a.c | struct file *filp) |
filp | 1108 | 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 | 574 | drivers/block/hd.c | static int hd_open(struct inode * inode, struct file * filp) |
filp | 1548 | drivers/char/console.c | int con_open(struct tty_struct *tty, struct file * filp) |
filp | 346 | drivers/char/mem.c | static int memory_open(struct inode * inode, struct file * filp) |
filp | 350 | drivers/char/mem.c | filp->f_op = &ram_fops; |
filp | 353 | drivers/char/mem.c | filp->f_op = &mem_fops; |
filp | 356 | drivers/char/mem.c | filp->f_op = &kmem_fops; |
filp | 359 | drivers/char/mem.c | filp->f_op = &null_fops; |
filp | 362 | drivers/char/mem.c | filp->f_op = &port_fops; |
filp | 365 | drivers/char/mem.c | filp->f_op = &zero_fops; |
filp | 368 | drivers/char/mem.c | filp->f_op = &full_fops; |
filp | 373 | drivers/char/mem.c | if (filp->f_op && filp->f_op->open) |
filp | 374 | drivers/char/mem.c | return filp->f_op->open(inode,filp); |
filp | 24 | drivers/char/pty.c | static void pty_close(struct tty_struct * tty, struct file * filp) |
filp | 86 | drivers/char/pty.c | int pty_open(struct tty_struct *tty, struct file * filp) |
filp | 97 | drivers/char/pty.c | if (filp->f_flags & O_NDELAY) |
filp | 1427 | drivers/char/serial.c | static void rs_close(struct tty_struct *tty, struct file * filp) |
filp | 1477 | drivers/char/serial.c | static int block_til_ready(struct tty_struct *tty, struct file * filp, |
filp | 1490 | drivers/char/serial.c | if (MAJOR(filp->f_rdev) == 5) { |
filp | 1509 | drivers/char/serial.c | if (filp->f_flags & O_NONBLOCK) { |
filp | 1541 | drivers/char/serial.c | if (tty_hung_up_p(filp) && (info->flags & ASYNC_HUP_NOTIFY)) { |
filp | 1548 | drivers/char/serial.c | if (tty_hung_up_p(filp)) |
filp | 1585 | drivers/char/serial.c | int rs_open(struct tty_struct *tty, struct file * filp) |
filp | 1637 | 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 | 193 | drivers/char/tty_io.c | static int hung_up_tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 248 | drivers/char/tty_io.c | struct file * filp; |
filp | 255 | drivers/char/tty_io.c | for (filp = first_file, i=0; i<nr_files; i++, filp = filp->f_next) { |
filp | 256 | drivers/char/tty_io.c | if (!filp->f_count) |
filp | 258 | drivers/char/tty_io.c | if (filp->f_rdev != dev) |
filp | 260 | drivers/char/tty_io.c | if (filp->f_inode && filp->f_inode->i_rdev == 0x0400) |
filp | 262 | drivers/char/tty_io.c | if (filp->f_op != &tty_fops) |
filp | 264 | drivers/char/tty_io.c | filp->f_op = fops; |
filp | 289 | drivers/char/tty_io.c | void tty_unhangup(struct file *filp) |
filp | 291 | drivers/char/tty_io.c | filp->f_op = &tty_fops; |
filp | 294 | drivers/char/tty_io.c | int tty_hung_up_p(struct file * filp) |
filp | 296 | drivers/char/tty_io.c | return ((filp->f_op == &hung_up_tty_fops) || |
filp | 297 | drivers/char/tty_io.c | (filp->f_op == &vhung_up_tty_fops)); |
filp | 1189 | drivers/char/tty_io.c | static void release_dev(int dev, struct file * filp) |
filp | 1225 | drivers/char/tty_io.c | tty->close(tty, filp); |
filp | 1287 | drivers/char/tty_io.c | static int tty_open(struct inode * inode, struct file * filp) |
filp | 1295 | drivers/char/tty_io.c | noctty = filp->f_flags & O_NOCTTY; |
filp | 1315 | drivers/char/tty_io.c | filp->f_rdev = (major << 8) | minor; |
filp | 1335 | drivers/char/tty_io.c | retval = tty->open(tty, filp); |
filp | 1340 | drivers/char/tty_io.c | release_dev(minor, filp); |
filp | 1351 | drivers/char/tty_io.c | filp->f_rdev = 0x0400 | minor; /* Set it to something normal */ |
filp | 1360 | drivers/char/tty_io.c | static void tty_release(struct inode * inode, struct file * filp) |
filp | 1364 | drivers/char/tty_io.c | dev = filp->f_rdev; |
filp | 1369 | drivers/char/tty_io.c | dev = MINOR(filp->f_rdev); |
filp | 1374 | drivers/char/tty_io.c | release_dev(dev, filp); |
filp | 1377 | drivers/char/tty_io.c | static int tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 1382 | drivers/char/tty_io.c | dev = filp->f_rdev; |
filp | 1387 | drivers/char/tty_io.c | dev = MINOR(filp->f_rdev); |
filp | 1460 | drivers/char/tty_io.c | struct file *filp; |
filp | 1472 | drivers/char/tty_io.c | filp = (*p)->filp[i]; |
filp | 1473 | drivers/char/tty_io.c | if (filp && (filp->f_op == &tty_fops) && |
filp | 1474 | 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 | 255 | drivers/scsi/sr.c | static int sr_open(struct inode * inode, struct file * filp) |
filp | 241 | drivers/scsi/st.c | static int flush_buffer(struct inode * inode, struct file * filp, |
filp | 263 | drivers/scsi/st.c | result = st_int_ioctl(inode, filp, MTBSR, backspace); |
filp | 275 | drivers/scsi/st.c | static int scsi_tape_open(struct inode * inode, struct file * filp) |
filp | 304 | drivers/scsi/st.c | flags = filp->f_flags; |
filp | 471 | drivers/scsi/st.c | static void scsi_tape_close(struct inode * inode, struct file * filp) |
filp | 488 | drivers/scsi/st.c | printk("st%d: File length %d bytes.\n", dev, filp->f_pos); |
filp | 520 | drivers/scsi/st.c | st_int_ioctl(inode, filp, MTBSF, 1); /* Back over the EOF hit */ |
filp | 522 | drivers/scsi/st.c | flush_buffer(inode, filp, 0); |
filp | 527 | drivers/scsi/st.c | st_int_ioctl(inode, filp, MTREW, 1); |
filp | 537 | drivers/scsi/st.c | int st_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 560 | drivers/scsi/st.c | retval = flush_buffer(inode, filp, 0); |
filp | 645 | drivers/scsi/st.c | filp->f_pos += do_count; |
filp | 655 | drivers/scsi/st.c | filp->f_pos += count; |
filp | 701 | drivers/scsi/st.c | int st_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 721 | drivers/scsi/st.c | transfer = flush_buffer(inode, filp, 0); |
filp | 857 | drivers/scsi/st.c | filp->f_pos += transfer; |
filp | 114 | fs/binfmt_elf.c | file = current->filp[elf_exec_fileno]; |
filp | 350 | 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 | 97 | fs/devices.c | int blkdev_open(struct inode * inode, struct file * filp) |
filp | 104 | fs/devices.c | filp->f_op = blkdevs[i].fops; |
filp | 105 | fs/devices.c | if (filp->f_op->open) |
filp | 106 | fs/devices.c | return filp->f_op->open(inode,filp); |
filp | 148 | fs/devices.c | int chrdev_open(struct inode * inode, struct file * filp) |
filp | 155 | fs/devices.c | filp->f_op = chrdevs[i].fops; |
filp | 156 | fs/devices.c | if (filp->f_op->open) |
filp | 157 | fs/devices.c | return filp->f_op->open(inode,filp); |
filp | 67 | fs/exec.c | fpp = current->filp; |
filp | 243 | fs/exec.c | file = current->filp[fd]; |
filp | 795 | fs/exec.c | file = current->filp[fd]; |
filp | 851 | 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 | 250 | fs/ext/truncate.c | void ext_release(struct inode * inode, struct file * filp) |
filp | 24 | fs/ext2/dir.c | static int ext2_dir_read (struct inode * inode, struct file * filp, |
filp | 92 | fs/ext2/dir.c | static int ext2_readdir (struct inode * inode, struct file * filp, |
filp | 105 | fs/ext2/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 106 | fs/ext2/dir.c | offset = filp->f_pos & (sb->s_blocksize - 1); |
filp | 107 | fs/ext2/dir.c | bh = ext2_bread (inode, (filp->f_pos) >> EXT2_BLOCK_SIZE_BITS(sb), |
filp | 110 | fs/ext2/dir.c | filp->f_pos += sb->s_blocksize - offset; |
filp | 114 | fs/ext2/dir.c | while (offset < sb->s_blocksize && filp->f_pos < inode->i_size) { |
filp | 121 | fs/ext2/dir.c | filp->f_pos += de->rec_len; |
filp | 73 | fs/ext2/file.c | /* static */ int ext2_file_read (struct inode * inode, struct file * filp, |
filp | 96 | fs/ext2/file.c | offset = filp->f_pos; |
filp | 112 | fs/ext2/file.c | if (filp->f_reada) { |
filp | 171 | fs/ext2/file.c | filp->f_pos += chars; |
filp | 197 | fs/ext2/file.c | filp->f_reada = 1; |
filp | 205 | fs/ext2/file.c | static int ext2_file_write (struct inode * inode, struct file * filp, |
filp | 229 | fs/ext2/file.c | if (filp->f_flags & O_APPEND) |
filp | 232 | fs/ext2/file.c | pos = filp->f_pos; |
filp | 268 | fs/ext2/file.c | filp->f_pos = pos; |
filp | 15 | fs/ext2/ioctl.c | int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, |
filp | 321 | fs/ext2/truncate.c | void ext2_release (struct inode * inode, struct file * filp) |
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 | 239 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 286 | fs/open.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 360 | fs/open.c | if (!current->filp[fd]) |
filp | 368 | fs/open.c | current->filp[fd] = f; |
filp | 377 | fs/open.c | current->filp[fd]=NULL; |
filp | 393 | fs/open.c | current->filp[fd]=NULL; |
filp | 419 | fs/open.c | int close_fp(struct file *filp, unsigned int fd) |
filp | 423 | fs/open.c | if (filp->f_count == 0) { |
filp | 427 | fs/open.c | inode = filp->f_inode; |
filp | 429 | fs/open.c | fcntl_remove_locks(current, filp, fd); |
filp | 430 | fs/open.c | if (filp->f_count > 1) { |
filp | 431 | fs/open.c | filp->f_count--; |
filp | 434 | fs/open.c | if (filp->f_op && filp->f_op->release) |
filp | 435 | fs/open.c | filp->f_op->release(inode,filp); |
filp | 436 | fs/open.c | filp->f_count--; |
filp | 437 | fs/open.c | filp->f_inode = NULL; |
filp | 444 | fs/open.c | struct file * filp; |
filp | 449 | fs/open.c | if (!(filp = current->filp[fd])) |
filp | 451 | fs/open.c | current->filp[fd] = NULL; |
filp | 452 | 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 | 171 | fs/proc/inode.c | if (ino >= NR_OPEN || !p->filp[ino]) |
filp | 77 | fs/proc/link.c | if (ino < NR_OPEN && p->filp[ino]) |
filp | 78 | 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 | 130 | fs/proc/root.c | static int proc_readroot(struct inode * inode, struct file * filp, |
filp | 140 | fs/proc/root.c | nr = filp->f_pos; |
filp | 144 | fs/proc/root.c | filp->f_pos++; |
filp | 157 | 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 | 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 | 317 | include/linux/fs.h | extern int blkdev_open(struct inode * inode, struct file * filp); |
filp | 323 | 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 | 210 | include/linux/sched.h | struct file * filp[NR_OPEN]; |
filp | 226 | include/linux/tty.h | int (*open)(struct tty_struct * tty, struct file * filp); |
filp | 227 | include/linux/tty.h | void (*close)(struct tty_struct * tty, struct file * filp); |
filp | 374 | include/linux/tty.h | extern void tty_unhangup(struct file *filp); |
filp | 375 | include/linux/tty.h | extern int tty_hung_up_p(struct file * filp); |
filp | 385 | include/linux/tty.h | extern int rs_open(struct tty_struct * tty, struct file * filp); |
filp | 389 | include/linux/tty.h | extern int pty_open(struct tty_struct * tty, struct file * filp); |
filp | 393 | include/linux/tty.h | extern int con_open(struct tty_struct * tty, struct file * filp); |
filp | 363 | kernel/exit.c | if (current->filp[i]) |
filp | 200 | kernel/fork.c | if ((f = p->filp[i]) != NULL) |
filp | 201 | kernel/fork.c | p->filp[i] = copy_fd(f); |
filp | 204 | kernel/fork.c | if ((f = p->filp[i]) != NULL) |
filp | 147 | mm/mmap.c | if (fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 108 | net/socket.c | if (!current->filp[fd]) break; |
filp | 114 | net/socket.c | current->filp[fd] = file; |
filp | 162 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd])) return(NULL); |
filp | 542 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
filp | 564 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
filp | 590 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 645 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || (file=current->filp[fd]) == NULL) |
filp | 680 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
filp | 693 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || current->filp[fd] == NULL) |
filp | 710 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 729 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 748 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 767 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 787 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 806 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 823 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 833 | net/socket.c | sock_fcntl(struct file *filp, unsigned int cmd, unsigned long arg) |
filp | 837 | net/socket.c | sock = socki_lookup (filp->f_inode); |