taglinefilesource code
filp15fs/block_dev.cint block_write(struct inode * inode, struct file * filp, char * buf, int count)
filp17fs/block_dev.cint block = filp->f_pos >> BLOCK_SIZE_BITS;
filp18fs/block_dev.cint offset = filp->f_pos & (BLOCK_SIZE-1);
filp46fs/block_dev.cfilp->f_pos += chars;
filp59fs/block_dev.cint block_read(struct inode * inode, struct file * filp, char * buf, int count)
filp61fs/block_dev.cunsigned int block = filp->f_pos >> BLOCK_SIZE_BITS;
filp62fs/block_dev.cunsigned int offset = filp->f_pos & (BLOCK_SIZE-1);
filp86fs/block_dev.cfilp->f_pos += chars;
filp23fs/ext/blkdev.cstatic int blkdev_open(struct inode * inode, struct file * filp)
filp29fs/ext/blkdev.cfilp->f_op = blkdev_fops[i];
filp30fs/ext/blkdev.cif (filp->f_op && filp->f_op->open)
filp31fs/ext/blkdev.creturn filp->f_op->open(inode,filp);
filp23fs/ext/chrdev.cstatic int chrdev_open(struct inode * inode, struct file * filp)
filp29fs/ext/chrdev.cfilp->f_op = chrdev_fops[i];
filp30fs/ext/chrdev.cif (filp->f_op && filp->f_op->open)
filp31fs/ext/chrdev.creturn filp->f_op->open(inode,filp);
filp55fs/ext/dir.cstatic int ext_readdir(struct inode * inode, struct file * filp,
filp67fs/ext/dir.cwhile (filp->f_pos < inode->i_size) {
filp68fs/ext/dir.coffset = filp->f_pos & 1023;
filp69fs/ext/dir.cblock = ext_bmap(inode,(filp->f_pos)>>BLOCK_SIZE_BITS);
filp71fs/ext/dir.cfilp->f_pos += 1024-offset;
filp75fs/ext/dir.cwhile (offset < 1024 && filp->f_pos < inode->i_size) {
filp77fs/ext/dir.cfilp->f_pos += de->rec_len;
filp76fs/ext/file.cstatic int ext_file_read(struct inode * inode, struct file * filp, char * buf, int count)
filp91fs/ext/file.cif (filp->f_pos > inode->i_size)
filp94fs/ext/file.cleft = inode->i_size - filp->f_pos;
filp100fs/ext/file.cblock = filp->f_pos >> BLOCK_SIZE_BITS;
filp101fs/ext/file.coffset = filp->f_pos & (BLOCK_SIZE-1);
filp136fs/ext/file.cfilp->f_pos += chars;
filp160fs/ext/file.cstatic int ext_file_write(struct inode * inode, struct file * filp, char * buf, int count)
filp179fs/ext/file.cif (filp->f_flags & O_APPEND)
filp182fs/ext/file.cpos = filp->f_pos;
filp217fs/ext/file.cfilp->f_pos = pos;
filp190fs/ext/truncate.cvoid ext_release(struct inode * inode, struct file * filp)
filp20fs/fcntl.cif (fd >= NR_OPEN || !current->filp[fd])
filp25fs/fcntl.cif (current->filp[arg])
filp32fs/fcntl.c(current->filp[arg] = current->filp[fd])->f_count++;
filp38fs/fcntl.cif (oldfd >= NR_OPEN || !current->filp[oldfd])
filp53fs/fcntl.cstruct file * filp;
filp55fs/fcntl.cif (fd >= NR_OPEN || !(filp = current->filp[fd]))
filp69fs/fcntl.creturn filp->f_flags;
filp71fs/fcntl.cfilp->f_flags &= ~(O_APPEND | O_NONBLOCK);
filp72fs/fcntl.cfilp->f_flags |= arg & (O_APPEND | O_NONBLOCK);
filp16fs/fifo.cstatic int fifo_open(struct inode * inode,struct file * filp)
filp21fs/fifo.cswitch( filp->f_mode ) {
filp29fs/fifo.cfilp->f_op = &read_pipe_fops;
filp31fs/fifo.cif (!(filp->f_flags & O_NONBLOCK))
filp51fs/fifo.cif ((filp->f_flags & O_NONBLOCK) && !PIPE_READERS(*inode)) {
filp55fs/fifo.cfilp->f_op = &write_pipe_fops;
filp75fs/fifo.cfilp->f_op = &rdwr_pipe_fops;
filp16fs/ioctl.cstruct file * filp;
filp19fs/ioctl.cif (fd >= NR_OPEN || !(filp = current->filp[fd]))
filp21fs/ioctl.cif (S_ISREG(filp->f_inode->i_mode) && cmd == BMAP_IOCTL &&
filp22fs/ioctl.cfilp->f_inode->i_op->bmap) {
filp24fs/ioctl.cblock = filp->f_inode->i_op->bmap(filp->f_inode,block);
filp28fs/ioctl.cif (filp->f_op && filp->f_op->ioctl)
filp29fs/ioctl.creturn filp->f_op->ioctl(filp->f_inode, filp, cmd,arg);
filp17fs/minix/blkdev.cstatic int blkdev_open(struct inode * inode, struct file * filp)
filp23fs/minix/blkdev.cfilp->f_op = blkdev_fops[i];
filp24fs/minix/blkdev.cif (filp->f_op && filp->f_op->open)
filp25fs/minix/blkdev.creturn filp->f_op->open(inode,filp);
filp17fs/minix/chrdev.cstatic int chrdev_open(struct inode * inode, struct file * filp)
filp23fs/minix/chrdev.cfilp->f_op = chrdev_fops[i];
filp24fs/minix/chrdev.cif (filp->f_op && filp->f_op->open)
filp25fs/minix/chrdev.creturn filp->f_op->open(inode,filp);
filp49fs/minix/dir.cstatic int minix_readdir(struct inode * inode, struct file * filp,
filp59fs/minix/dir.cif (filp->f_pos & (sizeof (struct minix_dir_entry) - 1))
filp61fs/minix/dir.cwhile (filp->f_pos < inode->i_size) {
filp62fs/minix/dir.coffset = filp->f_pos & 1023;
filp63fs/minix/dir.cblock = minix_bmap(inode,(filp->f_pos)>>BLOCK_SIZE_BITS);
filp65fs/minix/dir.cfilp->f_pos += 1024-offset;
filp69fs/minix/dir.cwhile (offset < 1024 && filp->f_pos < inode->i_size) {
filp71fs/minix/dir.cfilp->f_pos += sizeof (struct minix_dir_entry);
filp76fs/minix/file.cint minix_file_read(struct inode * inode, struct file * filp, char * buf, int count)
filp91fs/minix/file.cif (filp->f_pos > inode->i_size)
filp94fs/minix/file.cleft = inode->i_size - filp->f_pos;
filp100fs/minix/file.cblock = filp->f_pos >> BLOCK_SIZE_BITS;
filp101fs/minix/file.coffset = filp->f_pos & (BLOCK_SIZE-1);
filp136fs/minix/file.cfilp->f_pos += chars;
filp160fs/minix/file.cstatic int minix_file_write(struct inode * inode, struct file * filp, char * buf, int count)
filp179fs/minix/file.cif (filp->f_flags & O_APPEND)
filp182fs/minix/file.cpos = filp->f_pos;
filp217fs/minix/file.cfilp->f_pos = pos;
filp147fs/minix/truncate.cvoid minix_release(struct inode * inode, struct file * filp)
filp17fs/msdos/dir.cstatic int msdos_dummy_read(struct inode *inode,struct file *filp,char *buf,
filp19fs/msdos/dir.cstatic int msdos_readdir(struct inode *inode,struct file *filp,
filp54fs/msdos/dir.cstatic int msdos_dummy_read(struct inode *inode,struct file *filp,char *buf,
filp67fs/msdos/dir.cstatic int msdos_readdir(struct inode *inode,struct file *filp,
filp78fs/msdos/dir.cif (filp->f_pos == 2) filp->f_pos = 0;
filp79fs/msdos/dir.celse if (filp->f_pos < 2) {
filp80fs/msdos/dir.cwalk = filp->f_pos++ ? ".." : ".";
filp89fs/msdos/dir.cif (filp->f_pos & (sizeof(struct msdos_dir_entry)-1)) return -ENOENT;
filp91fs/msdos/dir.cwhile ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) {
filp22fs/msdos/file.cstatic int msdos_file_read(struct inode *inode,struct file *filp,char *buf,
filp24fs/msdos/file.cstatic int msdos_file_write(struct inode *inode,struct file *filp,char *buf,
filp76fs/msdos/file.cstatic int msdos_file_read(struct inode *inode,struct file *filp,char *buf,
filp94fs/msdos/file.cif (filp->f_pos >= inode->i_size || count <= 0) return 0;
filp96fs/msdos/file.cwhile (left = MIN(inode->i_size-filp->f_pos,count-(buf-start))) {
filp97fs/msdos/file.cif (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS)))
filp99fs/msdos/file.coffset = filp->f_pos & (SECTOR_SIZE-1);
filp101fs/msdos/file.cfilp->f_pos += (size = MIN(SECTOR_SIZE-offset,left));
filp112fs/msdos/file.cfilp->f_pos = inode->i_size;
filp125fs/msdos/file.cstatic int msdos_file_write(struct inode *inode,struct file *filp,char *buf,
filp146fs/msdos/file.cif (filp->f_flags & O_APPEND) filp->f_pos = inode->i_size;
filp150fs/msdos/file.cwhile (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS)))
filp153fs/msdos/file.coffset = filp->f_pos & (SECTOR_SIZE-1);
filp160fs/msdos/file.cmemcpy_fromfs(data+(filp->f_pos & (SECTOR_SIZE-1)),
filp166fs/msdos/file.cto = data+(filp->f_pos & (SECTOR_SIZE-1));
filp185fs/msdos/file.cfilp->f_pos += written;
filp186fs/msdos/file.cif (filp->f_pos > inode->i_size) {
filp187fs/msdos/file.cinode->i_size = filp->f_pos;
filp55fs/open.cif (fd >= NR_OPEN || !(file = current->filp[fd]))
filp93fs/open.cif (fd >= NR_OPEN || !(file = current->filp[fd]))
filp219fs/open.cif (fd >= NR_OPEN || !(file = current->filp[fd]))
filp257fs/open.cif (fd >= NR_OPEN || !(file = current->filp[fd]))
filp304fs/open.cif (!current->filp[fd])
filp312fs/open.ccurrent->filp[fd] = f;
filp314fs/open.ccurrent->filp[fd]=NULL;
filp330fs/open.ccurrent->filp[fd]=NULL;
filp343fs/open.cstruct file * filp;
filp349fs/open.cif (!(filp = current->filp[fd]))
filp351fs/open.ccurrent->filp[fd] = NULL;
filp352fs/open.cif (filp->f_count == 0) {
filp356fs/open.cif (filp->f_count > 1) {
filp357fs/open.cfilp->f_count--;
filp360fs/open.cinode = filp->f_inode;
filp361fs/open.cif (filp->f_op && filp->f_op->release)
filp362fs/open.cfilp->f_op->release(inode,filp);
filp363fs/open.cfilp->f_count--;
filp364fs/open.cfilp->f_inode = NULL;
filp16fs/pipe.cstatic int pipe_read(struct inode * inode, struct file * filp, char * buf, int count)
filp20fs/pipe.cif (!(filp->f_flags & O_NONBLOCK))
filp46fs/pipe.cstatic int pipe_write(struct inode * inode, struct file * filp, char * buf, int count)
filp67fs/pipe.cif (filp->f_flags & O_NONBLOCK)
filp101fs/pipe.cstatic int bad_pipe_rw(struct inode * inode, struct file * filp, char * buf, int count)
filp106fs/pipe.cstatic int pipe_ioctl(struct inode *pino, struct file * filp,
filp119fs/pipe.cstatic int pipe_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait)
filp145fs/pipe.cstatic void pipe_read_release(struct inode * inode, struct file * filp)
filp151fs/pipe.cstatic void pipe_write_release(struct inode * inode, struct file * filp)
filp157fs/pipe.cstatic void pipe_rdwr_release(struct inode * inode, struct file * filp)
filp219fs/pipe.cif (!current->filp[i]) {
filp220fs/pipe.ccurrent->filp[ fd[j]=i ] = f[j];
filp224fs/pipe.ccurrent->filp[fd[0]]=NULL;
filp231fs/pipe.ccurrent->filp[fd[0]] = NULL;
filp232fs/pipe.ccurrent->filp[fd[1]] = NULL;
filp25fs/read_write.cif (fd >= NR_OPEN || !(file = current->filp[fd]) ||
filp40fs/read_write.cif (fd >= NR_OPEN || !(file=current->filp[fd]) || !(file->f_inode))
filp73fs/read_write.cif (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode))
filp90fs/read_write.cif (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode))
filp84fs/select.cif (!current->filp[i])
filp86fs/select.cif (!current->filp[i]->f_inode)
filp88fs/select.cif (current->filp[i]->f_inode->i_pipe)
filp90fs/select.cif (S_ISCHR(current->filp[i]->f_inode->i_mode))
filp92fs/select.cif (S_ISFIFO(current->filp[i]->f_inode->i_mode))
filp94fs/select.cif (S_ISSOCK(current->filp[i]->f_inode->i_mode))
filp105fs/select.cfile = current->filp[i];
filp131fs/stat.cif (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode))
filp142fs/stat.cif (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode))
filp80include/linux/ext_fs.hextern int ext_open(struct inode * inode, struct file * filp);
filp81include/linux/ext_fs.hextern void ext_release(struct inode * inode, struct file * filp);
filp47include/linux/minix_fs.hextern int minix_open(struct inode * inode, struct file * filp);
filp48include/linux/minix_fs.hextern void minix_release(struct inode * inode, struct file * filp);
filp162include/linux/sched.hstruct file * filp[NR_OPEN];
filp244include/linux/tty.hextern int  serial_open(unsigned int line, struct file * filp);
filp245include/linux/tty.hextern void serial_close(unsigned int line, struct file * filp);
filp253include/linux/tty.hextern int  pty_open(unsigned int dev, struct file * filp);
filp254include/linux/tty.hextern void pty_close(unsigned int dev, struct file * filp);
filp1002kernel/blk_drv/floppy.cstatic int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
filp1140kernel/blk_drv/floppy.cstatic int floppy_open(struct inode * inode, struct file * filp)
filp1154kernel/blk_drv/floppy.cif (filp && filp->f_mode)
filp1159kernel/blk_drv/floppy.cstatic void floppy_release(struct inode * inode, struct file * filp)
filp23kernel/chr_drv/pty.cint pty_open(unsigned int dev, struct file * filp)
filp31kernel/chr_drv/pty.cif (filp->f_flags & O_NDELAY)
filp40kernel/chr_drv/pty.cvoid pty_close(unsigned int dev, struct file * filp)
filp285kernel/chr_drv/serial.cvoid serial_close(unsigned line, struct file * filp)
filp367kernel/chr_drv/serial.cint serial_open(unsigned line, struct file * filp)
filp502kernel/chr_drv/tty_io.cstatic int tty_open(struct inode * inode, struct file * filp)
filp514kernel/chr_drv/tty_io.cfilp->f_rdev = 0x0400 | dev;
filp529kernel/chr_drv/tty_io.cif (!(filp->f_flags & O_NOCTTY) &&
filp538kernel/chr_drv/tty_io.cretval = serial_open(dev-64,filp);
filp540kernel/chr_drv/tty_io.cretval = pty_open(dev,filp);
filp554kernel/chr_drv/tty_io.cstatic void tty_release(struct inode * inode, struct file * filp)
filp559kernel/chr_drv/tty_io.cdev = filp->f_rdev;
filp564kernel/chr_drv/tty_io.cdev = MINOR(filp->f_rdev);
filp573kernel/chr_drv/tty_io.cserial_close(dev-64,filp);
filp575kernel/chr_drv/tty_io.cpty_close(dev,filp);
filp583kernel/chr_drv/tty_io.cstatic int tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait)
filp588kernel/chr_drv/tty_io.cdev = filp->f_rdev;
filp593kernel/chr_drv/tty_io.cdev = MINOR(filp->f_rdev);
filp303kernel/exit.cif (current->filp[i])
filp177kernel/fork.cif (f=p->filp[i])
filp101mm/mmap.cif (fd >= NR_OPEN || fd < 0 || !(file = current->filp[fd]))
filp83net/socket.cif (!current->filp[fd])
filp93net/socket.ccurrent->filp[fd] = file;
filp111net/socket.ccurrent->filp[fd]->f_inode = NULL;  /* safe from iput */
filp131net/socket.cif (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd]))