tag | line | file | source code |
filp | 16 | fs/block_dev.c | int block_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 18 | fs/block_dev.c | int block = filp->f_pos >> BLOCK_SIZE_BITS; |
filp | 19 | fs/block_dev.c | int offset = filp->f_pos & (BLOCK_SIZE-1); |
filp | 47 | fs/block_dev.c | filp->f_pos += chars; |
filp | 62 | fs/block_dev.c | int block_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 77 | fs/block_dev.c | offset = filp->f_pos; |
filp | 97 | fs/block_dev.c | if (filp->f_reada) { |
filp | 151 | fs/block_dev.c | filp->f_pos += chars; |
filp | 176 | fs/block_dev.c | filp->f_reada = 1; |
filp | 49 | fs/devices.c | int blkdev_open(struct inode * inode, struct file * filp) |
filp | 56 | fs/devices.c | filp->f_op = blkdev_fops[i]; |
filp | 57 | fs/devices.c | if (filp->f_op->open) |
filp | 58 | fs/devices.c | return filp->f_op->open(inode,filp); |
filp | 100 | fs/devices.c | int chrdev_open(struct inode * inode, struct file * filp) |
filp | 107 | fs/devices.c | filp->f_op = chrdev_fops[i]; |
filp | 108 | fs/devices.c | if (filp->f_op->open) |
filp | 109 | fs/devices.c | return filp->f_op->open(inode,filp); |
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 | 160 | fs/ext/file.c | filp->f_pos += chars; |
filp | 185 | fs/ext/file.c | filp->f_reada = 1; |
filp | 193 | fs/ext/file.c | static int ext_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 212 | fs/ext/file.c | if (filp->f_flags & O_APPEND) |
filp | 215 | fs/ext/file.c | pos = filp->f_pos; |
filp | 252 | 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 | 93 | 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 | bh = ext2_bread (inode, (filp->f_pos) >> EXT2_BLOCK_SIZE_BITS(sb), 0, &err); |
filp | 108 | fs/ext2/dir.c | filp->f_pos += sb->s_blocksize - offset; |
filp | 112 | fs/ext2/dir.c | while (offset < sb->s_blocksize && filp->f_pos < inode->i_size) { |
filp | 119 | fs/ext2/dir.c | filp->f_pos += de->rec_len; |
filp | 72 | fs/ext2/file.c | /* static */ int ext2_file_read (struct inode * inode, struct file * filp, |
filp | 93 | fs/ext2/file.c | offset = filp->f_pos; |
filp | 109 | fs/ext2/file.c | if (filp->f_reada) { |
filp | 164 | fs/ext2/file.c | filp->f_pos += chars; |
filp | 190 | fs/ext2/file.c | filp->f_reada = 1; |
filp | 198 | fs/ext2/file.c | static int ext2_file_write (struct inode * inode, struct file * filp, |
filp | 221 | fs/ext2/file.c | if (filp->f_flags & O_APPEND) |
filp | 224 | fs/ext2/file.c | pos = filp->f_pos; |
filp | 264 | fs/ext2/file.c | filp->f_pos = pos; |
filp | 11 | fs/ext2/ioctl.c | int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, |
filp | 281 | 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 | 71 | fs/fcntl.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
filp | 85 | fs/fcntl.c | return filp->f_flags; |
filp | 87 | fs/fcntl.c | filp->f_flags &= ~(O_APPEND | O_NONBLOCK); |
filp | 88 | fs/fcntl.c | filp->f_flags |= arg & (O_APPEND | O_NONBLOCK); |
filp | 98 | fs/fcntl.c | if (S_ISSOCK (filp->f_inode->i_mode)) |
filp | 100 | fs/fcntl.c | return (sock_fcntl (filp, cmd, arg)); |
filp | 16 | fs/fifo.c | static int fifo_open(struct inode * inode,struct file * filp) |
filp | 21 | fs/fifo.c | switch( filp->f_mode ) { |
filp | 29 | fs/fifo.c | filp->f_op = &read_pipe_fops; |
filp | 32 | fs/fifo.c | if (!(filp->f_flags & O_NONBLOCK) && !PIPE_WRITERS(*inode)) { |
filp | 60 | fs/fifo.c | if ((filp->f_flags & O_NONBLOCK) && !PIPE_READERS(*inode)) { |
filp | 64 | fs/fifo.c | filp->f_op = &write_pipe_fops; |
filp | 92 | fs/fifo.c | filp->f_op = &rdwr_pipe_fops; |
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 | 63 | fs/isofs/dir.c | static int isofs_readdir(struct inode * inode, struct file * filp, |
filp | 79 | fs/isofs/dir.c | offset = filp->f_pos & (BLOCK_SIZE - 1); |
filp | 80 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>>BLOCK_SIZE_BITS); |
filp | 84 | fs/isofs/dir.c | while (filp->f_pos < inode->i_size) { |
filp | 86 | fs/isofs/dir.c | printk("Block, offset: %x %x %x\n",block, offset, filp->f_pos); |
filp | 97 | fs/isofs/dir.c | filp->f_pos =(filp->f_pos & ~(ISOFS_BLOCK_SIZE - 1))+ISOFS_BLOCK_SIZE; |
filp | 98 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>>BLOCK_SIZE_BITS); |
filp | 110 | fs/isofs/dir.c | filp->f_pos += *((unsigned char*) de); |
filp | 116 | fs/isofs/dir.c | offset = filp->f_pos & (BLOCK_SIZE - 1); |
filp | 117 | fs/isofs/dir.c | block = isofs_bmap(inode,(filp->f_pos)>>BLOCK_SIZE_BITS); |
filp | 113 | fs/isofs/file.c | static int isofs_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 133 | fs/isofs/file.c | if (filp->f_pos > inode->i_size) |
filp | 136 | fs/isofs/file.c | left = inode->i_size - filp->f_pos; |
filp | 142 | fs/isofs/file.c | block = filp->f_pos >> ISOFS_BUFFER_BITS; |
filp | 143 | fs/isofs/file.c | offset = filp->f_pos & (ISOFS_BUFFER_SIZE-1); |
filp | 185 | fs/isofs/file.c | if(blocks == 0 && bhrequest && filp->f_reada && bhb != bhe) { |
filp | 227 | fs/isofs/file.c | filp->f_pos += chars; |
filp | 256 | fs/isofs/file.c | filp->f_reada = 1; |
filp | 23 | fs/locks.c | static int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l); |
filp | 26 | fs/locks.c | static int lock_it(struct file *filp, struct file_lock *caller); |
filp | 27 | fs/locks.c | static int unlock_it(struct file *filp, struct file_lock *caller); |
filp | 28 | fs/locks.c | static struct file_lock *alloc_lock(struct file *filp, struct file_lock *template); |
filp | 29 | fs/locks.c | static void free_lock(struct file *filp, struct file_lock *fl); |
filp | 55 | fs/locks.c | struct file *filp; |
filp | 58 | fs/locks.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
filp | 66 | fs/locks.c | if (!copy_flock(filp, &file_lock, &flock)) |
filp | 69 | fs/locks.c | for (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) { |
filp | 94 | fs/locks.c | struct file *filp; |
filp | 102 | fs/locks.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) |
filp | 108 | fs/locks.c | if (!copy_flock(filp, &file_lock, &flock)) |
filp | 112 | fs/locks.c | if (!(filp->f_mode & 1)) |
filp | 116 | fs/locks.c | if (!(filp->f_mode & 2)) |
filp | 120 | fs/locks.c | if (!(filp->f_mode & 3)) |
filp | 125 | fs/locks.c | if (!(filp->f_mode & 3)) |
filp | 138 | fs/locks.c | return unlock_it(filp, &file_lock); |
filp | 145 | fs/locks.c | for (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) { |
filp | 168 | fs/locks.c | return lock_it(filp, &file_lock); |
filp | 175 | fs/locks.c | void fcntl_remove_locks(struct task_struct *task, struct file *filp) |
filp | 179 | fs/locks.c | for (fl = filp->f_inode->i_flock; fl != NULL; ) { |
filp | 186 | fs/locks.c | free_lock(filp, fl); |
filp | 196 | fs/locks.c | static int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l) |
filp | 200 | fs/locks.c | if (!filp->f_inode) /* just in case */ |
filp | 202 | fs/locks.c | if (!S_ISREG(filp->f_inode->i_mode)) |
filp | 209 | fs/locks.c | case 1 /*SEEK_CUR*/ : start = filp->f_pos; break; |
filp | 210 | fs/locks.c | case 2 /*SEEK_END*/ : start = filp->f_inode->i_size; break; |
filp | 267 | fs/locks.c | static int lock_it(struct file *filp, struct file_lock *caller) |
filp | 279 | fs/locks.c | if ((caller = alloc_lock(filp, caller)) == NULL) |
filp | 286 | fs/locks.c | for (fl = filp->f_inode->i_flock; fl != NULL; fl = fl->fl_next) { |
filp | 299 | fs/locks.c | free_lock(filp, caller); |
filp | 304 | fs/locks.c | free_lock(filp, caller); |
filp | 321 | fs/locks.c | if ((new = alloc_lock(filp, fl)) == NULL) { |
filp | 322 | fs/locks.c | free_lock(filp, caller); |
filp | 333 | fs/locks.c | free_lock(filp, fl); |
filp | 344 | fs/locks.c | free_lock(filp, caller); |
filp | 358 | fs/locks.c | free_lock(filp, caller); |
filp | 380 | fs/locks.c | static int unlock_it(struct file *filp, struct file_lock *caller) |
filp | 385 | fs/locks.c | for (fl = filp->f_inode->i_flock; fl != NULL; ) { |
filp | 396 | fs/locks.c | if ((next = alloc_lock(filp, fl)) == NULL) |
filp | 421 | fs/locks.c | free_lock(filp, fl); |
filp | 437 | fs/locks.c | static struct file_lock *alloc_lock(struct file *filp, struct file_lock *template) |
filp | 451 | fs/locks.c | new->fl_next = filp->f_inode->i_flock; /* insert into file's list */ |
filp | 452 | fs/locks.c | filp->f_inode->i_flock = new; |
filp | 465 | fs/locks.c | static void free_lock(struct file *filp, struct file_lock *fl) |
filp | 477 | fs/locks.c | for (fl_p = &filp->f_inode->i_flock; *fl_p != NULL; fl_p = &(*fl_p)->fl_next) { |
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 | 154 | fs/minix/file.c | filp->f_pos += chars; |
filp | 179 | fs/minix/file.c | filp->f_reada = 1; |
filp | 187 | fs/minix/file.c | static int minix_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 206 | fs/minix/file.c | if (filp->f_flags & O_APPEND) |
filp | 209 | fs/minix/file.c | pos = filp->f_pos; |
filp | 245 | 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 | 129 | fs/msdos/file.c | static int msdos_file_write(struct inode *inode,struct file *filp,char *buf, |
filp | 150 | fs/msdos/file.c | if (filp->f_flags & O_APPEND) filp->f_pos = inode->i_size; |
filp | 154 | fs/msdos/file.c | while (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS))) |
filp | 160 | fs/msdos/file.c | offset = filp->f_pos & (SECTOR_SIZE-1); |
filp | 167 | fs/msdos/file.c | memcpy_fromfs(data+(filp->f_pos & (SECTOR_SIZE-1)), |
filp | 173 | fs/msdos/file.c | to = data+(filp->f_pos & (SECTOR_SIZE-1)); |
filp | 192 | fs/msdos/file.c | filp->f_pos += written; |
filp | 193 | fs/msdos/file.c | if (filp->f_pos > inode->i_size) { |
filp | 194 | fs/msdos/file.c | inode->i_size = filp->f_pos; |
filp | 20 | fs/nfs/dir.c | static int nfs_dir_read(struct inode *, struct file *filp, char *buf, |
filp | 71 | fs/nfs/dir.c | static int nfs_dir_read(struct inode *inode, struct file *filp, char *buf, |
filp | 85 | fs/nfs/dir.c | static int nfs_readdir(struct inode *inode, struct file *filp, |
filp | 118 | fs/nfs/dir.c | if (filp->f_pos == c_entry[i].cookie) { |
filp | 134 | fs/nfs/dir.c | filp->f_pos, NFS_READDIR_CACHE_SIZE, c_entry); |
filp | 154 | fs/nfs/dir.c | filp->f_pos = entry->cookie; |
filp | 21 | fs/nfs/inode.c | extern int close_fp(struct file *filp); |
filp | 65 | fs/nfs/inode.c | struct file *filp; |
filp | 78 | fs/nfs/inode.c | if (fd >= NR_OPEN || !(filp = current->filp[fd])) { |
filp | 83 | fs/nfs/inode.c | if (!S_ISSOCK(filp->f_inode->i_mode)) { |
filp | 88 | fs/nfs/inode.c | filp->f_count++; |
filp | 95 | 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 | 361 | fs/open.c | if (!current->filp[fd]) |
filp | 369 | fs/open.c | current->filp[fd] = f; |
filp | 382 | fs/open.c | current->filp[fd]=NULL; |
filp | 392 | fs/open.c | current->filp[fd] = NULL; |
filp | 409 | fs/open.c | current->filp[fd]=NULL; |
filp | 422 | fs/open.c | int close_fp(struct file *filp) |
filp | 426 | fs/open.c | if (filp->f_count == 0) { |
filp | 430 | fs/open.c | inode = filp->f_inode; |
filp | 432 | fs/open.c | fcntl_remove_locks(current, filp); |
filp | 433 | fs/open.c | if (filp->f_count > 1) { |
filp | 434 | fs/open.c | filp->f_count--; |
filp | 437 | fs/open.c | if (filp->f_op && filp->f_op->release) |
filp | 438 | fs/open.c | filp->f_op->release(inode,filp); |
filp | 439 | fs/open.c | filp->f_count--; |
filp | 440 | fs/open.c | filp->f_inode = NULL; |
filp | 447 | fs/open.c | struct file * filp; |
filp | 452 | fs/open.c | if (!(filp = current->filp[fd])) |
filp | 454 | fs/open.c | current->filp[fd] = NULL; |
filp | 455 | fs/open.c | return (close_fp (filp)); |
filp | 16 | fs/pipe.c | static int pipe_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 20 | fs/pipe.c | if (!(filp->f_flags & O_NONBLOCK)) |
filp | 50 | fs/pipe.c | static int pipe_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 71 | fs/pipe.c | if (filp->f_flags & O_NONBLOCK) |
filp | 105 | fs/pipe.c | static int bad_pipe_rw(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 110 | fs/pipe.c | static int pipe_ioctl(struct inode *pino, struct file * filp, |
filp | 126 | fs/pipe.c | static int pipe_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 152 | fs/pipe.c | static void pipe_read_release(struct inode * inode, struct file * filp) |
filp | 158 | fs/pipe.c | static void pipe_write_release(struct inode * inode, struct file * filp) |
filp | 164 | fs/pipe.c | static void pipe_rdwr_release(struct inode * inode, struct file * filp) |
filp | 234 | fs/pipe.c | if (!current->filp[i]) { |
filp | 235 | fs/pipe.c | current->filp[ fd[j]=i ] = f[j]; |
filp | 239 | fs/pipe.c | current->filp[fd[0]]=NULL; |
filp | 246 | fs/pipe.c | current->filp[fd[0]] = NULL; |
filp | 247 | fs/pipe.c | current->filp[fd[1]] = NULL; |
filp | 131 | fs/proc/base.c | static int proc_readbase(struct inode * inode, struct file * filp, |
filp | 147 | fs/proc/base.c | if (((unsigned) filp->f_pos) < NR_BASE_DIRENTRY) { |
filp | 148 | fs/proc/base.c | de = base_dir + filp->f_pos; |
filp | 149 | 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 | 121 | fs/proc/fd.c | static int proc_readfd(struct inode * inode, struct file * filp, |
filp | 137 | fs/proc/fd.c | fd = filp->f_pos; |
filp | 138 | fs/proc/fd.c | filp->f_pos++; |
filp | 161 | fs/proc/fd.c | if (!p->filp[fd] || !p->filp[fd]->f_inode) |
filp | 149 | 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 | 123 | fs/proc/root.c | static int proc_readroot(struct inode * inode, struct file * filp, |
filp | 133 | fs/proc/root.c | nr = filp->f_pos; |
filp | 137 | fs/proc/root.c | filp->f_pos++; |
filp | 150 | 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 | 120 | fs/select.c | if (FD_ISSET(i,in) && check(SEL_IN,wait,current->filp[i])) { |
filp | 125 | fs/select.c | if (FD_ISSET(i,out) && check(SEL_OUT,wait,current->filp[i])) { |
filp | 130 | fs/select.c | if (FD_ISSET(i,ex) && check(SEL_EX,wait,current->filp[i])) { |
filp | 151 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
filp | 166 | 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 | 152 | fs/xiafs/file.c | filp->f_pos += chars; |
filp | 177 | fs/xiafs/file.c | filp->f_reada = 1; |
filp | 186 | fs/xiafs/file.c | xiafs_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 205 | fs/xiafs/file.c | if (filp->f_flags & O_APPEND) |
filp | 208 | fs/xiafs/file.c | pos = filp->f_pos; |
filp | 244 | 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 | 313 | include/linux/fs.h | extern int blkdev_open(struct inode * inode, struct file * filp); |
filp | 318 | include/linux/fs.h | extern int chrdev_open(struct inode * inode, struct file * filp); |
filp | 156 | include/linux/iso_fs.h | extern int isofs_open(struct inode * inode, struct file * filp); |
filp | 157 | include/linux/iso_fs.h | extern void isofs_release(struct inode * inode, struct file * filp); |
filp | 203 | include/linux/sched.h | struct file * filp[NR_OPEN]; |
filp | 213 | include/linux/tty.h | int (*open)(struct tty_struct * tty, struct file * filp); |
filp | 214 | include/linux/tty.h | void (*close)(struct tty_struct * tty, struct file * filp); |
filp | 352 | include/linux/tty.h | extern void tty_unhangup(struct file *filp); |
filp | 353 | include/linux/tty.h | extern int tty_hung_up_p(struct file * filp); |
filp | 363 | include/linux/tty.h | extern int rs_open(struct tty_struct * tty, struct file * filp); |
filp | 367 | include/linux/tty.h | extern int pty_open(struct tty_struct * tty, struct file * filp); |
filp | 371 | include/linux/tty.h | extern int con_open(struct tty_struct * tty, struct file * filp); |
filp | 1033 | kernel/blk_drv/floppy.c | static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, |
filp | 1189 | kernel/blk_drv/floppy.c | static int floppy_open(struct inode * inode, struct file * filp) |
filp | 1204 | kernel/blk_drv/floppy.c | if (filp && filp->f_mode) |
filp | 1209 | kernel/blk_drv/floppy.c | static void floppy_release(struct inode * inode, struct file * filp) |
filp | 551 | kernel/blk_drv/hd.c | static int hd_open(struct inode * inode, struct file * filp) |
filp | 59 | kernel/blk_drv/scsi/sd.c | static int sd_open(struct inode * inode, struct file * filp) |
filp | 257 | kernel/blk_drv/scsi/sr.c | static int sr_open(struct inode * inode, struct file * filp) |
filp | 254 | kernel/blk_drv/scsi/st.c | static int flush_buffer(struct inode * inode, struct file * filp, |
filp | 273 | kernel/blk_drv/scsi/st.c | result = st_int_ioctl(inode, filp, MTBSR, backspace); |
filp | 285 | kernel/blk_drv/scsi/st.c | static int scsi_tape_open(struct inode * inode, struct file * filp) |
filp | 314 | kernel/blk_drv/scsi/st.c | flags = filp->f_flags; |
filp | 444 | kernel/blk_drv/scsi/st.c | if (st_int_ioctl(inode, filp, MTSETBLK, ST_BLOCK_SIZE)) { |
filp | 480 | kernel/blk_drv/scsi/st.c | static void scsi_tape_close(struct inode * inode, struct file * filp) |
filp | 497 | kernel/blk_drv/scsi/st.c | printk("st%d: File length %d bytes.\n", dev, filp->f_pos); |
filp | 529 | kernel/blk_drv/scsi/st.c | st_int_ioctl(inode, filp, MTBSF, 1); /* Back over the EOF hit */ |
filp | 531 | kernel/blk_drv/scsi/st.c | flush_buffer(inode, filp, 0); |
filp | 536 | kernel/blk_drv/scsi/st.c | st_int_ioctl(inode, filp, MTREW, 1); |
filp | 546 | kernel/blk_drv/scsi/st.c | int st_write(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 566 | kernel/blk_drv/scsi/st.c | retval = flush_buffer(inode, filp, 0); |
filp | 636 | kernel/blk_drv/scsi/st.c | filp->f_pos += do_count; |
filp | 646 | kernel/blk_drv/scsi/st.c | filp->f_pos += count; |
filp | 685 | kernel/blk_drv/scsi/st.c | int st_read(struct inode * inode, struct file * filp, char * buf, int count) |
filp | 702 | kernel/blk_drv/scsi/st.c | transfer = flush_buffer(inode, filp, 0); |
filp | 822 | kernel/blk_drv/scsi/st.c | filp->f_pos += transfer; |
filp | 1497 | kernel/chr_drv/console.c | int con_open(struct tty_struct *tty, struct file * filp) |
filp | 316 | kernel/chr_drv/mem.c | static int memory_open(struct inode * inode, struct file * filp) |
filp | 320 | kernel/chr_drv/mem.c | filp->f_op = &ram_fops; |
filp | 323 | kernel/chr_drv/mem.c | filp->f_op = &mem_fops; |
filp | 326 | kernel/chr_drv/mem.c | filp->f_op = &kmem_fops; |
filp | 329 | kernel/chr_drv/mem.c | filp->f_op = &null_fops; |
filp | 332 | kernel/chr_drv/mem.c | filp->f_op = &port_fops; |
filp | 335 | kernel/chr_drv/mem.c | filp->f_op = &zero_fops; |
filp | 338 | kernel/chr_drv/mem.c | filp->f_op = &core_fops; |
filp | 343 | kernel/chr_drv/mem.c | if (filp->f_op && filp->f_op->open) |
filp | 344 | kernel/chr_drv/mem.c | return filp->f_op->open(inode,filp); |
filp | 24 | kernel/chr_drv/pty.c | static void pty_close(struct tty_struct * tty, struct file * filp) |
filp | 74 | kernel/chr_drv/pty.c | int pty_open(struct tty_struct *tty, struct file * filp) |
filp | 81 | kernel/chr_drv/pty.c | if (filp->f_flags & O_NDELAY) |
filp | 1070 | kernel/chr_drv/serial.c | static void rs_close(struct tty_struct *tty, struct file * filp) |
filp | 1123 | kernel/chr_drv/serial.c | static int block_til_ready(struct tty_struct *tty, struct file * filp, |
filp | 1133 | kernel/chr_drv/serial.c | if (MAJOR(filp->f_rdev) == 5) { |
filp | 1144 | kernel/chr_drv/serial.c | if (filp->f_flags & O_NONBLOCK) { |
filp | 1170 | kernel/chr_drv/serial.c | if (tty_hung_up_p(filp)) { |
filp | 1211 | kernel/chr_drv/serial.c | int rs_open(struct tty_struct *tty, struct file * filp) |
filp | 1269 | kernel/chr_drv/serial.c | retval = block_til_ready(tty, filp, info); |
filp | 179 | kernel/chr_drv/tty_io.c | static int hung_up_tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 233 | kernel/chr_drv/tty_io.c | struct file * filp; |
filp | 240 | kernel/chr_drv/tty_io.c | filp = file_table + NR_FILE; |
filp | 241 | kernel/chr_drv/tty_io.c | while (filp-- > file_table) { |
filp | 242 | kernel/chr_drv/tty_io.c | if (!filp->f_count) |
filp | 244 | kernel/chr_drv/tty_io.c | if (filp->f_rdev != dev) |
filp | 246 | kernel/chr_drv/tty_io.c | if (filp->f_inode && filp->f_inode->i_rdev == 0x0400) |
filp | 248 | kernel/chr_drv/tty_io.c | if (filp->f_op != &tty_fops) |
filp | 250 | kernel/chr_drv/tty_io.c | filp->f_op = fops; |
filp | 275 | kernel/chr_drv/tty_io.c | void tty_unhangup(struct file *filp) |
filp | 277 | kernel/chr_drv/tty_io.c | filp->f_op = &tty_fops; |
filp | 280 | kernel/chr_drv/tty_io.c | inline int tty_hung_up_p(struct file * filp) |
filp | 282 | kernel/chr_drv/tty_io.c | return ((filp->f_op == &hung_up_tty_fops) || |
filp | 283 | kernel/chr_drv/tty_io.c | (filp->f_op == &vhung_up_tty_fops)); |
filp | 1083 | kernel/chr_drv/tty_io.c | static void release_dev(int dev, struct file * filp) |
filp | 1119 | kernel/chr_drv/tty_io.c | tty->close(tty, filp); |
filp | 1181 | kernel/chr_drv/tty_io.c | static int tty_open(struct inode * inode, struct file * filp) |
filp | 1189 | kernel/chr_drv/tty_io.c | noctty = filp->f_flags & O_NOCTTY; |
filp | 1209 | kernel/chr_drv/tty_io.c | filp->f_rdev = (major << 8) | minor; |
filp | 1227 | kernel/chr_drv/tty_io.c | retval = tty->open(tty, filp); |
filp | 1232 | kernel/chr_drv/tty_io.c | release_dev(minor, filp); |
filp | 1243 | kernel/chr_drv/tty_io.c | filp->f_rdev = 0x0400 | minor; /* Set it to something normal */ |
filp | 1252 | kernel/chr_drv/tty_io.c | static void tty_release(struct inode * inode, struct file * filp) |
filp | 1256 | kernel/chr_drv/tty_io.c | dev = filp->f_rdev; |
filp | 1261 | kernel/chr_drv/tty_io.c | dev = MINOR(filp->f_rdev); |
filp | 1266 | kernel/chr_drv/tty_io.c | release_dev(dev, filp); |
filp | 1269 | kernel/chr_drv/tty_io.c | static int tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
filp | 1274 | kernel/chr_drv/tty_io.c | dev = filp->f_rdev; |
filp | 1279 | kernel/chr_drv/tty_io.c | dev = MINOR(filp->f_rdev); |
filp | 1333 | kernel/chr_drv/tty_io.c | struct file *filp; |
filp | 1345 | kernel/chr_drv/tty_io.c | filp = (*p)->filp[i]; |
filp | 1346 | kernel/chr_drv/tty_io.c | if (filp && (filp->f_op == &tty_fops) && |
filp | 1347 | kernel/chr_drv/tty_io.c | (MINOR(filp->f_rdev) == line)) { |
filp | 336 | kernel/exit.c | if (current->filp[i]) |
filp | 141 | kernel/fork.c | if ((f = p->filp[i]) != NULL) |
filp | 51 | mm/mmap.c | if (fd >= NR_OPEN || fd < 0 || !(file = current->filp[fd])) |
filp | 92 | net/socket.c | if (!current->filp[fd]) |
filp | 99 | net/socket.c | current->filp[fd] = file; |
filp | 139 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || !(file = current->filp[fd])) |
filp | 688 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 709 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 731 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 752 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 775 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 794 | net/socket.c | if (fd < 0 || fd >= NR_OPEN || ((file = current->filp[fd]) == NULL)) |
filp | 815 | net/socket.c | file = current->filp[fd]; |
filp | 827 | net/socket.c | sock_fcntl(struct file *filp, unsigned int cmd, unsigned long arg) |
filp | 830 | net/socket.c | sock = socki_lookup (filp->f_inode); |