tag | line | file | source code |
inode | 15 | fs/block_dev.c | int block_write(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 26 | fs/block_dev.c | dev = inode->i_rdev; |
inode | 59 | fs/block_dev.c | int block_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 70 | fs/block_dev.c | dev = inode->i_rdev; |
inode | 50 | fs/exec.c | while (file.f_op->write(inode,&file,(char *)(addr),(nr)) != (nr)) goto close_coredump |
inode | 54 | fs/exec.c | if (file.f_op->lseek(inode,&file,(offset),0) != (offset)) \ |
inode | 69 | fs/exec.c | struct inode * inode = NULL; |
inode | 83 | fs/exec.c | if (open_namei("core",O_CREAT | O_WRONLY | O_TRUNC,0600,&inode)) |
inode | 85 | fs/exec.c | if (!S_ISREG(inode->i_mode)) |
inode | 87 | fs/exec.c | if (!inode->i_op || !inode->i_op->default_file_ops) |
inode | 92 | fs/exec.c | file.f_inode = inode; |
inode | 95 | fs/exec.c | file.f_op = inode->i_op->default_file_ops; |
inode | 97 | fs/exec.c | if (file.f_op->open(inode,&file)) |
inode | 153 | fs/exec.c | file.f_op->release(inode,&file); |
inode | 156 | fs/exec.c | iput(inode); |
inode | 169 | fs/exec.c | struct inode * inode; |
inode | 178 | fs/exec.c | inode = namei(library); |
inode | 180 | fs/exec.c | inode = NULL; |
inode | 181 | fs/exec.c | if (!inode) |
inode | 183 | fs/exec.c | if (!inode->i_sb || !S_ISREG(inode->i_mode) || !permission(inode,MAY_READ)) { |
inode | 184 | fs/exec.c | iput(inode); |
inode | 187 | fs/exec.c | if (!(bh = bread(inode->i_dev,bmap(inode,0),inode->i_sb->s_blocksize))) { |
inode | 188 | fs/exec.c | iput(inode); |
inode | 191 | fs/exec.c | if (!IS_RDONLY(inode)) { |
inode | 192 | fs/exec.c | inode->i_atime = CURRENT_TIME; |
inode | 193 | fs/exec.c | inode->i_dirt = 1; |
inode | 199 | fs/exec.c | inode->i_size < ex.a_text+ex.a_data+ex.a_syms+N_TXTOFF(ex)) { |
inode | 200 | fs/exec.c | iput(inode); |
inode | 203 | fs/exec.c | current->libraries[libnum].library = inode; |
inode | 354 | fs/exec.c | static void read_omagic(struct inode *inode, int bytes) |
inode | 362 | fs/exec.c | if (inode->i_sb) |
inode | 363 | fs/exec.c | block_size = inode->i_sb->s_blocksize; |
inode | 365 | fs/exec.c | if (!(blkno = bmap(inode, blk))) |
inode | 367 | fs/exec.c | if (!(bh = bread(inode->i_dev, blkno, block_size))) |
inode | 380 | fs/exec.c | iput(inode); |
inode | 393 | fs/exec.c | struct inode * inode; |
inode | 408 | fs/exec.c | if (!(inode=namei(filename))) /* get executables inode */ |
inode | 414 | fs/exec.c | if (!S_ISREG(inode->i_mode)) { /* must be regular file */ |
inode | 418 | fs/exec.c | if (IS_NOEXEC(inode)) { /* FS mustn't be mounted noexec */ |
inode | 422 | fs/exec.c | if (!inode->i_sb) { |
inode | 426 | fs/exec.c | i = inode->i_mode; |
inode | 427 | fs/exec.c | if (IS_NOSUID(inode) && (((i & S_ISUID) && inode->i_uid != current-> |
inode | 428 | fs/exec.c | euid) || ((i & S_ISGID) && inode->i_gid != current->egid)) && |
inode | 438 | fs/exec.c | e_uid = (i & S_ISUID) ? inode->i_uid : current->euid; |
inode | 439 | fs/exec.c | e_gid = (i & S_ISGID) ? inode->i_gid : current->egid; |
inode | 441 | fs/exec.c | if (current->euid == inode->i_uid) |
inode | 443 | fs/exec.c | else if (in_group_p(inode->i_gid)) |
inode | 446 | fs/exec.c | !((inode->i_mode & 0111) && suser())) { |
inode | 450 | fs/exec.c | if (!(bh = bread(inode->i_dev,bmap(inode,0),inode->i_sb->s_blocksize))) { |
inode | 454 | fs/exec.c | if (!IS_RDONLY(inode)) { |
inode | 455 | fs/exec.c | inode->i_atime = CURRENT_TIME; |
inode | 456 | fs/exec.c | inode->i_dirt = 1; |
inode | 470 | fs/exec.c | iput(inode); |
inode | 523 | fs/exec.c | if (!(inode=namei(interp))) { /* get executables inode */ |
inode | 535 | fs/exec.c | inode->i_size < ex.a_text+ex.a_data+ex.a_syms+N_TXTOFF(ex)) { |
inode | 570 | fs/exec.c | !permission(inode,MAY_READ)) |
inode | 573 | fs/exec.c | current->executable = inode; |
inode | 601 | fs/exec.c | read_omagic(inode, ex.a_text+ex.a_data); |
inode | 608 | fs/exec.c | iput(inode); |
inode | 157 | fs/ext/bitmap.c | void ext_free_inode(struct inode * inode) |
inode | 161 | fs/ext/bitmap.c | if (!inode) |
inode | 163 | fs/ext/bitmap.c | if (!inode->i_dev) { |
inode | 164 | fs/ext/bitmap.c | memset(inode,0,sizeof(*inode)); |
inode | 167 | fs/ext/bitmap.c | if (inode->i_count>1) { |
inode | 168 | fs/ext/bitmap.c | printk("free_inode: inode has count=%d\n",inode->i_count); |
inode | 171 | fs/ext/bitmap.c | if (inode->i_nlink) { |
inode | 172 | fs/ext/bitmap.c | printk("free_inode: inode has nlink=%d\n",inode->i_nlink); |
inode | 175 | fs/ext/bitmap.c | if (!inode->i_sb) { |
inode | 179 | fs/ext/bitmap.c | if (inode->i_ino < 1 || inode->i_ino > inode->i_sb->s_ninodes) { |
inode | 183 | fs/ext/bitmap.c | if (!(bh=inode->i_sb->s_imap[inode->i_ino>>13])) { |
inode | 187 | fs/ext/bitmap.c | if (clear_bit(inode->i_ino&8191,bh->b_data)) |
inode | 190 | fs/ext/bitmap.c | memset(inode,0,sizeof(*inode)); |
inode | 193 | fs/ext/bitmap.c | struct inode * ext_new_inode(int dev) |
inode | 195 | fs/ext/bitmap.c | struct inode * inode; |
inode | 199 | fs/ext/bitmap.c | if (!(inode=get_empty_inode())) |
inode | 201 | fs/ext/bitmap.c | if (!(inode->i_sb = get_super(dev))) { |
inode | 203 | fs/ext/bitmap.c | iput(inode); |
inode | 206 | fs/ext/bitmap.c | inode->i_flags = inode->i_sb->s_flags; |
inode | 209 | fs/ext/bitmap.c | if (bh=inode->i_sb->s_imap[i]) |
inode | 212 | fs/ext/bitmap.c | if (!bh || j >= 8192 || j+i*8192 > inode->i_sb->s_ninodes) { |
inode | 213 | fs/ext/bitmap.c | iput(inode); |
inode | 218 | fs/ext/bitmap.c | iput(inode); |
inode | 222 | fs/ext/bitmap.c | inode->i_count = 1; |
inode | 223 | fs/ext/bitmap.c | inode->i_nlink = 1; |
inode | 224 | fs/ext/bitmap.c | inode->i_dev = dev; |
inode | 225 | fs/ext/bitmap.c | inode->i_uid = current->euid; |
inode | 226 | fs/ext/bitmap.c | inode->i_gid = current->egid; |
inode | 227 | fs/ext/bitmap.c | inode->i_dirt = 1; |
inode | 228 | fs/ext/bitmap.c | inode->i_ino = j + i*8192; |
inode | 229 | fs/ext/bitmap.c | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
inode | 230 | fs/ext/bitmap.c | inode->i_op = NULL; |
inode | 232 | fs/ext/bitmap.c | printk("ext_new_inode : allocating inode %d\n", inode->i_ino); |
inode | 234 | fs/ext/bitmap.c | return inode; |
inode | 23 | fs/ext/blkdev.c | static int blkdev_open(struct inode * inode, struct file * filp) |
inode | 27 | fs/ext/blkdev.c | i = MAJOR(inode->i_rdev); |
inode | 31 | fs/ext/blkdev.c | return filp->f_op->open(inode,filp); |
inode | 23 | fs/ext/chrdev.c | static int chrdev_open(struct inode * inode, struct file * filp) |
inode | 27 | fs/ext/chrdev.c | i = MAJOR(inode->i_rdev); |
inode | 31 | fs/ext/chrdev.c | return filp->f_op->open(inode,filp); |
inode | 22 | fs/ext/dir.c | static int ext_readdir(struct inode *, struct file *, struct dirent *, int); |
inode | 55 | fs/ext/dir.c | static int ext_readdir(struct inode * inode, struct file * filp, |
inode | 63 | fs/ext/dir.c | if (!inode || !S_ISDIR(inode->i_mode)) |
inode | 67 | fs/ext/dir.c | while (filp->f_pos < inode->i_size) { |
inode | 69 | fs/ext/dir.c | block = ext_bmap(inode,(filp->f_pos)>>BLOCK_SIZE_BITS); |
inode | 70 | fs/ext/dir.c | if (!block || !(bh = bread(inode->i_dev, block, BLOCK_SIZE))) { |
inode | 75 | fs/ext/dir.c | while (offset < 1024 && filp->f_pos < inode->i_size) { |
inode | 78 | fs/ext/dir.c | if (de->inode) { |
inode | 85 | fs/ext/dir.c | put_fs_long(de->inode,&dirent->d_ino); |
inode | 33 | fs/ext/file.c | static int ext_file_read(struct inode *, struct file *, char *, int); |
inode | 34 | fs/ext/file.c | static int ext_file_write(struct inode *, struct file *, char *, int); |
inode | 76 | fs/ext/file.c | static int ext_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 83 | fs/ext/file.c | if (!inode) { |
inode | 87 | fs/ext/file.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) { |
inode | 88 | fs/ext/file.c | printk("ext_file_read: mode = %07o\n",inode->i_mode); |
inode | 91 | fs/ext/file.c | if (filp->f_pos > inode->i_size) |
inode | 94 | fs/ext/file.c | left = inode->i_size - filp->f_pos; |
inode | 107 | fs/ext/file.c | if (nr = ext_bmap(inode,block++)) { |
inode | 108 | fs/ext/file.c | *bhb = getblk(inode->i_dev, nr, BLOCK_SIZE); |
inode | 153 | fs/ext/file.c | if (!IS_RDONLY(inode)) { |
inode | 154 | fs/ext/file.c | inode->i_atime = CURRENT_TIME; |
inode | 155 | fs/ext/file.c | inode->i_dirt = 1; |
inode | 160 | fs/ext/file.c | static int ext_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 167 | fs/ext/file.c | if (!inode) { |
inode | 171 | fs/ext/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 172 | fs/ext/file.c | printk("ext_file_write: mode = %07o\n",inode->i_mode); |
inode | 180 | fs/ext/file.c | pos = inode->i_size; |
inode | 185 | fs/ext/file.c | if (!(block = ext_create_block(inode,pos/BLOCK_SIZE))) { |
inode | 194 | fs/ext/file.c | bh = getblk(inode->i_dev, block, BLOCK_SIZE); |
inode | 196 | fs/ext/file.c | bh = bread(inode->i_dev, block, BLOCK_SIZE); |
inode | 204 | fs/ext/file.c | if (pos > inode->i_size) { |
inode | 205 | fs/ext/file.c | inode->i_size = pos; |
inode | 206 | fs/ext/file.c | inode->i_dirt = 1; |
inode | 215 | fs/ext/file.c | inode->i_mtime = CURRENT_TIME; |
inode | 216 | fs/ext/file.c | inode->i_ctime = CURRENT_TIME; |
inode | 218 | fs/ext/file.c | inode->i_dirt = 1; |
inode | 183 | fs/ext/freelists.c | void ext_free_inode(struct inode * inode) |
inode | 189 | fs/ext/freelists.c | if (!inode) |
inode | 191 | fs/ext/freelists.c | if (!inode->i_dev) { |
inode | 192 | fs/ext/freelists.c | memset(inode,0,sizeof(*inode)); |
inode | 195 | fs/ext/freelists.c | if (inode->i_count>1) { |
inode | 196 | fs/ext/freelists.c | printk("free_inode: inode has count=%d\n",inode->i_count); |
inode | 199 | fs/ext/freelists.c | if (inode->i_nlink) { |
inode | 200 | fs/ext/freelists.c | printk("free_inode: inode has nlink=%d\n",inode->i_nlink); |
inode | 203 | fs/ext/freelists.c | if (!inode->i_sb) { |
inode | 207 | fs/ext/freelists.c | lock_super (inode->i_sb); |
inode | 208 | fs/ext/freelists.c | if (inode->i_ino < 1 || inode->i_ino > inode->i_sb->u.ext_sb.s_ninodes) { |
inode | 210 | fs/ext/freelists.c | free_super (inode->i_sb); |
inode | 213 | fs/ext/freelists.c | if (inode->i_sb->u.ext_sb.s_imap[1]) |
inode | 214 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) inode->i_sb->u.ext_sb.s_imap[1]->b_data) + |
inode | 215 | fs/ext/freelists.c | (((unsigned long) inode->i_sb->u.ext_sb.s_imap[0])-1)%EXT_INODES_PER_BLOCK; |
inode | 216 | fs/ext/freelists.c | if (!inode->i_sb->u.ext_sb.s_imap[1] || efi->count == 14) { |
inode | 218 | fs/ext/freelists.c | printk("ext_free_inode: inode full, skipping to %d\n", inode->i_ino); |
inode | 220 | fs/ext/freelists.c | if (inode->i_sb->u.ext_sb.s_imap[1]) |
inode | 221 | fs/ext/freelists.c | brelse (inode->i_sb->u.ext_sb.s_imap[1]); |
inode | 222 | fs/ext/freelists.c | block = 2 + (inode->i_ino - 1) / EXT_INODES_PER_BLOCK; |
inode | 223 | fs/ext/freelists.c | if (!(bh = bread(inode->i_dev, block, inode->i_sb->s_blocksize))) |
inode | 226 | fs/ext/freelists.c | (inode->i_ino - 1) % EXT_INODES_PER_BLOCK; |
inode | 227 | fs/ext/freelists.c | efi->next = (unsigned long) inode->i_sb->u.ext_sb.s_imap[0]; |
inode | 229 | fs/ext/freelists.c | inode->i_sb->u.ext_sb.s_imap[0] = (struct buffer_head *) inode->i_ino; |
inode | 230 | fs/ext/freelists.c | inode->i_sb->u.ext_sb.s_imap[1] = bh; |
inode | 232 | fs/ext/freelists.c | efi->free[efi->count++] = inode->i_ino; |
inode | 234 | fs/ext/freelists.c | inode->i_sb->u.ext_sb.s_imap[2] = (struct buffer_head *) (((unsigned long) inode->i_sb->u.ext_sb.s_imap[2]) + 1); |
inode | 235 | fs/ext/freelists.c | inode->i_sb->s_dirt = 1; |
inode | 236 | fs/ext/freelists.c | inode->i_sb->u.ext_sb.s_imap[1]->b_dirt = 1; |
inode | 237 | fs/ext/freelists.c | free_super (inode->i_sb); |
inode | 238 | fs/ext/freelists.c | memset(inode,0,sizeof(*inode)); |
inode | 241 | fs/ext/freelists.c | struct inode * ext_new_inode(int dev) |
inode | 243 | fs/ext/freelists.c | struct inode * inode; |
inode | 248 | fs/ext/freelists.c | if (!(inode=get_empty_inode())) |
inode | 250 | fs/ext/freelists.c | if (!(inode->i_sb = get_super(dev))) { |
inode | 252 | fs/ext/freelists.c | iput(inode); |
inode | 255 | fs/ext/freelists.c | inode->i_flags = inode->i_sb->s_flags; |
inode | 256 | fs/ext/freelists.c | if (!inode->i_sb->u.ext_sb.s_imap[1]) |
inode | 258 | fs/ext/freelists.c | lock_super (inode->i_sb); |
inode | 259 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) inode->i_sb->u.ext_sb.s_imap[1]->b_data) + |
inode | 260 | fs/ext/freelists.c | (((unsigned long) inode->i_sb->u.ext_sb.s_imap[0])-1)%EXT_INODES_PER_BLOCK; |
inode | 263 | fs/ext/freelists.c | inode->i_sb->u.ext_sb.s_imap[1]->b_dirt = 1; |
inode | 268 | fs/ext/freelists.c | j = (unsigned long) inode->i_sb->u.ext_sb.s_imap[0]; |
inode | 269 | fs/ext/freelists.c | if (efi->next > inode->i_sb->u.ext_sb.s_ninodes) { |
inode | 273 | fs/ext/freelists.c | inode->i_sb->u.ext_sb.s_imap[0] = (struct buffer_head *) efi->next; |
inode | 275 | fs/ext/freelists.c | brelse (inode->i_sb->u.ext_sb.s_imap[1]); |
inode | 276 | fs/ext/freelists.c | if (!inode->i_sb->u.ext_sb.s_imap[0]) { |
inode | 277 | fs/ext/freelists.c | inode->i_sb->u.ext_sb.s_imap[1] = NULL; |
inode | 279 | fs/ext/freelists.c | if (!(inode->i_sb->u.ext_sb.s_imap[1] = bread (dev, block, inode->i_sb->s_blocksize))) |
inode | 283 | fs/ext/freelists.c | inode->i_sb->u.ext_sb.s_imap[2] = (struct buffer_head *) (((unsigned long) inode->i_sb->u.ext_sb.s_imap[2]) - 1); |
inode | 284 | fs/ext/freelists.c | inode->i_sb->s_dirt = 1; |
inode | 285 | fs/ext/freelists.c | inode->i_count = 1; |
inode | 286 | fs/ext/freelists.c | inode->i_nlink = 1; |
inode | 287 | fs/ext/freelists.c | inode->i_dev = dev; |
inode | 288 | fs/ext/freelists.c | inode->i_uid = current->euid; |
inode | 289 | fs/ext/freelists.c | inode->i_gid = current->egid; |
inode | 290 | fs/ext/freelists.c | inode->i_dirt = 1; |
inode | 291 | fs/ext/freelists.c | inode->i_ino = j; |
inode | 292 | fs/ext/freelists.c | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
inode | 293 | fs/ext/freelists.c | inode->i_op = NULL; |
inode | 295 | fs/ext/freelists.c | printk("ext_new_inode : allocating inode %d\n", inode->i_ino); |
inode | 297 | fs/ext/freelists.c | free_super (inode->i_sb); |
inode | 298 | fs/ext/freelists.c | return inode; |
inode | 25 | fs/ext/inode.c | void ext_put_inode(struct inode *inode) |
inode | 27 | fs/ext/inode.c | inode->i_size = 0; |
inode | 28 | fs/ext/inode.c | ext_truncate(inode); |
inode | 29 | fs/ext/inode.c | ext_free_inode(inode); |
inode | 212 | fs/ext/inode.c | static int _ext_bmap(struct inode * inode,int block,int create) |
inode | 226 | fs/ext/inode.c | if (create && !inode->i_data[block]) |
inode | 227 | fs/ext/inode.c | if (inode->i_data[block]=ext_new_block(inode->i_dev)) { |
inode | 228 | fs/ext/inode.c | inode->i_ctime=CURRENT_TIME; |
inode | 229 | fs/ext/inode.c | inode->i_dirt=1; |
inode | 231 | fs/ext/inode.c | return inode->i_data[block]; |
inode | 235 | fs/ext/inode.c | if (create && !inode->i_data[9]) |
inode | 236 | fs/ext/inode.c | if (inode->i_data[9]=ext_new_block(inode->i_dev)) { |
inode | 237 | fs/ext/inode.c | inode->i_dirt=1; |
inode | 238 | fs/ext/inode.c | inode->i_ctime=CURRENT_TIME; |
inode | 240 | fs/ext/inode.c | if (!inode->i_data[9]) |
inode | 242 | fs/ext/inode.c | if (!(bh = bread(inode->i_dev, inode->i_data[9], BLOCK_SIZE))) |
inode | 246 | fs/ext/inode.c | if (i=ext_new_block(inode->i_dev)) { |
inode | 255 | fs/ext/inode.c | if (create && !inode->i_data[10]) |
inode | 256 | fs/ext/inode.c | if (inode->i_data[10]=ext_new_block(inode->i_dev)) { |
inode | 257 | fs/ext/inode.c | inode->i_dirt=1; |
inode | 258 | fs/ext/inode.c | inode->i_ctime=CURRENT_TIME; |
inode | 260 | fs/ext/inode.c | if (!inode->i_data[10]) |
inode | 262 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, inode->i_data[10], BLOCK_SIZE))) |
inode | 266 | fs/ext/inode.c | if (i=ext_new_block(inode->i_dev)) { |
inode | 273 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, i, BLOCK_SIZE))) |
inode | 277 | fs/ext/inode.c | if (i=ext_new_block(inode->i_dev)) { |
inode | 284 | fs/ext/inode.c | if (create && !inode->i_data[11]) |
inode | 285 | fs/ext/inode.c | if (inode->i_data[11] = ext_new_block(inode->i_dev)) { |
inode | 286 | fs/ext/inode.c | inode->i_dirt = 1; |
inode | 287 | fs/ext/inode.c | inode->i_ctime = CURRENT_TIME; |
inode | 289 | fs/ext/inode.c | if (!inode->i_data[11]) |
inode | 291 | fs/ext/inode.c | if (!(bh = bread(inode->i_dev, inode->i_data[11], BLOCK_SIZE))) |
inode | 295 | fs/ext/inode.c | if (i = ext_new_block(inode->i_dev)) { |
inode | 302 | fs/ext/inode.c | if (!(bh = bread(inode->i_dev, i, BLOCK_SIZE))) |
inode | 306 | fs/ext/inode.c | if (i = ext_new_block(inode->i_dev)) { |
inode | 313 | fs/ext/inode.c | if (!(bh = bread(inode->i_dev, i, BLOCK_SIZE))) |
inode | 317 | fs/ext/inode.c | if (i = ext_new_block(inode->i_dev)) { |
inode | 328 | fs/ext/inode.c | int ext_bmap(struct inode * inode,int block) |
inode | 330 | fs/ext/inode.c | return _ext_bmap(inode,block,0); |
inode | 333 | fs/ext/inode.c | int ext_create_block(struct inode * inode, int block) |
inode | 335 | fs/ext/inode.c | return _ext_bmap(inode,block,1); |
inode | 338 | fs/ext/inode.c | void ext_read_inode(struct inode * inode) |
inode | 345 | fs/ext/inode.c | block = 2 + inode->i_sb->u.ext_sb.s_imap_blocks + inode->i_sb->u.ext_sb.s_zmap_blocks + |
inode | 346 | fs/ext/inode.c | (inode->i_ino-1)/EXT_INODES_PER_BLOCK; |
inode | 349 | fs/ext/inode.c | block = 2 + (inode->i_ino-1)/EXT_INODES_PER_BLOCK; |
inode | 351 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
inode | 354 | fs/ext/inode.c | (inode->i_ino-1)%EXT_INODES_PER_BLOCK; |
inode | 355 | fs/ext/inode.c | inode->i_mode = raw_inode->i_mode; |
inode | 356 | fs/ext/inode.c | inode->i_uid = raw_inode->i_uid; |
inode | 357 | fs/ext/inode.c | inode->i_gid = raw_inode->i_gid; |
inode | 358 | fs/ext/inode.c | inode->i_nlink = raw_inode->i_nlinks; |
inode | 359 | fs/ext/inode.c | inode->i_size = raw_inode->i_size; |
inode | 360 | fs/ext/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = raw_inode->i_time; |
inode | 361 | fs/ext/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 362 | fs/ext/inode.c | inode->i_rdev = raw_inode->i_zone[0]; |
inode | 364 | fs/ext/inode.c | inode->i_data[block] = raw_inode->i_zone[block]; |
inode | 366 | fs/ext/inode.c | inode->i_op = NULL; |
inode | 367 | fs/ext/inode.c | if (S_ISREG(inode->i_mode)) |
inode | 368 | fs/ext/inode.c | inode->i_op = &ext_file_inode_operations; |
inode | 369 | fs/ext/inode.c | else if (S_ISDIR(inode->i_mode)) |
inode | 370 | fs/ext/inode.c | inode->i_op = &ext_dir_inode_operations; |
inode | 371 | fs/ext/inode.c | else if (S_ISLNK(inode->i_mode)) |
inode | 372 | fs/ext/inode.c | inode->i_op = &ext_symlink_inode_operations; |
inode | 373 | fs/ext/inode.c | else if (S_ISCHR(inode->i_mode)) |
inode | 374 | fs/ext/inode.c | inode->i_op = &ext_chrdev_inode_operations; |
inode | 375 | fs/ext/inode.c | else if (S_ISBLK(inode->i_mode)) |
inode | 376 | fs/ext/inode.c | inode->i_op = &ext_blkdev_inode_operations; |
inode | 377 | fs/ext/inode.c | else if (S_ISFIFO(inode->i_mode)) { |
inode | 378 | fs/ext/inode.c | inode->i_op = &ext_fifo_inode_operations; |
inode | 379 | fs/ext/inode.c | inode->i_size = 0; |
inode | 380 | fs/ext/inode.c | inode->i_pipe = 1; |
inode | 381 | fs/ext/inode.c | PIPE_HEAD(*inode) = PIPE_TAIL(*inode) = 0; |
inode | 382 | fs/ext/inode.c | PIPE_READERS(*inode) = PIPE_WRITERS(*inode) = 0; |
inode | 386 | fs/ext/inode.c | void ext_write_inode(struct inode * inode) |
inode | 393 | fs/ext/inode.c | block = 2 + inode->i_sb->u.ext_sb.s_imap_blocks + inode->i_sb->u.ext_sb.s_zmap_blocks + |
inode | 394 | fs/ext/inode.c | (inode->i_ino-1)/EXT_INODES_PER_BLOCK; |
inode | 397 | fs/ext/inode.c | block = 2 + (inode->i_ino-1)/EXT_INODES_PER_BLOCK; |
inode | 399 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
inode | 402 | fs/ext/inode.c | (inode->i_ino-1)%EXT_INODES_PER_BLOCK; |
inode | 403 | fs/ext/inode.c | raw_inode->i_mode = inode->i_mode; |
inode | 404 | fs/ext/inode.c | raw_inode->i_uid = inode->i_uid; |
inode | 405 | fs/ext/inode.c | raw_inode->i_gid = inode->i_gid; |
inode | 406 | fs/ext/inode.c | raw_inode->i_nlinks = inode->i_nlink; |
inode | 407 | fs/ext/inode.c | raw_inode->i_size = inode->i_size; |
inode | 408 | fs/ext/inode.c | raw_inode->i_time = inode->i_mtime; |
inode | 409 | fs/ext/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 410 | fs/ext/inode.c | raw_inode->i_zone[0] = inode->i_rdev; |
inode | 412 | fs/ext/inode.c | raw_inode->i_zone[block] = inode->i_data[block]; |
inode | 414 | fs/ext/inode.c | inode->i_dirt=0; |
inode | 62 | fs/ext/namei.c | if (!de || !de->inode || len > EXT_NAME_LEN) |
inode | 91 | fs/ext/namei.c | static struct buffer_head * ext_find_entry(struct inode * dir, |
inode | 157 | fs/ext/namei.c | int ext_lookup(struct inode * dir,const char * name, int len, |
inode | 158 | fs/ext/namei.c | struct inode ** result) |
inode | 175 | fs/ext/namei.c | ino = de->inode; |
inode | 195 | fs/ext/namei.c | static struct buffer_head * ext_add_entry(struct inode * dir, |
inode | 249 | fs/ext/namei.c | de->inode = 0; |
inode | 272 | fs/ext/namei.c | de->inode=0; |
inode | 279 | fs/ext/namei.c | if (!de->inode && de->rec_len >= rec_len) { |
inode | 287 | fs/ext/namei.c | de1->inode = 0; |
inode | 307 | fs/ext/namei.c | int ext_create(struct inode * dir,const char * name, int len, int mode, |
inode | 308 | fs/ext/namei.c | struct inode ** result) |
inode | 310 | fs/ext/namei.c | struct inode * inode; |
inode | 317 | fs/ext/namei.c | inode = ext_new_inode(dir->i_dev); |
inode | 318 | fs/ext/namei.c | if (!inode) { |
inode | 322 | fs/ext/namei.c | inode->i_op = &ext_file_inode_operations; |
inode | 323 | fs/ext/namei.c | inode->i_mode = mode; |
inode | 324 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 327 | fs/ext/namei.c | inode->i_nlink--; |
inode | 328 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 329 | fs/ext/namei.c | iput(inode); |
inode | 333 | fs/ext/namei.c | de->inode = inode->i_ino; |
inode | 337 | fs/ext/namei.c | *result = inode; |
inode | 341 | fs/ext/namei.c | int ext_mknod(struct inode * dir, const char * name, int len, int mode, int rdev) |
inode | 343 | fs/ext/namei.c | struct inode * inode; |
inode | 355 | fs/ext/namei.c | inode = ext_new_inode(dir->i_dev); |
inode | 356 | fs/ext/namei.c | if (!inode) { |
inode | 360 | fs/ext/namei.c | inode->i_uid = current->euid; |
inode | 361 | fs/ext/namei.c | inode->i_mode = mode; |
inode | 362 | fs/ext/namei.c | inode->i_op = NULL; |
inode | 363 | fs/ext/namei.c | if (S_ISREG(inode->i_mode)) |
inode | 364 | fs/ext/namei.c | inode->i_op = &ext_file_inode_operations; |
inode | 365 | fs/ext/namei.c | else if (S_ISDIR(inode->i_mode)) |
inode | 366 | fs/ext/namei.c | inode->i_op = &ext_dir_inode_operations; |
inode | 367 | fs/ext/namei.c | else if (S_ISLNK(inode->i_mode)) |
inode | 368 | fs/ext/namei.c | inode->i_op = &ext_symlink_inode_operations; |
inode | 369 | fs/ext/namei.c | else if (S_ISCHR(inode->i_mode)) |
inode | 370 | fs/ext/namei.c | inode->i_op = &ext_chrdev_inode_operations; |
inode | 371 | fs/ext/namei.c | else if (S_ISBLK(inode->i_mode)) |
inode | 372 | fs/ext/namei.c | inode->i_op = &ext_blkdev_inode_operations; |
inode | 373 | fs/ext/namei.c | else if (S_ISFIFO(inode->i_mode)) { |
inode | 374 | fs/ext/namei.c | inode->i_op = &ext_fifo_inode_operations; |
inode | 375 | fs/ext/namei.c | inode->i_size = 0; |
inode | 376 | fs/ext/namei.c | inode->i_pipe = 1; |
inode | 377 | fs/ext/namei.c | PIPE_HEAD(*inode) = PIPE_TAIL(*inode) = 0; |
inode | 378 | fs/ext/namei.c | PIPE_READERS(*inode) = PIPE_WRITERS(*inode) = 0; |
inode | 381 | fs/ext/namei.c | inode->i_rdev = rdev; |
inode | 382 | fs/ext/namei.c | inode->i_mtime = inode->i_atime = CURRENT_TIME; |
inode | 383 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 386 | fs/ext/namei.c | inode->i_nlink--; |
inode | 387 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 388 | fs/ext/namei.c | iput(inode); |
inode | 392 | fs/ext/namei.c | de->inode = inode->i_ino; |
inode | 396 | fs/ext/namei.c | iput(inode); |
inode | 400 | fs/ext/namei.c | int ext_mkdir(struct inode * dir, const char * name, int len, int mode) |
inode | 402 | fs/ext/namei.c | struct inode * inode; |
inode | 412 | fs/ext/namei.c | inode = ext_new_inode(dir->i_dev); |
inode | 413 | fs/ext/namei.c | if (!inode) { |
inode | 417 | fs/ext/namei.c | inode->i_op = &ext_dir_inode_operations; |
inode | 418 | fs/ext/namei.c | inode->i_size = 2 * 16; /* Each entry is coded on 16 bytes for "." and ".." |
inode | 423 | fs/ext/namei.c | inode->i_mtime = inode->i_atime = CURRENT_TIME; |
inode | 424 | fs/ext/namei.c | if (!(inode->i_data[0] = ext_new_block(inode->i_dev))) { |
inode | 426 | fs/ext/namei.c | inode->i_nlink--; |
inode | 427 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 428 | fs/ext/namei.c | iput(inode); |
inode | 431 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 432 | fs/ext/namei.c | if (!(dir_block = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
inode | 434 | fs/ext/namei.c | inode->i_nlink--; |
inode | 435 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 436 | fs/ext/namei.c | iput(inode); |
inode | 440 | fs/ext/namei.c | de->inode=inode->i_ino; |
inode | 446 | fs/ext/namei.c | de->inode = dir->i_ino; |
inode | 450 | fs/ext/namei.c | inode->i_nlink = 2; |
inode | 453 | fs/ext/namei.c | inode->i_mode = I_DIRECTORY | (mode & 0777 & ~current->umask); |
inode | 454 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 458 | fs/ext/namei.c | inode->i_nlink=0; |
inode | 459 | fs/ext/namei.c | iput(inode); |
inode | 462 | fs/ext/namei.c | de->inode = inode->i_ino; |
inode | 467 | fs/ext/namei.c | iput(inode); |
inode | 475 | fs/ext/namei.c | static int empty_dir(struct inode * inode) |
inode | 484 | fs/ext/namei.c | if (inode->i_size < 2 * 12 || !inode->i_data[0] || |
inode | 485 | fs/ext/namei.c | !(bh=bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
inode | 486 | fs/ext/namei.c | printk("warning - bad directory on dev %04x\n",inode->i_dev); |
inode | 491 | fs/ext/namei.c | if (de->inode != inode->i_ino || !de1->inode || |
inode | 493 | fs/ext/namei.c | printk("warning - bad directory on dev %04x\n",inode->i_dev); |
inode | 499 | fs/ext/namei.c | while (offset < inode->i_size ) { |
inode | 502 | fs/ext/namei.c | block = ext_bmap(inode, offset >> BLOCK_SIZE_BITS); |
inode | 507 | fs/ext/namei.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
inode | 511 | fs/ext/namei.c | if (de->inode) { |
inode | 525 | fs/ext/namei.c | if (! nde->inode) |
inode | 527 | fs/ext/namei.c | if (! pde->inode) |
inode | 531 | fs/ext/namei.c | int ext_rmdir(struct inode * dir, const char * name, int len) |
inode | 534 | fs/ext/namei.c | struct inode * inode; |
inode | 538 | fs/ext/namei.c | inode = NULL; |
inode | 544 | fs/ext/namei.c | if (!(inode = iget(dir->i_dev, de->inode))) |
inode | 547 | fs/ext/namei.c | inode->i_uid != current->euid) |
inode | 549 | fs/ext/namei.c | if (inode->i_dev != dir->i_dev) |
inode | 551 | fs/ext/namei.c | if (inode == dir) /* we may not delete ".", but "../dir" is ok */ |
inode | 553 | fs/ext/namei.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 557 | fs/ext/namei.c | if (!empty_dir(inode)) { |
inode | 561 | fs/ext/namei.c | if (inode->i_count > 1) { |
inode | 565 | fs/ext/namei.c | if (inode->i_nlink != 2) |
inode | 566 | fs/ext/namei.c | printk("empty directory has nlink!=2 (%d)\n",inode->i_nlink); |
inode | 567 | fs/ext/namei.c | de->inode = 0; |
inode | 571 | fs/ext/namei.c | inode->i_nlink=0; |
inode | 572 | fs/ext/namei.c | inode->i_dirt=1; |
inode | 579 | fs/ext/namei.c | iput(inode); |
inode | 584 | fs/ext/namei.c | int ext_unlink(struct inode * dir, const char * name, int len) |
inode | 587 | fs/ext/namei.c | struct inode * inode; |
inode | 592 | fs/ext/namei.c | inode = NULL; |
inode | 596 | fs/ext/namei.c | if (!(inode = iget(dir->i_dev, de->inode))) |
inode | 600 | fs/ext/namei.c | current->euid != inode->i_uid && |
inode | 603 | fs/ext/namei.c | if (S_ISDIR(inode->i_mode)) |
inode | 605 | fs/ext/namei.c | if (!inode->i_nlink) { |
inode | 607 | fs/ext/namei.c | inode->i_dev,inode->i_ino,inode->i_nlink); |
inode | 608 | fs/ext/namei.c | inode->i_nlink=1; |
inode | 610 | fs/ext/namei.c | de->inode = 0; |
inode | 614 | fs/ext/namei.c | inode->i_nlink--; |
inode | 615 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 616 | fs/ext/namei.c | inode->i_ctime = CURRENT_TIME; |
inode | 620 | fs/ext/namei.c | iput(inode); |
inode | 625 | fs/ext/namei.c | int ext_symlink(struct inode * dir, const char * name, int len, const char * symname) |
inode | 628 | fs/ext/namei.c | struct inode * inode = NULL; |
inode | 633 | fs/ext/namei.c | if (!(inode = ext_new_inode(dir->i_dev))) { |
inode | 637 | fs/ext/namei.c | inode->i_mode = S_IFLNK | 0777; |
inode | 638 | fs/ext/namei.c | inode->i_op = &ext_symlink_inode_operations; |
inode | 639 | fs/ext/namei.c | if (!(inode->i_data[0] = ext_new_block(inode->i_dev))) { |
inode | 641 | fs/ext/namei.c | inode->i_nlink--; |
inode | 642 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 643 | fs/ext/namei.c | iput(inode); |
inode | 646 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 647 | fs/ext/namei.c | if (!(name_block = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
inode | 649 | fs/ext/namei.c | inode->i_nlink--; |
inode | 650 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 651 | fs/ext/namei.c | iput(inode); |
inode | 660 | fs/ext/namei.c | inode->i_size = i; |
inode | 661 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 664 | fs/ext/namei.c | inode->i_nlink--; |
inode | 665 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 666 | fs/ext/namei.c | iput(inode); |
inode | 673 | fs/ext/namei.c | inode->i_nlink--; |
inode | 674 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 675 | fs/ext/namei.c | iput(inode); |
inode | 679 | fs/ext/namei.c | de->inode = inode->i_ino; |
inode | 683 | fs/ext/namei.c | iput(inode); |
inode | 687 | fs/ext/namei.c | int ext_link(struct inode * oldinode, struct inode * dir, const char * name, int len) |
inode | 710 | fs/ext/namei.c | de->inode = oldinode->i_ino; |
inode | 721 | fs/ext/namei.c | static int subdir(struct inode * new, struct inode * old) |
inode | 751 | fs/ext/namei.c | ((struct ext_dir_entry *) buffer)->rec_len))->inode |
inode | 769 | fs/ext/namei.c | static int do_ext_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 770 | fs/ext/namei.c | struct inode * new_dir, const char * new_name, int new_len) |
inode | 772 | fs/ext/namei.c | struct inode * old_inode, * new_inode; |
inode | 793 | fs/ext/namei.c | old_inode = iget(old_dir->i_dev, old_de->inode); |
inode | 802 | fs/ext/namei.c | new_inode = iget(new_dir->i_dev, new_de->inode); |
inode | 840 | fs/ext/namei.c | if (new_inode && (new_de->inode != new_inode->i_ino)) |
inode | 842 | fs/ext/namei.c | if (new_de->inode && !new_inode) |
inode | 844 | fs/ext/namei.c | if (old_de->inode != old_inode->i_ino) |
inode | 847 | fs/ext/namei.c | old_de->inode = 0; |
inode | 849 | fs/ext/namei.c | new_de->inode = old_inode->i_ino; |
inode | 886 | fs/ext/namei.c | int ext_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 887 | fs/ext/namei.c | struct inode * new_dir, const char * new_name, int new_len) |
inode | 23 | fs/ext/symlink.c | static int ext_readlink(struct inode *, char *, int); |
inode | 24 | fs/ext/symlink.c | static struct inode * ext_follow_link(struct inode *, struct inode *); |
inode | 46 | fs/ext/symlink.c | static struct inode * ext_follow_link(struct inode * dir, struct inode * inode) |
inode | 55 | fs/ext/symlink.c | if (!inode) { |
inode | 59 | fs/ext/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 61 | fs/ext/symlink.c | return inode; |
inode | 64 | fs/ext/symlink.c | if ((current->link_count > 5) || !inode->i_data[0] || |
inode | 65 | fs/ext/symlink.c | !(bh = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
inode | 67 | fs/ext/symlink.c | iput(inode); |
inode | 70 | fs/ext/symlink.c | iput(inode); |
inode | 73 | fs/ext/symlink.c | inode = _namei(bh->b_data,dir,1); |
inode | 77 | fs/ext/symlink.c | return inode; |
inode | 80 | fs/ext/symlink.c | static int ext_readlink(struct inode * inode, char * buffer, int buflen) |
inode | 86 | fs/ext/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 87 | fs/ext/symlink.c | iput(inode); |
inode | 92 | fs/ext/symlink.c | if (inode->i_data[0]) |
inode | 93 | fs/ext/symlink.c | bh = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE); |
inode | 96 | fs/ext/symlink.c | iput(inode); |
inode | 33 | fs/ext/truncate.c | static int trunc_direct(struct inode * inode) |
inode | 37 | fs/ext/truncate.c | #define DIRECT_BLOCK ((inode->i_size + 1023) >> 10) |
inode | 43 | fs/ext/truncate.c | if (!inode->i_data[i]) |
inode | 46 | fs/ext/truncate.c | if (ext_free_block(inode->i_dev,inode->i_data[i])) |
inode | 47 | fs/ext/truncate.c | inode->i_data[i] = 0; |
inode | 52 | fs/ext/truncate.c | static int trunc_indirect(struct inode * inode, int offset, unsigned long * p) |
inode | 61 | fs/ext/truncate.c | bh = bread(inode->i_dev, *p, BLOCK_SIZE); |
inode | 74 | fs/ext/truncate.c | if (ext_free_block(inode->i_dev,*ind)) |
inode | 84 | fs/ext/truncate.c | if (ext_free_block(inode->i_dev,*p)) |
inode | 90 | fs/ext/truncate.c | static int trunc_dindirect(struct inode * inode, int offset, unsigned long * p) |
inode | 99 | fs/ext/truncate.c | bh = bread(inode->i_dev, *p, BLOCK_SIZE); |
inode | 111 | fs/ext/truncate.c | result |= trunc_indirect(inode,offset+(i<<8),dind); |
inode | 120 | fs/ext/truncate.c | if (ext_free_block(inode->i_dev,*p)) |
inode | 126 | fs/ext/truncate.c | static int trunc_tindirect(struct inode * inode) |
inode | 134 | fs/ext/truncate.c | if (inode->i_data[11]) |
inode | 135 | fs/ext/truncate.c | bh = bread(inode->i_dev, inode->i_data[11], BLOCK_SIZE); |
inode | 147 | fs/ext/truncate.c | result |= trunc_dindirect(inode,9+256+256*256+(i<<16),tind); |
inode | 156 | fs/ext/truncate.c | if (ext_free_block(inode->i_dev,inode->i_data[11])) |
inode | 157 | fs/ext/truncate.c | inode->i_data[11] = 0; |
inode | 162 | fs/ext/truncate.c | void ext_truncate(struct inode * inode) |
inode | 166 | fs/ext/truncate.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 167 | fs/ext/truncate.c | S_ISLNK(inode->i_mode))) |
inode | 172 | fs/ext/truncate.c | flag = trunc_direct(inode); |
inode | 173 | fs/ext/truncate.c | flag |= trunc_indirect(inode,9,(unsigned long *)&inode->i_data[9]); |
inode | 174 | fs/ext/truncate.c | flag |= trunc_dindirect(inode,9+256,(unsigned long *)&inode->i_data[10]); |
inode | 175 | fs/ext/truncate.c | flag |= trunc_tindirect(inode); |
inode | 181 | fs/ext/truncate.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 182 | fs/ext/truncate.c | inode->i_dirt = 1; |
inode | 190 | fs/ext/truncate.c | void ext_release(struct inode * inode, struct file * filp) |
inode | 16 | fs/fifo.c | static int fifo_open(struct inode * inode,struct file * filp) |
inode | 30 | fs/fifo.c | PIPE_READERS(*inode)++; |
inode | 32 | fs/fifo.c | while (!PIPE_WRITERS(*inode)) { |
inode | 33 | fs/fifo.c | if (PIPE_HEAD(*inode) != PIPE_TAIL(*inode)) |
inode | 39 | fs/fifo.c | interruptible_sleep_on(&PIPE_READ_WAIT(*inode)); |
inode | 42 | fs/fifo.c | PIPE_READERS(*inode)--; |
inode | 51 | fs/fifo.c | if ((filp->f_flags & O_NONBLOCK) && !PIPE_READERS(*inode)) { |
inode | 56 | fs/fifo.c | PIPE_WRITERS(*inode)++; |
inode | 57 | fs/fifo.c | while (!PIPE_READERS(*inode)) { |
inode | 62 | fs/fifo.c | interruptible_sleep_on(&PIPE_WRITE_WAIT(*inode)); |
inode | 65 | fs/fifo.c | PIPE_WRITERS(*inode)--; |
inode | 76 | fs/fifo.c | PIPE_WRITERS(*inode) += 1; |
inode | 77 | fs/fifo.c | PIPE_READERS(*inode) += 1; |
inode | 83 | fs/fifo.c | if (PIPE_WRITERS(*inode)) |
inode | 84 | fs/fifo.c | wake_up(&PIPE_READ_WAIT(*inode)); |
inode | 85 | fs/fifo.c | if (PIPE_READERS(*inode)) |
inode | 86 | fs/fifo.c | wake_up(&PIPE_WRITE_WAIT(*inode)); |
inode | 87 | fs/fifo.c | if (retval || inode->i_size) |
inode | 90 | fs/fifo.c | if (inode->i_size) { |
inode | 96 | fs/fifo.c | inode->i_size = page; |
inode | 15 | fs/inode.c | struct inode inode_table[NR_INODE]={{0,},}; |
inode | 17 | fs/inode.c | static inline void wait_on_inode(struct inode * inode) |
inode | 20 | fs/inode.c | while (inode->i_lock) |
inode | 21 | fs/inode.c | sleep_on(&inode->i_wait); |
inode | 25 | fs/inode.c | static inline void lock_inode(struct inode * inode) |
inode | 28 | fs/inode.c | while (inode->i_lock) |
inode | 29 | fs/inode.c | sleep_on(&inode->i_wait); |
inode | 30 | fs/inode.c | inode->i_lock=1; |
inode | 34 | fs/inode.c | static inline void unlock_inode(struct inode * inode) |
inode | 36 | fs/inode.c | inode->i_lock=0; |
inode | 37 | fs/inode.c | wake_up(&inode->i_wait); |
inode | 40 | fs/inode.c | static void write_inode(struct inode * inode) |
inode | 42 | fs/inode.c | if (!inode->i_dirt) |
inode | 44 | fs/inode.c | inode->i_dirt = 0; |
inode | 45 | fs/inode.c | lock_inode(inode); |
inode | 46 | fs/inode.c | if (inode->i_dev && inode->i_sb && |
inode | 47 | fs/inode.c | inode->i_sb->s_op && inode->i_sb->s_op->write_inode) |
inode | 48 | fs/inode.c | inode->i_sb->s_op->write_inode(inode); |
inode | 49 | fs/inode.c | unlock_inode(inode); |
inode | 52 | fs/inode.c | static void read_inode(struct inode * inode) |
inode | 54 | fs/inode.c | lock_inode(inode); |
inode | 55 | fs/inode.c | if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->read_inode) |
inode | 56 | fs/inode.c | inode->i_sb->s_op->read_inode(inode); |
inode | 57 | fs/inode.c | unlock_inode(inode); |
inode | 70 | fs/inode.c | int bmap(struct inode * inode, int block) |
inode | 72 | fs/inode.c | if (inode->i_op && inode->i_op->bmap) |
inode | 73 | fs/inode.c | return inode->i_op->bmap(inode,block); |
inode | 80 | fs/inode.c | struct inode * inode; |
inode | 82 | fs/inode.c | inode = 0+inode_table; |
inode | 83 | fs/inode.c | for(i=0 ; i<NR_INODE ; i++,inode++) { |
inode | 84 | fs/inode.c | wait_on_inode(inode); |
inode | 85 | fs/inode.c | if (inode->i_dev == dev) { |
inode | 86 | fs/inode.c | if (inode->i_count) { |
inode | 90 | fs/inode.c | inode->i_dev = inode->i_dirt = 0; |
inode | 98 | fs/inode.c | struct inode * inode; |
inode | 100 | fs/inode.c | inode = 0+inode_table; |
inode | 101 | fs/inode.c | for(i=0 ; i<NR_INODE ; i++,inode++) { |
inode | 102 | fs/inode.c | wait_on_inode(inode); |
inode | 103 | fs/inode.c | if (inode->i_dirt) |
inode | 104 | fs/inode.c | write_inode(inode); |
inode | 108 | fs/inode.c | void iput(struct inode * inode) |
inode | 110 | fs/inode.c | if (!inode) |
inode | 112 | fs/inode.c | wait_on_inode(inode); |
inode | 113 | fs/inode.c | if (!inode->i_count) { |
inode | 115 | fs/inode.c | printk("device %04x, inode %d, mode=%07o\n",inode->i_rdev, |
inode | 116 | fs/inode.c | inode->i_ino,inode->i_mode); |
inode | 119 | fs/inode.c | if (inode->i_pipe) { |
inode | 120 | fs/inode.c | wake_up(&inode->i_wait); |
inode | 121 | fs/inode.c | wake_up(&inode->i_wait2); |
inode | 124 | fs/inode.c | if (inode->i_count>1) { |
inode | 125 | fs/inode.c | inode->i_count--; |
inode | 128 | fs/inode.c | if (inode->i_pipe) { |
inode | 129 | fs/inode.c | free_page(inode->i_size); |
inode | 130 | fs/inode.c | inode->i_size = 0; |
inode | 132 | fs/inode.c | if (!inode->i_dev) { |
inode | 133 | fs/inode.c | inode->i_count--; |
inode | 136 | fs/inode.c | if (!inode->i_nlink) { |
inode | 137 | fs/inode.c | if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->put_inode) { |
inode | 138 | fs/inode.c | inode->i_sb->s_op->put_inode(inode); |
inode | 142 | fs/inode.c | if (inode->i_dirt) { |
inode | 143 | fs/inode.c | write_inode(inode); /* we can sleep - so do again */ |
inode | 144 | fs/inode.c | wait_on_inode(inode); |
inode | 147 | fs/inode.c | inode->i_count--; |
inode | 151 | fs/inode.c | struct inode * get_empty_inode(void) |
inode | 153 | fs/inode.c | struct inode * inode; |
inode | 154 | fs/inode.c | static struct inode * last_inode = inode_table; |
inode | 158 | fs/inode.c | inode = NULL; |
inode | 163 | fs/inode.c | inode = last_inode; |
inode | 164 | fs/inode.c | if (!inode->i_dirt && !inode->i_lock) |
inode | 168 | fs/inode.c | if (!inode) { |
inode | 174 | fs/inode.c | wait_on_inode(inode); |
inode | 175 | fs/inode.c | while (inode->i_dirt) { |
inode | 176 | fs/inode.c | write_inode(inode); |
inode | 177 | fs/inode.c | wait_on_inode(inode); |
inode | 179 | fs/inode.c | } while (inode->i_count); |
inode | 180 | fs/inode.c | memset(inode,0,sizeof(*inode)); |
inode | 181 | fs/inode.c | inode->i_count = 1; |
inode | 182 | fs/inode.c | return inode; |
inode | 185 | fs/inode.c | struct inode * get_pipe_inode(void) |
inode | 187 | fs/inode.c | struct inode * inode; |
inode | 189 | fs/inode.c | if (!(inode = get_empty_inode())) |
inode | 191 | fs/inode.c | if (!(inode->i_size = get_free_page(GFP_USER))) { |
inode | 192 | fs/inode.c | inode->i_count = 0; |
inode | 195 | fs/inode.c | inode->i_count = 2; /* sum of readers/writers */ |
inode | 196 | fs/inode.c | PIPE_HEAD(*inode) = PIPE_TAIL(*inode) = 0; |
inode | 197 | fs/inode.c | PIPE_READERS(*inode) = PIPE_WRITERS(*inode) = 1; |
inode | 198 | fs/inode.c | inode->i_pipe = 1; |
inode | 199 | fs/inode.c | return inode; |
inode | 202 | fs/inode.c | struct inode * iget(int dev,int nr) |
inode | 204 | fs/inode.c | struct inode * inode, * empty; |
inode | 209 | fs/inode.c | inode = inode_table; |
inode | 210 | fs/inode.c | while (inode < NR_INODE+inode_table) { |
inode | 211 | fs/inode.c | if (inode->i_dev != dev || inode->i_ino != nr) { |
inode | 212 | fs/inode.c | inode++; |
inode | 215 | fs/inode.c | wait_on_inode(inode); |
inode | 216 | fs/inode.c | if (inode->i_dev != dev || inode->i_ino != nr) { |
inode | 217 | fs/inode.c | inode = inode_table; |
inode | 220 | fs/inode.c | inode->i_count++; |
inode | 221 | fs/inode.c | if (inode->i_mount) { |
inode | 225 | fs/inode.c | if (super_block[i].s_covered==inode) |
inode | 231 | fs/inode.c | return inode; |
inode | 233 | fs/inode.c | iput(inode); |
inode | 234 | fs/inode.c | if (!(inode = super_block[i].s_mounted)) |
inode | 237 | fs/inode.c | inode->i_count++; |
inode | 238 | fs/inode.c | wait_on_inode(inode); |
inode | 243 | fs/inode.c | return inode; |
inode | 247 | fs/inode.c | inode = empty; |
inode | 248 | fs/inode.c | if (!(inode->i_sb = get_super(dev))) { |
inode | 250 | fs/inode.c | iput(inode); |
inode | 253 | fs/inode.c | inode->i_dev = dev; |
inode | 254 | fs/inode.c | inode->i_ino = nr; |
inode | 255 | fs/inode.c | inode->i_flags = inode->i_sb->s_flags; |
inode | 256 | fs/inode.c | read_inode(inode); |
inode | 257 | fs/inode.c | return inode; |
inode | 145 | fs/minix/bitmap.c | void minix_free_inode(struct inode * inode) |
inode | 149 | fs/minix/bitmap.c | if (!inode) |
inode | 151 | fs/minix/bitmap.c | if (!inode->i_dev) { |
inode | 152 | fs/minix/bitmap.c | memset(inode,0,sizeof(*inode)); |
inode | 155 | fs/minix/bitmap.c | if (inode->i_count>1) { |
inode | 156 | fs/minix/bitmap.c | printk("free_inode: inode has count=%d\n",inode->i_count); |
inode | 159 | fs/minix/bitmap.c | if (inode->i_nlink) { |
inode | 160 | fs/minix/bitmap.c | printk("free_inode: inode has nlink=%d\n",inode->i_nlink); |
inode | 163 | fs/minix/bitmap.c | if (!inode->i_sb) { |
inode | 167 | fs/minix/bitmap.c | if (inode->i_ino < 1 || inode->i_ino > inode->i_sb->u.minix_sb.s_ninodes) { |
inode | 171 | fs/minix/bitmap.c | if (!(bh=inode->i_sb->u.minix_sb.s_imap[inode->i_ino>>13])) { |
inode | 175 | fs/minix/bitmap.c | if (clear_bit(inode->i_ino&8191,bh->b_data)) |
inode | 178 | fs/minix/bitmap.c | memset(inode,0,sizeof(*inode)); |
inode | 181 | fs/minix/bitmap.c | struct inode * minix_new_inode(int dev) |
inode | 183 | fs/minix/bitmap.c | struct inode * inode; |
inode | 187 | fs/minix/bitmap.c | if (!(inode=get_empty_inode())) |
inode | 189 | fs/minix/bitmap.c | if (!(inode->i_sb = get_super(dev))) { |
inode | 191 | fs/minix/bitmap.c | iput(inode); |
inode | 194 | fs/minix/bitmap.c | inode->i_flags = inode->i_sb->s_flags; |
inode | 197 | fs/minix/bitmap.c | if (bh=inode->i_sb->u.minix_sb.s_imap[i]) |
inode | 200 | fs/minix/bitmap.c | if (!bh || j >= 8192 || j+i*8192 > inode->i_sb->u.minix_sb.s_ninodes) { |
inode | 201 | fs/minix/bitmap.c | iput(inode); |
inode | 206 | fs/minix/bitmap.c | iput(inode); |
inode | 210 | fs/minix/bitmap.c | inode->i_count = 1; |
inode | 211 | fs/minix/bitmap.c | inode->i_nlink = 1; |
inode | 212 | fs/minix/bitmap.c | inode->i_dev = dev; |
inode | 213 | fs/minix/bitmap.c | inode->i_uid = current->euid; |
inode | 214 | fs/minix/bitmap.c | inode->i_gid = current->egid; |
inode | 215 | fs/minix/bitmap.c | inode->i_dirt = 1; |
inode | 216 | fs/minix/bitmap.c | inode->i_ino = j + i*8192; |
inode | 217 | fs/minix/bitmap.c | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
inode | 218 | fs/minix/bitmap.c | inode->i_op = NULL; |
inode | 219 | fs/minix/bitmap.c | return inode; |
inode | 17 | fs/minix/blkdev.c | static int blkdev_open(struct inode * inode, struct file * filp) |
inode | 21 | fs/minix/blkdev.c | i = MAJOR(inode->i_rdev); |
inode | 25 | fs/minix/blkdev.c | return filp->f_op->open(inode,filp); |
inode | 17 | fs/minix/chrdev.c | static int chrdev_open(struct inode * inode, struct file * filp) |
inode | 21 | fs/minix/chrdev.c | i = MAJOR(inode->i_rdev); |
inode | 25 | fs/minix/chrdev.c | return filp->f_op->open(inode,filp); |
inode | 16 | fs/minix/dir.c | static int minix_readdir(struct inode *, struct file *, struct dirent *, int); |
inode | 49 | fs/minix/dir.c | static int minix_readdir(struct inode * inode, struct file * filp, |
inode | 57 | fs/minix/dir.c | if (!inode || !S_ISDIR(inode->i_mode)) |
inode | 61 | fs/minix/dir.c | while (filp->f_pos < inode->i_size) { |
inode | 63 | fs/minix/dir.c | block = minix_bmap(inode,(filp->f_pos)>>BLOCK_SIZE_BITS); |
inode | 64 | fs/minix/dir.c | if (!block || !(bh = bread(inode->i_dev,block,BLOCK_SIZE))) { |
inode | 69 | fs/minix/dir.c | while (offset < 1024 && filp->f_pos < inode->i_size) { |
inode | 72 | fs/minix/dir.c | if (de->inode) { |
inode | 79 | fs/minix/dir.c | put_fs_long(de->inode,&dirent->d_ino); |
inode | 27 | fs/minix/file.c | int minix_file_read(struct inode *, struct file *, char *, int); |
inode | 28 | fs/minix/file.c | static int minix_file_write(struct inode *, struct file *, char *, int); |
inode | 76 | fs/minix/file.c | int minix_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 83 | fs/minix/file.c | if (!inode) { |
inode | 87 | fs/minix/file.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) { |
inode | 88 | fs/minix/file.c | printk("minix_file_read: mode = %07o\n",inode->i_mode); |
inode | 91 | fs/minix/file.c | if (filp->f_pos > inode->i_size) |
inode | 94 | fs/minix/file.c | left = inode->i_size - filp->f_pos; |
inode | 107 | fs/minix/file.c | if (nr = minix_bmap(inode,block++)) { |
inode | 108 | fs/minix/file.c | *bhb = getblk(inode->i_dev,nr,BLOCK_SIZE); |
inode | 153 | fs/minix/file.c | if (!IS_RDONLY(inode)) { |
inode | 154 | fs/minix/file.c | inode->i_atime = CURRENT_TIME; |
inode | 155 | fs/minix/file.c | inode->i_dirt = 1; |
inode | 160 | fs/minix/file.c | static int minix_file_write(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 167 | fs/minix/file.c | if (!inode) { |
inode | 171 | fs/minix/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 172 | fs/minix/file.c | printk("minix_file_write: mode = %07o\n",inode->i_mode); |
inode | 180 | fs/minix/file.c | pos = inode->i_size; |
inode | 185 | fs/minix/file.c | if (!(block = minix_create_block(inode,pos/BLOCK_SIZE))) { |
inode | 194 | fs/minix/file.c | bh = getblk(inode->i_dev, block, BLOCK_SIZE); |
inode | 196 | fs/minix/file.c | bh = bread(inode->i_dev,block, BLOCK_SIZE); |
inode | 204 | fs/minix/file.c | if (pos > inode->i_size) { |
inode | 205 | fs/minix/file.c | inode->i_size = pos; |
inode | 206 | fs/minix/file.c | inode->i_dirt = 1; |
inode | 215 | fs/minix/file.c | inode->i_mtime = CURRENT_TIME; |
inode | 216 | fs/minix/file.c | inode->i_ctime = CURRENT_TIME; |
inode | 218 | fs/minix/file.c | inode->i_dirt = 1; |
inode | 19 | fs/minix/inode.c | void minix_put_inode(struct inode *inode) |
inode | 21 | fs/minix/inode.c | inode->i_size = 0; |
inode | 22 | fs/minix/inode.c | minix_truncate(inode); |
inode | 23 | fs/minix/inode.c | minix_free_inode(inode); |
inode | 133 | fs/minix/inode.c | static int _minix_bmap(struct inode * inode,int block,int create) |
inode | 147 | fs/minix/inode.c | if (create && !inode->i_data[block]) |
inode | 148 | fs/minix/inode.c | if (inode->i_data[block]=minix_new_block(inode->i_dev)) { |
inode | 149 | fs/minix/inode.c | inode->i_ctime=CURRENT_TIME; |
inode | 150 | fs/minix/inode.c | inode->i_dirt=1; |
inode | 152 | fs/minix/inode.c | return inode->i_data[block]; |
inode | 156 | fs/minix/inode.c | if (create && !inode->i_data[7]) |
inode | 157 | fs/minix/inode.c | if (inode->i_data[7]=minix_new_block(inode->i_dev)) { |
inode | 158 | fs/minix/inode.c | inode->i_dirt=1; |
inode | 159 | fs/minix/inode.c | inode->i_ctime=CURRENT_TIME; |
inode | 161 | fs/minix/inode.c | if (!inode->i_data[7]) |
inode | 163 | fs/minix/inode.c | if (!(bh = bread(inode->i_dev,inode->i_data[7],BLOCK_SIZE))) |
inode | 167 | fs/minix/inode.c | if (i=minix_new_block(inode->i_dev)) { |
inode | 175 | fs/minix/inode.c | if (create && !inode->i_data[8]) |
inode | 176 | fs/minix/inode.c | if (inode->i_data[8]=minix_new_block(inode->i_dev)) { |
inode | 177 | fs/minix/inode.c | inode->i_dirt=1; |
inode | 178 | fs/minix/inode.c | inode->i_ctime=CURRENT_TIME; |
inode | 180 | fs/minix/inode.c | if (!inode->i_data[8]) |
inode | 182 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,inode->i_data[8], BLOCK_SIZE))) |
inode | 186 | fs/minix/inode.c | if (i=minix_new_block(inode->i_dev)) { |
inode | 193 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,i,BLOCK_SIZE))) |
inode | 197 | fs/minix/inode.c | if (i=minix_new_block(inode->i_dev)) { |
inode | 205 | fs/minix/inode.c | int minix_bmap(struct inode * inode,int block) |
inode | 207 | fs/minix/inode.c | return _minix_bmap(inode,block,0); |
inode | 210 | fs/minix/inode.c | int minix_create_block(struct inode * inode, int block) |
inode | 212 | fs/minix/inode.c | return _minix_bmap(inode,block,1); |
inode | 215 | fs/minix/inode.c | void minix_read_inode(struct inode * inode) |
inode | 221 | fs/minix/inode.c | block = 2 + inode->i_sb->u.minix_sb.s_imap_blocks + inode->i_sb->u.minix_sb.s_zmap_blocks + |
inode | 222 | fs/minix/inode.c | (inode->i_ino-1)/MINIX_INODES_PER_BLOCK; |
inode | 223 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,block, BLOCK_SIZE))) |
inode | 226 | fs/minix/inode.c | (inode->i_ino-1)%MINIX_INODES_PER_BLOCK; |
inode | 227 | fs/minix/inode.c | inode->i_mode = raw_inode->i_mode; |
inode | 228 | fs/minix/inode.c | inode->i_uid = raw_inode->i_uid; |
inode | 229 | fs/minix/inode.c | inode->i_gid = raw_inode->i_gid; |
inode | 230 | fs/minix/inode.c | inode->i_nlink = raw_inode->i_nlinks; |
inode | 231 | fs/minix/inode.c | inode->i_size = raw_inode->i_size; |
inode | 232 | fs/minix/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = raw_inode->i_time; |
inode | 233 | fs/minix/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 234 | fs/minix/inode.c | inode->i_rdev = raw_inode->i_zone[0]; |
inode | 236 | fs/minix/inode.c | inode->i_data[block] = raw_inode->i_zone[block]; |
inode | 238 | fs/minix/inode.c | inode->i_op = NULL; |
inode | 239 | fs/minix/inode.c | if (S_ISREG(inode->i_mode)) |
inode | 240 | fs/minix/inode.c | inode->i_op = &minix_file_inode_operations; |
inode | 241 | fs/minix/inode.c | else if (S_ISDIR(inode->i_mode)) |
inode | 242 | fs/minix/inode.c | inode->i_op = &minix_dir_inode_operations; |
inode | 243 | fs/minix/inode.c | else if (S_ISLNK(inode->i_mode)) |
inode | 244 | fs/minix/inode.c | inode->i_op = &minix_symlink_inode_operations; |
inode | 245 | fs/minix/inode.c | else if (S_ISCHR(inode->i_mode)) |
inode | 246 | fs/minix/inode.c | inode->i_op = &minix_chrdev_inode_operations; |
inode | 247 | fs/minix/inode.c | else if (S_ISBLK(inode->i_mode)) |
inode | 248 | fs/minix/inode.c | inode->i_op = &minix_blkdev_inode_operations; |
inode | 249 | fs/minix/inode.c | else if (S_ISFIFO(inode->i_mode)) { |
inode | 250 | fs/minix/inode.c | inode->i_op = &minix_fifo_inode_operations; |
inode | 251 | fs/minix/inode.c | inode->i_size = 0; |
inode | 252 | fs/minix/inode.c | inode->i_pipe = 1; |
inode | 253 | fs/minix/inode.c | PIPE_HEAD(*inode) = PIPE_TAIL(*inode) = 0; |
inode | 254 | fs/minix/inode.c | PIPE_READERS(*inode) = PIPE_WRITERS(*inode) = 0; |
inode | 258 | fs/minix/inode.c | void minix_write_inode(struct inode * inode) |
inode | 264 | fs/minix/inode.c | block = 2 + inode->i_sb->u.minix_sb.s_imap_blocks + inode->i_sb->u.minix_sb.s_zmap_blocks + |
inode | 265 | fs/minix/inode.c | (inode->i_ino-1)/MINIX_INODES_PER_BLOCK; |
inode | 266 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
inode | 269 | fs/minix/inode.c | (inode->i_ino-1)%MINIX_INODES_PER_BLOCK; |
inode | 270 | fs/minix/inode.c | raw_inode->i_mode = inode->i_mode; |
inode | 271 | fs/minix/inode.c | raw_inode->i_uid = inode->i_uid; |
inode | 272 | fs/minix/inode.c | raw_inode->i_gid = inode->i_gid; |
inode | 273 | fs/minix/inode.c | raw_inode->i_nlinks = inode->i_nlink; |
inode | 274 | fs/minix/inode.c | raw_inode->i_size = inode->i_size; |
inode | 275 | fs/minix/inode.c | raw_inode->i_time = inode->i_mtime; |
inode | 276 | fs/minix/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 277 | fs/minix/inode.c | raw_inode->i_zone[0] = inode->i_rdev; |
inode | 279 | fs/minix/inode.c | raw_inode->i_zone[block] = inode->i_data[block]; |
inode | 281 | fs/minix/inode.c | inode->i_dirt=0; |
inode | 36 | fs/minix/namei.c | if (!de || !de->inode || len > MINIX_NAME_LEN) |
inode | 60 | fs/minix/namei.c | static struct buffer_head * minix_find_entry(struct inode * dir, |
inode | 107 | fs/minix/namei.c | int minix_lookup(struct inode * dir,const char * name, int len, |
inode | 108 | fs/minix/namei.c | struct inode ** result) |
inode | 125 | fs/minix/namei.c | ino = de->inode; |
inode | 145 | fs/minix/namei.c | static struct buffer_head * minix_add_entry(struct inode * dir, |
inode | 184 | fs/minix/namei.c | de->inode=0; |
inode | 189 | fs/minix/namei.c | if (!de->inode) { |
inode | 204 | fs/minix/namei.c | int minix_create(struct inode * dir,const char * name, int len, int mode, |
inode | 205 | fs/minix/namei.c | struct inode ** result) |
inode | 207 | fs/minix/namei.c | struct inode * inode; |
inode | 214 | fs/minix/namei.c | inode = minix_new_inode(dir->i_dev); |
inode | 215 | fs/minix/namei.c | if (!inode) { |
inode | 219 | fs/minix/namei.c | inode->i_op = &minix_file_inode_operations; |
inode | 220 | fs/minix/namei.c | inode->i_mode = mode; |
inode | 221 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 224 | fs/minix/namei.c | inode->i_nlink--; |
inode | 225 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 226 | fs/minix/namei.c | iput(inode); |
inode | 230 | fs/minix/namei.c | de->inode = inode->i_ino; |
inode | 234 | fs/minix/namei.c | *result = inode; |
inode | 238 | fs/minix/namei.c | int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev) |
inode | 240 | fs/minix/namei.c | struct inode * inode; |
inode | 252 | fs/minix/namei.c | inode = minix_new_inode(dir->i_dev); |
inode | 253 | fs/minix/namei.c | if (!inode) { |
inode | 257 | fs/minix/namei.c | inode->i_uid = current->euid; |
inode | 258 | fs/minix/namei.c | inode->i_mode = mode; |
inode | 259 | fs/minix/namei.c | inode->i_op = NULL; |
inode | 260 | fs/minix/namei.c | if (S_ISREG(inode->i_mode)) |
inode | 261 | fs/minix/namei.c | inode->i_op = &minix_file_inode_operations; |
inode | 262 | fs/minix/namei.c | else if (S_ISDIR(inode->i_mode)) |
inode | 263 | fs/minix/namei.c | inode->i_op = &minix_dir_inode_operations; |
inode | 264 | fs/minix/namei.c | else if (S_ISLNK(inode->i_mode)) |
inode | 265 | fs/minix/namei.c | inode->i_op = &minix_symlink_inode_operations; |
inode | 266 | fs/minix/namei.c | else if (S_ISCHR(inode->i_mode)) |
inode | 267 | fs/minix/namei.c | inode->i_op = &minix_chrdev_inode_operations; |
inode | 268 | fs/minix/namei.c | else if (S_ISBLK(inode->i_mode)) |
inode | 269 | fs/minix/namei.c | inode->i_op = &minix_blkdev_inode_operations; |
inode | 270 | fs/minix/namei.c | else if (S_ISFIFO(inode->i_mode)) { |
inode | 271 | fs/minix/namei.c | inode->i_op = &minix_fifo_inode_operations; |
inode | 272 | fs/minix/namei.c | inode->i_size = 0; |
inode | 273 | fs/minix/namei.c | inode->i_pipe = 1; |
inode | 274 | fs/minix/namei.c | PIPE_HEAD(*inode) = PIPE_TAIL(*inode) = 0; |
inode | 275 | fs/minix/namei.c | PIPE_READERS(*inode) = PIPE_WRITERS(*inode) = 0; |
inode | 278 | fs/minix/namei.c | inode->i_rdev = rdev; |
inode | 279 | fs/minix/namei.c | inode->i_mtime = inode->i_atime = CURRENT_TIME; |
inode | 280 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 283 | fs/minix/namei.c | inode->i_nlink--; |
inode | 284 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 285 | fs/minix/namei.c | iput(inode); |
inode | 289 | fs/minix/namei.c | de->inode = inode->i_ino; |
inode | 293 | fs/minix/namei.c | iput(inode); |
inode | 297 | fs/minix/namei.c | int minix_mkdir(struct inode * dir, const char * name, int len, int mode) |
inode | 299 | fs/minix/namei.c | struct inode * inode; |
inode | 309 | fs/minix/namei.c | inode = minix_new_inode(dir->i_dev); |
inode | 310 | fs/minix/namei.c | if (!inode) { |
inode | 314 | fs/minix/namei.c | inode->i_op = &minix_dir_inode_operations; |
inode | 315 | fs/minix/namei.c | inode->i_size = 2 * sizeof (struct minix_dir_entry); |
inode | 316 | fs/minix/namei.c | inode->i_mtime = inode->i_atime = CURRENT_TIME; |
inode | 317 | fs/minix/namei.c | if (!(inode->i_data[0] = minix_new_block(inode->i_dev))) { |
inode | 319 | fs/minix/namei.c | inode->i_nlink--; |
inode | 320 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 321 | fs/minix/namei.c | iput(inode); |
inode | 324 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 325 | fs/minix/namei.c | if (!(dir_block = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
inode | 327 | fs/minix/namei.c | inode->i_nlink--; |
inode | 328 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 329 | fs/minix/namei.c | iput(inode); |
inode | 333 | fs/minix/namei.c | de->inode=inode->i_ino; |
inode | 336 | fs/minix/namei.c | de->inode = dir->i_ino; |
inode | 338 | fs/minix/namei.c | inode->i_nlink = 2; |
inode | 341 | fs/minix/namei.c | inode->i_mode = I_DIRECTORY | (mode & 0777 & ~current->umask); |
inode | 342 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 346 | fs/minix/namei.c | inode->i_nlink=0; |
inode | 347 | fs/minix/namei.c | iput(inode); |
inode | 350 | fs/minix/namei.c | de->inode = inode->i_ino; |
inode | 355 | fs/minix/namei.c | iput(inode); |
inode | 363 | fs/minix/namei.c | static int empty_dir(struct inode * inode) |
inode | 370 | fs/minix/namei.c | len = inode->i_size / sizeof (struct minix_dir_entry); |
inode | 371 | fs/minix/namei.c | if (len<2 || !inode->i_data[0] || |
inode | 372 | fs/minix/namei.c | !(bh=bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
inode | 373 | fs/minix/namei.c | printk("warning - bad directory on dev %04x\n",inode->i_dev); |
inode | 377 | fs/minix/namei.c | if (de[0].inode != inode->i_ino || !de[1].inode || |
inode | 379 | fs/minix/namei.c | printk("warning - bad directory on dev %04x\n",inode->i_dev); |
inode | 387 | fs/minix/namei.c | block = minix_bmap(inode,nr/MINIX_DIR_ENTRIES_PER_BLOCK); |
inode | 392 | fs/minix/namei.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
inode | 396 | fs/minix/namei.c | if (de->inode) { |
inode | 407 | fs/minix/namei.c | int minix_rmdir(struct inode * dir, const char * name, int len) |
inode | 410 | fs/minix/namei.c | struct inode * inode; |
inode | 414 | fs/minix/namei.c | inode = NULL; |
inode | 420 | fs/minix/namei.c | if (!(inode = iget(dir->i_dev, de->inode))) |
inode | 423 | fs/minix/namei.c | inode->i_uid != current->euid) |
inode | 425 | fs/minix/namei.c | if (inode->i_dev != dir->i_dev) |
inode | 427 | fs/minix/namei.c | if (inode == dir) /* we may not delete ".", but "../dir" is ok */ |
inode | 429 | fs/minix/namei.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 433 | fs/minix/namei.c | if (!empty_dir(inode)) { |
inode | 437 | fs/minix/namei.c | if (inode->i_count > 1) { |
inode | 441 | fs/minix/namei.c | if (inode->i_nlink != 2) |
inode | 442 | fs/minix/namei.c | printk("empty directory has nlink!=2 (%d)\n",inode->i_nlink); |
inode | 443 | fs/minix/namei.c | de->inode = 0; |
inode | 445 | fs/minix/namei.c | inode->i_nlink=0; |
inode | 446 | fs/minix/namei.c | inode->i_dirt=1; |
inode | 453 | fs/minix/namei.c | iput(inode); |
inode | 458 | fs/minix/namei.c | int minix_unlink(struct inode * dir, const char * name, int len) |
inode | 461 | fs/minix/namei.c | struct inode * inode; |
inode | 466 | fs/minix/namei.c | inode = NULL; |
inode | 470 | fs/minix/namei.c | if (!(inode = iget(dir->i_dev, de->inode))) |
inode | 474 | fs/minix/namei.c | current->euid != inode->i_uid && |
inode | 477 | fs/minix/namei.c | if (S_ISDIR(inode->i_mode)) |
inode | 479 | fs/minix/namei.c | if (!inode->i_nlink) { |
inode | 481 | fs/minix/namei.c | inode->i_dev,inode->i_ino,inode->i_nlink); |
inode | 482 | fs/minix/namei.c | inode->i_nlink=1; |
inode | 484 | fs/minix/namei.c | de->inode = 0; |
inode | 486 | fs/minix/namei.c | inode->i_nlink--; |
inode | 487 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 488 | fs/minix/namei.c | inode->i_ctime = CURRENT_TIME; |
inode | 492 | fs/minix/namei.c | iput(inode); |
inode | 497 | fs/minix/namei.c | int minix_symlink(struct inode * dir, const char * name, int len, const char * symname) |
inode | 500 | fs/minix/namei.c | struct inode * inode = NULL; |
inode | 505 | fs/minix/namei.c | if (!(inode = minix_new_inode(dir->i_dev))) { |
inode | 509 | fs/minix/namei.c | inode->i_mode = S_IFLNK | 0777; |
inode | 510 | fs/minix/namei.c | inode->i_op = &minix_symlink_inode_operations; |
inode | 511 | fs/minix/namei.c | if (!(inode->i_data[0] = minix_new_block(inode->i_dev))) { |
inode | 513 | fs/minix/namei.c | inode->i_nlink--; |
inode | 514 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 515 | fs/minix/namei.c | iput(inode); |
inode | 518 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 519 | fs/minix/namei.c | if (!(name_block = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
inode | 521 | fs/minix/namei.c | inode->i_nlink--; |
inode | 522 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 523 | fs/minix/namei.c | iput(inode); |
inode | 532 | fs/minix/namei.c | inode->i_size = i; |
inode | 533 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 536 | fs/minix/namei.c | inode->i_nlink--; |
inode | 537 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 538 | fs/minix/namei.c | iput(inode); |
inode | 545 | fs/minix/namei.c | inode->i_nlink--; |
inode | 546 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 547 | fs/minix/namei.c | iput(inode); |
inode | 551 | fs/minix/namei.c | de->inode = inode->i_ino; |
inode | 555 | fs/minix/namei.c | iput(inode); |
inode | 559 | fs/minix/namei.c | int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len) |
inode | 582 | fs/minix/namei.c | de->inode = oldinode->i_ino; |
inode | 593 | fs/minix/namei.c | static int subdir(struct inode * new, struct inode * old) |
inode | 622 | fs/minix/namei.c | (((struct minix_dir_entry *) (buffer))[1].inode) |
inode | 637 | fs/minix/namei.c | static int do_minix_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 638 | fs/minix/namei.c | struct inode * new_dir, const char * new_name, int new_len) |
inode | 640 | fs/minix/namei.c | struct inode * old_inode, * new_inode; |
inode | 661 | fs/minix/namei.c | old_inode = iget(old_dir->i_dev, old_de->inode); |
inode | 670 | fs/minix/namei.c | new_inode = iget(new_dir->i_dev, new_de->inode); |
inode | 708 | fs/minix/namei.c | if (new_inode && (new_de->inode != new_inode->i_ino)) |
inode | 710 | fs/minix/namei.c | if (new_de->inode && !new_inode) |
inode | 712 | fs/minix/namei.c | if (old_de->inode != old_inode->i_ino) |
inode | 715 | fs/minix/namei.c | old_de->inode = 0; |
inode | 716 | fs/minix/namei.c | new_de->inode = old_inode->i_ino; |
inode | 752 | fs/minix/namei.c | int minix_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 753 | fs/minix/namei.c | struct inode * new_dir, const char * new_name, int new_len) |
inode | 17 | fs/minix/symlink.c | static int minix_readlink(struct inode *, char *, int); |
inode | 18 | fs/minix/symlink.c | static struct inode * minix_follow_link(struct inode *, struct inode *); |
inode | 40 | fs/minix/symlink.c | static struct inode * minix_follow_link(struct inode * dir, struct inode * inode) |
inode | 49 | fs/minix/symlink.c | if (!inode) { |
inode | 53 | fs/minix/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 55 | fs/minix/symlink.c | return inode; |
inode | 58 | fs/minix/symlink.c | if ((current->link_count > 5) || !inode->i_data[0] || |
inode | 59 | fs/minix/symlink.c | !(bh = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
inode | 61 | fs/minix/symlink.c | iput(inode); |
inode | 64 | fs/minix/symlink.c | iput(inode); |
inode | 67 | fs/minix/symlink.c | inode = _namei(bh->b_data,dir,1); |
inode | 71 | fs/minix/symlink.c | return inode; |
inode | 74 | fs/minix/symlink.c | static int minix_readlink(struct inode * inode, char * buffer, int buflen) |
inode | 80 | fs/minix/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 81 | fs/minix/symlink.c | iput(inode); |
inode | 86 | fs/minix/symlink.c | if (inode->i_data[0]) |
inode | 87 | fs/minix/symlink.c | bh = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE); |
inode | 90 | fs/minix/symlink.c | iput(inode); |
inode | 27 | fs/minix/truncate.c | static int trunc_direct(struct inode * inode) |
inode | 31 | fs/minix/truncate.c | #define DIRECT_BLOCK ((inode->i_size + 1023) >> 10) |
inode | 37 | fs/minix/truncate.c | if (!inode->i_data[i]) |
inode | 40 | fs/minix/truncate.c | if (minix_free_block(inode->i_dev,inode->i_data[i])) |
inode | 41 | fs/minix/truncate.c | inode->i_data[i] = 0; |
inode | 46 | fs/minix/truncate.c | static int trunc_indirect(struct inode * inode, int offset, unsigned short * p) |
inode | 55 | fs/minix/truncate.c | bh = bread(inode->i_dev, *p, BLOCK_SIZE); |
inode | 68 | fs/minix/truncate.c | if (minix_free_block(inode->i_dev,*ind)) |
inode | 78 | fs/minix/truncate.c | if (minix_free_block(inode->i_dev,*p)) |
inode | 84 | fs/minix/truncate.c | static int trunc_dindirect(struct inode * inode) |
inode | 92 | fs/minix/truncate.c | if (inode->i_data[8]) |
inode | 93 | fs/minix/truncate.c | bh = bread(inode->i_dev, inode->i_data[8], BLOCK_SIZE); |
inode | 105 | fs/minix/truncate.c | result |= trunc_indirect(inode,7+512+(i<<9),dind); |
inode | 114 | fs/minix/truncate.c | if (minix_free_block(inode->i_dev,inode->i_data[8])) |
inode | 115 | fs/minix/truncate.c | inode->i_data[8] = 0; |
inode | 120 | fs/minix/truncate.c | void minix_truncate(struct inode * inode) |
inode | 124 | fs/minix/truncate.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 125 | fs/minix/truncate.c | S_ISLNK(inode->i_mode))) |
inode | 127 | fs/minix/truncate.c | if (inode->i_data[7] & 0xffff0000) |
inode | 130 | fs/minix/truncate.c | flag = trunc_direct(inode); |
inode | 131 | fs/minix/truncate.c | flag |= trunc_indirect(inode,7,(unsigned short *)&inode->i_data[7]); |
inode | 132 | fs/minix/truncate.c | flag |= trunc_dindirect(inode); |
inode | 138 | fs/minix/truncate.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 139 | fs/minix/truncate.c | inode->i_dirt = 1; |
inode | 147 | fs/minix/truncate.c | void minix_release(struct inode * inode, struct file * filp) |
inode | 17 | fs/msdos/dir.c | static int msdos_dummy_read(struct inode *inode,struct file *filp,char *buf, |
inode | 19 | fs/msdos/dir.c | static int msdos_readdir(struct inode *inode,struct file *filp, |
inode | 54 | fs/msdos/dir.c | static int msdos_dummy_read(struct inode *inode,struct file *filp,char *buf, |
inode | 67 | fs/msdos/dir.c | static int msdos_readdir(struct inode *inode,struct file *filp, |
inode | 75 | fs/msdos/dir.c | if (!inode || !S_ISDIR(inode->i_mode)) return -EBADF; |
inode | 76 | fs/msdos/dir.c | if (inode->i_ino == MSDOS_ROOT_INO) { |
inode | 91 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
inode | 114 | fs/msdos/dir.c | ino = inode->i_ino; |
inode | 116 | fs/msdos/dir.c | ino = msdos_parent_ino(inode,0); |
inode | 117 | fs/msdos/fat.c | void cache_lookup(struct inode *inode,int cluster,int *f_clu,int *d_clu) |
inode | 125 | fs/msdos/fat.c | if (inode->i_dev == walk->device && walk->ino == inode->i_ino && |
inode | 152 | fs/msdos/fat.c | void cache_add(struct inode *inode,int f_clu,int d_clu) |
inode | 161 | fs/msdos/fat.c | if (inode->i_dev == walk->device && walk->ino == inode->i_ino && |
inode | 175 | fs/msdos/fat.c | walk->device = inode->i_dev; |
inode | 176 | fs/msdos/fat.c | walk->ino = inode->i_ino; |
inode | 191 | fs/msdos/fat.c | void cache_inval_inode(struct inode *inode) |
inode | 196 | fs/msdos/fat.c | if (walk->device == inode->i_dev && walk->ino == inode->i_ino) |
inode | 210 | fs/msdos/fat.c | int get_cluster(struct inode *inode,int cluster) |
inode | 214 | fs/msdos/fat.c | if (!(this = inode->i_data[D_START])) return 0; |
inode | 217 | fs/msdos/fat.c | for (cache_lookup(inode,cluster,&count,&this); count < cluster; |
inode | 219 | fs/msdos/fat.c | if ((this = fat_access(inode->i_sb,this,-1)) == -1) return 0; |
inode | 222 | fs/msdos/fat.c | cache_add(inode,cluster,this); |
inode | 227 | fs/msdos/fat.c | int msdos_smap(struct inode *inode,int sector) |
inode | 232 | fs/msdos/fat.c | sb = MSDOS_SB(inode->i_sb); |
inode | 233 | fs/msdos/fat.c | if (inode->i_ino == MSDOS_ROOT_INO || (S_ISDIR(inode->i_mode) && |
inode | 234 | fs/msdos/fat.c | !inode->i_data[D_START])) { |
inode | 240 | fs/msdos/fat.c | if (!(cluster = get_cluster(inode,cluster))) return 0; |
inode | 248 | fs/msdos/fat.c | int fat_free(struct inode *inode,int skip) |
inode | 252 | fs/msdos/fat.c | if (!(this = inode->i_data[D_START])) return 0; |
inode | 256 | fs/msdos/fat.c | if ((this = fat_access(inode->i_sb,this,-1)) == -1) |
inode | 264 | fs/msdos/fat.c | fat_access(inode->i_sb,last,MSDOS_SB(inode->i_sb)->fat_bits == |
inode | 267 | fs/msdos/fat.c | inode->i_data[D_START] = 0; |
inode | 268 | fs/msdos/fat.c | inode->i_dirt = 1; |
inode | 271 | fs/msdos/fat.c | if (!(this = fat_access(inode->i_sb,this,0))) |
inode | 273 | fs/msdos/fat.c | cache_inval_inode(inode); |
inode | 22 | fs/msdos/file.c | static int msdos_file_read(struct inode *inode,struct file *filp,char *buf, |
inode | 24 | fs/msdos/file.c | static int msdos_file_write(struct inode *inode,struct file *filp,char *buf, |
inode | 76 | fs/msdos/file.c | static int msdos_file_read(struct inode *inode,struct file *filp,char *buf, |
inode | 86 | fs/msdos/file.c | if (!inode) { |
inode | 90 | fs/msdos/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 91 | fs/msdos/file.c | printk("msdos_file_read: mode = %07o\n",inode->i_mode); |
inode | 94 | fs/msdos/file.c | if (filp->f_pos >= inode->i_size || count <= 0) return 0; |
inode | 96 | fs/msdos/file.c | while (left = MIN(inode->i_size-filp->f_pos,count-(buf-start))) { |
inode | 97 | fs/msdos/file.c | if (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS))) |
inode | 100 | fs/msdos/file.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) break; |
inode | 102 | fs/msdos/file.c | if (inode->i_data[D_BINARY]) { |
inode | 112 | fs/msdos/file.c | filp->f_pos = inode->i_size; |
inode | 125 | fs/msdos/file.c | static int msdos_file_write(struct inode *inode,struct file *filp,char *buf, |
inode | 134 | fs/msdos/file.c | if (!inode) { |
inode | 138 | fs/msdos/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 139 | fs/msdos/file.c | printk("msdos_file_write: mode = %07o\n",inode->i_mode); |
inode | 146 | fs/msdos/file.c | if (filp->f_flags & O_APPEND) filp->f_pos = inode->i_size; |
inode | 150 | fs/msdos/file.c | while (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS))) |
inode | 151 | fs/msdos/file.c | if ((error = msdos_add_cluster(inode)) < 0) break; |
inode | 155 | fs/msdos/file.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) { |
inode | 159 | fs/msdos/file.c | if (inode->i_data[D_BINARY]) { |
inode | 186 | fs/msdos/file.c | if (filp->f_pos > inode->i_size) { |
inode | 187 | fs/msdos/file.c | inode->i_size = filp->f_pos; |
inode | 188 | fs/msdos/file.c | inode->i_dirt = 1; |
inode | 193 | fs/msdos/file.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 194 | fs/msdos/file.c | inode->i_data[D_ATTRS] |= ATTR_ARCH; |
inode | 195 | fs/msdos/file.c | inode->i_dirt = 1; |
inode | 200 | fs/msdos/file.c | void msdos_truncate(struct inode *inode) |
inode | 204 | fs/msdos/file.c | cluster = SECTOR_SIZE*MSDOS_SB(inode->i_sb)->cluster_size; |
inode | 205 | fs/msdos/file.c | (void) fat_free(inode,(inode->i_size+(cluster-1))/cluster); |
inode | 206 | fs/msdos/file.c | inode->i_data[D_ATTRS] |= ATTR_ARCH; |
inode | 207 | fs/msdos/file.c | inode->i_dirt = 1; |
inode | 16 | fs/msdos/inode.c | void msdos_put_inode(struct inode *inode) |
inode | 18 | fs/msdos/inode.c | struct inode *depend; |
inode | 20 | fs/msdos/inode.c | inode->i_size = 0; |
inode | 21 | fs/msdos/inode.c | msdos_truncate(inode); |
inode | 22 | fs/msdos/inode.c | depend = (struct inode *) inode->i_data[D_DEPEND]; |
inode | 23 | fs/msdos/inode.c | memset(inode,0,sizeof(struct inode)); |
inode | 25 | fs/msdos/inode.c | if ((struct inode *) depend->i_data[D_OLD] != inode) { |
inode | 27 | fs/msdos/inode.c | "0x%X\r\n",(int) depend,(int) inode, |
inode | 176 | fs/msdos/inode.c | int msdos_bmap(struct inode *inode,int block) |
inode | 181 | fs/msdos/inode.c | sb = MSDOS_SB(inode->i_sb); |
inode | 183 | fs/msdos/inode.c | if (inode->i_ino == MSDOS_ROOT_INO) { |
inode | 189 | fs/msdos/inode.c | if (!(cluster = get_cluster(inode,cluster))) return 0; |
inode | 194 | fs/msdos/inode.c | void msdos_read_inode(struct inode *inode) |
inode | 201 | fs/msdos/inode.c | inode->i_data[D_BUSY] = inode->i_data[D_DEPEND] = |
inode | 202 | fs/msdos/inode.c | inode->i_data[D_OLD] = 0; |
inode | 203 | fs/msdos/inode.c | inode->i_data[D_BINARY] = 1; |
inode | 204 | fs/msdos/inode.c | inode->i_uid = MSDOS_SB(inode->i_sb)->fs_uid; |
inode | 205 | fs/msdos/inode.c | inode->i_gid = MSDOS_SB(inode->i_sb)->fs_gid; |
inode | 206 | fs/msdos/inode.c | if (inode->i_ino == MSDOS_ROOT_INO) { |
inode | 207 | fs/msdos/inode.c | inode->i_mode = (0777 & ~MSDOS_SB(inode->i_sb)->fs_umask) | |
inode | 209 | fs/msdos/inode.c | inode->i_op = &msdos_dir_inode_operations; |
inode | 210 | fs/msdos/inode.c | inode->i_nlink = 1; |
inode | 211 | fs/msdos/inode.c | inode->i_size = MSDOS_SB(inode->i_sb)->dir_entries* |
inode | 213 | fs/msdos/inode.c | inode->i_data[D_START] = 0; |
inode | 214 | fs/msdos/inode.c | inode->i_data[D_ATTRS] = 0; |
inode | 215 | fs/msdos/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = 0; |
inode | 218 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, BLOCK_SIZE))) |
inode | 221 | fs/msdos/inode.c | [inode->i_ino & (MSDOS_DPB-1)]; |
inode | 223 | fs/msdos/inode.c | inode->i_mode = MSDOS_MKMODE(raw_entry->attr,0777 & |
inode | 224 | fs/msdos/inode.c | ~MSDOS_SB(inode->i_sb)->fs_umask) | S_IFDIR; |
inode | 225 | fs/msdos/inode.c | inode->i_op = &msdos_dir_inode_operations; |
inode | 226 | fs/msdos/inode.c | inode->i_nlink = 3; |
inode | 227 | fs/msdos/inode.c | inode->i_size = 0; |
inode | 229 | fs/msdos/inode.c | fat_access(inode->i_sb,this,-1)) |
inode | 230 | fs/msdos/inode.c | inode->i_size += SECTOR_SIZE*MSDOS_SB(inode->i_sb)-> |
inode | 234 | fs/msdos/inode.c | inode->i_mode = MSDOS_MKMODE(raw_entry->attr,0666 & |
inode | 235 | fs/msdos/inode.c | ~MSDOS_SB(inode->i_sb)->fs_umask) | S_IFREG; |
inode | 236 | fs/msdos/inode.c | inode->i_op = MSDOS_CAN_BMAP(MSDOS_SB(inode->i_sb)) ? |
inode | 239 | fs/msdos/inode.c | inode->i_nlink = 1; |
inode | 240 | fs/msdos/inode.c | inode->i_size = raw_entry->size; |
inode | 242 | fs/msdos/inode.c | inode->i_data[D_BINARY] = is_binary(MSDOS_SB(inode->i_sb)->conversion, |
inode | 244 | fs/msdos/inode.c | inode->i_data[D_START] = raw_entry->start; |
inode | 245 | fs/msdos/inode.c | inode->i_data[D_ATTRS] = raw_entry->attr & ATTR_UNUSED; |
inode | 246 | fs/msdos/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = |
inode | 252 | fs/msdos/inode.c | void msdos_write_inode(struct inode *inode) |
inode | 257 | fs/msdos/inode.c | inode->i_dirt = 0; |
inode | 258 | fs/msdos/inode.c | if (inode->i_ino == MSDOS_ROOT_INO || !inode->i_nlink) return; |
inode | 259 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, BLOCK_SIZE))) |
inode | 262 | fs/msdos/inode.c | [inode->i_ino & (MSDOS_DPB-1)]; |
inode | 263 | fs/msdos/inode.c | if (S_ISDIR(inode->i_mode)) { |
inode | 269 | fs/msdos/inode.c | raw_entry->size = inode->i_size; |
inode | 271 | fs/msdos/inode.c | raw_entry->attr |= MSDOS_MKATTR(inode->i_mode) | inode->i_data[D_ATTRS]; |
inode | 272 | fs/msdos/inode.c | raw_entry->start = inode->i_data[D_START]; |
inode | 273 | fs/msdos/inode.c | date_unix2dos(inode->i_mtime,&raw_entry->time,&raw_entry->date); |
inode | 60 | fs/msdos/misc.c | int msdos_add_cluster(struct inode *inode) |
inode | 69 | fs/msdos/misc.c | if (inode->i_ino == MSDOS_ROOT_INO) return -ENOSPC; |
inode | 72 | fs/msdos/misc.c | limit = MSDOS_SB(inode->i_sb)->clusters; |
inode | 76 | fs/msdos/misc.c | if (fat_access(inode->i_sb,this,-1) == 0) break; |
inode | 87 | fs/msdos/misc.c | fat_access(inode->i_sb,this,MSDOS_SB(inode->i_sb)->fat_bits == 12 ? |
inode | 92 | fs/msdos/misc.c | printk("set to %x\r\n",fat_access(inode->i_sb,this,-1)); |
inode | 94 | fs/msdos/misc.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 95 | fs/msdos/misc.c | last = inode->i_size ? get_cluster(inode,(inode->i_size-1)/ |
inode | 96 | fs/msdos/misc.c | SECTOR_SIZE/MSDOS_SB(inode->i_sb)->cluster_size) : 0; |
inode | 100 | fs/msdos/misc.c | if (current = inode->i_data[D_START]) { |
inode | 101 | fs/msdos/misc.c | cache_lookup(inode,0x7fffffff,&last,¤t); |
inode | 103 | fs/msdos/misc.c | if (!(current = fat_access(inode->i_sb, |
inode | 111 | fs/msdos/misc.c | if (last) fat_access(inode->i_sb,last,this); |
inode | 113 | fs/msdos/misc.c | inode->i_data[D_START] = this; |
inode | 114 | fs/msdos/misc.c | inode->i_dirt = 1; |
inode | 117 | fs/msdos/misc.c | if (last) printk("next set to %d\r\n",fat_access(inode->i_sb,last,-1)); |
inode | 119 | fs/msdos/misc.c | for (current = 0; current < MSDOS_SB(inode->i_sb)->cluster_size; |
inode | 121 | fs/msdos/misc.c | sector = MSDOS_SB(inode->i_sb)->data_start+(this-2)* |
inode | 122 | fs/msdos/misc.c | MSDOS_SB(inode->i_sb)->cluster_size+current; |
inode | 126 | fs/msdos/misc.c | if (current < MSDOS_SB(inode->i_sb)->cluster_size-1 && |
inode | 128 | fs/msdos/misc.c | if (!(bh = getblk(inode->i_dev,sector >> 1, BLOCK_SIZE))) |
inode | 137 | fs/msdos/misc.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) |
inode | 146 | fs/msdos/misc.c | if (S_ISDIR(inode->i_mode)) { |
inode | 147 | fs/msdos/misc.c | if (inode->i_size & (SECTOR_SIZE-1)) |
inode | 149 | fs/msdos/misc.c | inode->i_size += SECTOR_SIZE*MSDOS_SB(inode->i_sb)-> |
inode | 152 | fs/msdos/misc.c | printk("size is %d now (%x)\r\n",inode->i_size,inode); |
inode | 154 | fs/msdos/misc.c | inode->i_dirt = 1; |
inode | 211 | fs/msdos/misc.c | int msdos_get_entry(struct inode *dir,int *pos,struct buffer_head **bh, |
inode | 239 | fs/msdos/misc.c | int msdos_scan(struct inode *dir,char *name,struct buffer_head **res_bh, |
inode | 244 | fs/msdos/misc.c | struct inode *inode; |
inode | 256 | fs/msdos/misc.c | if (!(inode = iget(dir->i_dev,*ino))) break; |
inode | 257 | fs/msdos/misc.c | if (!inode->i_data[D_BUSY]) { |
inode | 258 | fs/msdos/misc.c | iput(inode); |
inode | 262 | fs/msdos/misc.c | iput(inode); |
inode | 340 | fs/msdos/misc.c | int msdos_parent_ino(struct inode *dir,int locked) |
inode | 90 | fs/msdos/namei.c | static int msdos_find(struct inode *dir,const char *name,int len, |
inode | 102 | fs/msdos/namei.c | int msdos_lookup(struct inode *dir,const char *name,int len, |
inode | 103 | fs/msdos/namei.c | struct inode **result) |
inode | 108 | fs/msdos/namei.c | struct inode *next; |
inode | 144 | fs/msdos/namei.c | next = (struct inode *) ((*result)->i_data[D_OLD]); |
inode | 156 | fs/msdos/namei.c | static int msdos_create_entry(struct inode *dir,char *name,int is_dir, |
inode | 157 | fs/msdos/namei.c | struct inode **result) |
inode | 184 | fs/msdos/namei.c | int msdos_create(struct inode *dir,const char *name,int len,int mode, |
inode | 185 | fs/msdos/namei.c | struct inode **result) |
inode | 212 | fs/msdos/namei.c | int msdos_mkdir(struct inode *dir,const char *name,int len,int mode) |
inode | 216 | fs/msdos/namei.c | struct inode *inode,*dot; |
inode | 232 | fs/msdos/namei.c | if ((res = msdos_create_entry(dir,msdos_name,1,&inode)) < 0) { |
inode | 237 | fs/msdos/namei.c | inode->i_data[D_BUSY] = 1; /* prevent lookups */ |
inode | 238 | fs/msdos/namei.c | if ((res = msdos_add_cluster(inode)) < 0) goto mkdir_error; |
inode | 239 | fs/msdos/namei.c | if ((res = msdos_create_entry(inode,MSDOS_DOT,1,&dot)) < 0) |
inode | 241 | fs/msdos/namei.c | dot->i_size = inode->i_size; |
inode | 242 | fs/msdos/namei.c | dot->i_data[D_START] = inode->i_data[D_START]; |
inode | 245 | fs/msdos/namei.c | if ((res = msdos_create_entry(inode,MSDOS_DOTDOT,1,&dot)) < 0) |
inode | 251 | fs/msdos/namei.c | inode->i_data[D_BUSY] = 0; |
inode | 253 | fs/msdos/namei.c | iput(inode); |
inode | 257 | fs/msdos/namei.c | iput(inode); |
inode | 264 | fs/msdos/namei.c | int msdos_rmdir(struct inode *dir,const char *name,int len) |
inode | 269 | fs/msdos/namei.c | struct inode *inode; |
inode | 272 | fs/msdos/namei.c | inode = NULL; |
inode | 277 | fs/msdos/namei.c | if (!(inode = iget(dir->i_dev,ino))) goto rmdir_done; |
inode | 279 | fs/msdos/namei.c | if (!S_ISDIR(inode->i_mode)) goto rmdir_done; |
inode | 281 | fs/msdos/namei.c | if (dir->i_dev != inode->i_dev || dir == inode) goto rmdir_done; |
inode | 282 | fs/msdos/namei.c | if (inode->i_count > 1) goto rmdir_done; |
inode | 283 | fs/msdos/namei.c | if (inode->i_data[D_START]) { /* may be zero in mkdir */ |
inode | 287 | fs/msdos/namei.c | while (msdos_get_entry(inode,&pos,&dbh,&dde) > -1) |
inode | 294 | fs/msdos/namei.c | inode->i_nlink = 0; |
inode | 296 | fs/msdos/namei.c | inode->i_dirt = dir->i_dirt = 1; |
inode | 303 | fs/msdos/namei.c | iput(inode); |
inode | 308 | fs/msdos/namei.c | int msdos_unlink(struct inode *dir,const char *name,int len) |
inode | 313 | fs/msdos/namei.c | struct inode *inode; |
inode | 316 | fs/msdos/namei.c | inode = NULL; |
inode | 319 | fs/msdos/namei.c | if (!(inode = iget(dir->i_dev,ino))) { |
inode | 323 | fs/msdos/namei.c | if (!S_ISREG(inode->i_mode)) { |
inode | 327 | fs/msdos/namei.c | inode->i_nlink = 0; |
inode | 328 | fs/msdos/namei.c | inode->i_data[D_BUSY] = 1; |
inode | 329 | fs/msdos/namei.c | inode->i_dirt = 1; |
inode | 334 | fs/msdos/namei.c | iput(inode); |
inode | 340 | fs/msdos/namei.c | static int rename_same_dir(struct inode *old_dir,char *old_name, |
inode | 341 | fs/msdos/namei.c | struct inode *new_dir,char *new_name,struct buffer_head *old_bh, |
inode | 346 | fs/msdos/namei.c | struct inode *new_inode,*old_inode; |
inode | 385 | fs/msdos/namei.c | static int rename_diff_dir(struct inode *old_dir,char *old_name, |
inode | 386 | fs/msdos/namei.c | struct inode *new_dir,char *new_name,struct buffer_head *old_bh, |
inode | 391 | fs/msdos/namei.c | struct inode *old_inode,*new_inode,*free_inode,*dotdot_inode,*walk; |
inode | 489 | fs/msdos/namei.c | int msdos_rename(struct inode *old_dir,const char *old_name,int old_len, |
inode | 490 | fs/msdos/namei.c | struct inode *new_dir,const char *new_name,int new_len) |
inode | 22 | fs/namei.c | struct inode * _namei(const char * filename, struct inode * base, |
inode | 40 | fs/namei.c | int permission(struct inode * inode,int mask) |
inode | 42 | fs/namei.c | int mode = inode->i_mode; |
inode | 45 | fs/namei.c | if (inode->i_dev && !inode->i_nlink) |
inode | 47 | fs/namei.c | else if (current->euid == inode->i_uid) |
inode | 49 | fs/namei.c | else if (in_group_p(inode->i_gid)) |
inode | 61 | fs/namei.c | int lookup(struct inode * dir,const char * name, int len, |
inode | 62 | fs/namei.c | struct inode ** result) |
inode | 94 | fs/namei.c | struct inode * follow_link(struct inode * dir, struct inode * inode) |
inode | 96 | fs/namei.c | if (!dir || !inode) { |
inode | 98 | fs/namei.c | iput(inode); |
inode | 101 | fs/namei.c | if (!inode->i_op || !inode->i_op->follow_link) { |
inode | 103 | fs/namei.c | return inode; |
inode | 105 | fs/namei.c | return inode->i_op->follow_link(dir,inode); |
inode | 114 | fs/namei.c | static struct inode * dir_namei(const char * pathname, |
inode | 115 | fs/namei.c | int * namelen, const char ** name, struct inode * base) |
inode | 120 | fs/namei.c | struct inode * inode; |
inode | 139 | fs/namei.c | error = lookup(base,thisname,len,&inode); |
inode | 144 | fs/namei.c | if (!(base = follow_link(base,inode))) |
inode | 152 | fs/namei.c | struct inode * _namei(const char * pathname, struct inode * base, |
inode | 157 | fs/namei.c | struct inode * inode; |
inode | 162 | fs/namei.c | error = lookup(base,basename,namelen,&inode); |
inode | 168 | fs/namei.c | inode = follow_link(base,inode); |
inode | 171 | fs/namei.c | return inode; |
inode | 174 | fs/namei.c | struct inode * lnamei(const char * pathname) |
inode | 186 | fs/namei.c | struct inode * namei(const char * pathname) |
inode | 197 | fs/namei.c | struct inode ** res_inode) |
inode | 201 | fs/namei.c | struct inode * dir, *inode; |
inode | 219 | fs/namei.c | error = lookup(dir,basename,namelen,&inode); |
inode | 241 | fs/namei.c | iput(inode); |
inode | 244 | fs/namei.c | if (!(inode = follow_link(dir,inode))) |
inode | 246 | fs/namei.c | if (S_ISBLK(inode->i_mode) || S_ISCHR(inode->i_mode)) { |
inode | 247 | fs/namei.c | if (IS_NODEV(inode)) { |
inode | 248 | fs/namei.c | iput(inode); |
inode | 252 | fs/namei.c | if (IS_RDONLY(inode) && (flag & (O_TRUNC | O_ACCMODE))) { |
inode | 253 | fs/namei.c | iput(inode); |
inode | 257 | fs/namei.c | if ((S_ISDIR(inode->i_mode) && (flag & O_ACCMODE)) || |
inode | 258 | fs/namei.c | !permission(inode,ACC_MODE(flag))) { |
inode | 259 | fs/namei.c | iput(inode); |
inode | 262 | fs/namei.c | if ((inode->i_count > 1) && (flag & O_ACCMODE)) |
inode | 266 | fs/namei.c | if (inode == (*p)->executable) { |
inode | 267 | fs/namei.c | iput(inode); |
inode | 271 | fs/namei.c | if (inode == (*p)->libraries[i].library) { |
inode | 272 | fs/namei.c | iput(inode); |
inode | 277 | fs/namei.c | if (inode->i_op && inode->i_op->truncate) { |
inode | 278 | fs/namei.c | inode->i_size = 0; |
inode | 279 | fs/namei.c | inode->i_op->truncate(inode); |
inode | 281 | fs/namei.c | if (!IS_RDONLY(inode)) { |
inode | 282 | fs/namei.c | inode->i_atime = CURRENT_TIME; |
inode | 283 | fs/namei.c | inode->i_dirt = 1; |
inode | 285 | fs/namei.c | *res_inode = inode; |
inode | 293 | fs/namei.c | struct inode * dir; |
inode | 327 | fs/namei.c | struct inode * dir; |
inode | 354 | fs/namei.c | struct inode * dir; |
inode | 381 | fs/namei.c | struct inode * dir; |
inode | 406 | fs/namei.c | struct inode * dir; |
inode | 434 | fs/namei.c | struct inode * oldinode, * dir; |
inode | 476 | fs/namei.c | struct inode * old_dir, * new_dir; |
inode | 35 | fs/open.c | struct inode * inode; |
inode | 38 | fs/open.c | if (!(inode = namei(path))) |
inode | 40 | fs/open.c | if (!inode->i_sb->s_op->statfs) { |
inode | 41 | fs/open.c | iput(inode); |
inode | 44 | fs/open.c | inode->i_sb->s_op->statfs(inode->i_sb, buf); |
inode | 45 | fs/open.c | iput(inode); |
inode | 51 | fs/open.c | struct inode * inode; |
inode | 57 | fs/open.c | if (!(inode = file->f_inode)) |
inode | 59 | fs/open.c | if (!inode->i_sb->s_op->statfs) |
inode | 61 | fs/open.c | inode->i_sb->s_op->statfs(inode->i_sb, buf); |
inode | 67 | fs/open.c | struct inode * inode; |
inode | 69 | fs/open.c | if (!(inode = namei(path))) |
inode | 71 | fs/open.c | if (S_ISDIR(inode->i_mode) || !permission(inode,MAY_WRITE)) { |
inode | 72 | fs/open.c | iput(inode); |
inode | 75 | fs/open.c | if (IS_RDONLY(inode)) { |
inode | 76 | fs/open.c | iput(inode); |
inode | 79 | fs/open.c | inode->i_size = length; |
inode | 80 | fs/open.c | if (inode->i_op && inode->i_op->truncate) |
inode | 81 | fs/open.c | inode->i_op->truncate(inode); |
inode | 82 | fs/open.c | inode->i_atime = inode->i_mtime = CURRENT_TIME; |
inode | 83 | fs/open.c | inode->i_dirt = 1; |
inode | 84 | fs/open.c | iput(inode); |
inode | 90 | fs/open.c | struct inode * inode; |
inode | 95 | fs/open.c | if (!(inode = file->f_inode)) |
inode | 97 | fs/open.c | if (S_ISDIR(inode->i_mode) || !(file->f_mode & 2)) |
inode | 99 | fs/open.c | inode->i_size = length; |
inode | 100 | fs/open.c | if (inode->i_op && inode->i_op->truncate) |
inode | 101 | fs/open.c | inode->i_op->truncate(inode); |
inode | 102 | fs/open.c | inode->i_atime = inode->i_mtime = CURRENT_TIME; |
inode | 103 | fs/open.c | inode->i_dirt = 1; |
inode | 113 | fs/open.c | struct inode * inode; |
inode | 116 | fs/open.c | if (!(inode=namei(filename))) |
inode | 118 | fs/open.c | if (IS_RDONLY(inode)) { |
inode | 119 | fs/open.c | iput(inode); |
inode | 123 | fs/open.c | if ((current->euid != inode->i_uid) && !suser()) { |
inode | 124 | fs/open.c | iput(inode); |
inode | 130 | fs/open.c | if ((current->euid != inode->i_uid) && |
inode | 131 | fs/open.c | !permission(inode,MAY_WRITE)) { |
inode | 132 | fs/open.c | iput(inode); |
inode | 137 | fs/open.c | inode->i_atime = actime; |
inode | 138 | fs/open.c | inode->i_mtime = modtime; |
inode | 139 | fs/open.c | inode->i_dirt = 1; |
inode | 140 | fs/open.c | iput(inode); |
inode | 150 | fs/open.c | struct inode * inode; |
inode | 154 | fs/open.c | if (!(inode=namei(filename))) |
inode | 156 | fs/open.c | i_mode = res = inode->i_mode & 0777; |
inode | 157 | fs/open.c | iput(inode); |
inode | 158 | fs/open.c | if (current->uid == inode->i_uid) |
inode | 160 | fs/open.c | else if (in_group_p(inode->i_gid)) |
inode | 178 | fs/open.c | struct inode * inode; |
inode | 180 | fs/open.c | if (!(inode = namei(filename))) |
inode | 182 | fs/open.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 183 | fs/open.c | iput(inode); |
inode | 186 | fs/open.c | if (!permission(inode,MAY_EXEC)) { |
inode | 187 | fs/open.c | iput(inode); |
inode | 191 | fs/open.c | current->pwd = inode; |
inode | 197 | fs/open.c | struct inode * inode; |
inode | 199 | fs/open.c | if (!(inode=namei(filename))) |
inode | 201 | fs/open.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 202 | fs/open.c | iput(inode); |
inode | 206 | fs/open.c | iput(inode); |
inode | 210 | fs/open.c | current->root = inode; |
inode | 216 | fs/open.c | struct inode * inode; |
inode | 221 | fs/open.c | if (!(inode = file->f_inode)) |
inode | 223 | fs/open.c | if ((current->euid != inode->i_uid) && !suser()) |
inode | 225 | fs/open.c | if (IS_RDONLY(inode)) |
inode | 227 | fs/open.c | inode->i_mode = (mode & 07777) | (inode->i_mode & ~07777); |
inode | 228 | fs/open.c | inode->i_dirt = 1; |
inode | 234 | fs/open.c | struct inode * inode; |
inode | 236 | fs/open.c | if (!(inode = namei(filename))) |
inode | 238 | fs/open.c | if ((current->euid != inode->i_uid) && !suser()) { |
inode | 239 | fs/open.c | iput(inode); |
inode | 242 | fs/open.c | if (IS_RDONLY(inode)) { |
inode | 243 | fs/open.c | iput(inode); |
inode | 246 | fs/open.c | inode->i_mode = (mode & 07777) | (inode->i_mode & ~07777); |
inode | 247 | fs/open.c | inode->i_dirt = 1; |
inode | 248 | fs/open.c | iput(inode); |
inode | 254 | fs/open.c | struct inode * inode; |
inode | 259 | fs/open.c | if (!(inode = file->f_inode)) |
inode | 261 | fs/open.c | if (IS_RDONLY(inode)) |
inode | 263 | fs/open.c | if ((current->euid == inode->i_uid && user == inode->i_uid && |
inode | 264 | fs/open.c | (in_group_p(group) || group == inode->i_gid)) || |
inode | 266 | fs/open.c | inode->i_uid = user; |
inode | 267 | fs/open.c | inode->i_gid = group; |
inode | 268 | fs/open.c | inode->i_dirt=1; |
inode | 276 | fs/open.c | struct inode * inode; |
inode | 278 | fs/open.c | if (!(inode = lnamei(filename))) |
inode | 280 | fs/open.c | if (IS_RDONLY(inode)) { |
inode | 281 | fs/open.c | iput(inode); |
inode | 284 | fs/open.c | if ((current->euid == inode->i_uid && user == inode->i_uid && |
inode | 285 | fs/open.c | (in_group_p(group) || group == inode->i_gid)) || |
inode | 287 | fs/open.c | inode->i_uid = user; |
inode | 288 | fs/open.c | inode->i_gid = group; |
inode | 289 | fs/open.c | inode->i_dirt=1; |
inode | 290 | fs/open.c | iput(inode); |
inode | 293 | fs/open.c | iput(inode); |
inode | 299 | fs/open.c | struct inode * inode; |
inode | 313 | fs/open.c | if ((i = open_namei(filename,flag,mode,&inode))<0) { |
inode | 320 | fs/open.c | f->f_inode = inode; |
inode | 324 | fs/open.c | if (inode->i_op) |
inode | 325 | fs/open.c | f->f_op = inode->i_op->default_file_ops; |
inode | 327 | fs/open.c | if (i = f->f_op->open(inode,f)) { |
inode | 328 | fs/open.c | iput(inode); |
inode | 344 | fs/open.c | struct inode * inode; |
inode | 360 | fs/open.c | inode = filp->f_inode; |
inode | 362 | fs/open.c | filp->f_op->release(inode,filp); |
inode | 365 | fs/open.c | iput(inode); |
inode | 16 | fs/pipe.c | static int pipe_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 21 | fs/pipe.c | while (!PIPE_SIZE(*inode)) { |
inode | 22 | fs/pipe.c | wake_up(& PIPE_WRITE_WAIT(*inode)); |
inode | 23 | fs/pipe.c | if (!PIPE_WRITERS(*inode)) /* are there any writers? */ |
inode | 27 | fs/pipe.c | interruptible_sleep_on(& PIPE_READ_WAIT(*inode)); |
inode | 29 | fs/pipe.c | while (count>0 && (size = PIPE_SIZE(*inode))) { |
inode | 30 | fs/pipe.c | chars = PAGE_SIZE-PIPE_TAIL(*inode); |
inode | 35 | fs/pipe.c | memcpy_tofs(buf, (char *)inode->i_size+PIPE_TAIL(*inode), chars ); |
inode | 37 | fs/pipe.c | PIPE_TAIL(*inode) += chars; |
inode | 38 | fs/pipe.c | PIPE_TAIL(*inode) &= (PAGE_SIZE-1); |
inode | 42 | fs/pipe.c | wake_up(& PIPE_WRITE_WAIT(*inode)); |
inode | 46 | fs/pipe.c | static int pipe_write(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 50 | fs/pipe.c | if (!PIPE_READERS(*inode)) { /* no readers */ |
inode | 60 | fs/pipe.c | while (PIPE_SIZE(*inode) >= size) { |
inode | 61 | fs/pipe.c | if (!PIPE_READERS(*inode)) { /* no readers */ |
inode | 70 | fs/pipe.c | interruptible_sleep_on(&PIPE_WRITE_WAIT(*inode)); |
inode | 72 | fs/pipe.c | while (count>0 && (size = (PAGE_SIZE-1)-PIPE_SIZE(*inode))) { |
inode | 73 | fs/pipe.c | chars = PAGE_SIZE-PIPE_HEAD(*inode); |
inode | 78 | fs/pipe.c | memcpy_fromfs((char *)inode->i_size+PIPE_HEAD(*inode), buf, chars ); |
inode | 80 | fs/pipe.c | PIPE_HEAD(*inode) += chars; |
inode | 81 | fs/pipe.c | PIPE_HEAD(*inode) &= (PAGE_SIZE-1); |
inode | 85 | fs/pipe.c | wake_up(& PIPE_READ_WAIT(*inode)); |
inode | 91 | fs/pipe.c | static int pipe_lseek(struct inode * inode, struct file * file, off_t offset, int orig) |
inode | 96 | fs/pipe.c | static int pipe_readdir(struct inode * inode, struct file * file, struct dirent * de, int count) |
inode | 101 | fs/pipe.c | static int bad_pipe_rw(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 106 | fs/pipe.c | static int pipe_ioctl(struct inode *pino, struct file * filp, |
inode | 119 | fs/pipe.c | static int pipe_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
inode | 123 | fs/pipe.c | if (!PIPE_EMPTY(*inode) || !PIPE_WRITERS(*inode)) |
inode | 125 | fs/pipe.c | select_wait(&PIPE_READ_WAIT(*inode), wait); |
inode | 128 | fs/pipe.c | if (!PIPE_FULL(*inode) || !PIPE_WRITERS(*inode)) |
inode | 130 | fs/pipe.c | select_wait(&PIPE_WRITE_WAIT(*inode), wait); |
inode | 133 | fs/pipe.c | if (!PIPE_READERS(*inode) || !PIPE_WRITERS(*inode)) |
inode | 135 | fs/pipe.c | select_wait(&inode->i_wait,wait); |
inode | 145 | fs/pipe.c | static void pipe_read_release(struct inode * inode, struct file * filp) |
inode | 147 | fs/pipe.c | PIPE_READERS(*inode)--; |
inode | 148 | fs/pipe.c | wake_up(&PIPE_WRITE_WAIT(*inode)); |
inode | 151 | fs/pipe.c | static void pipe_write_release(struct inode * inode, struct file * filp) |
inode | 153 | fs/pipe.c | PIPE_WRITERS(*inode)--; |
inode | 154 | fs/pipe.c | wake_up(&PIPE_READ_WAIT(*inode)); |
inode | 157 | fs/pipe.c | static void pipe_rdwr_release(struct inode * inode, struct file * filp) |
inode | 159 | fs/pipe.c | PIPE_READERS(*inode)--; |
inode | 160 | fs/pipe.c | PIPE_WRITERS(*inode)--; |
inode | 161 | fs/pipe.c | wake_up(&PIPE_READ_WAIT(*inode)); |
inode | 162 | fs/pipe.c | wake_up(&PIPE_WRITE_WAIT(*inode)); |
inode | 204 | fs/pipe.c | struct inode * inode; |
inode | 230 | fs/pipe.c | if (!(inode=get_pipe_inode())) { |
inode | 237 | fs/pipe.c | f[0]->f_inode = f[1]->f_inode = inode; |
inode | 23 | fs/read_write.c | struct inode * inode; |
inode | 26 | fs/read_write.c | !(inode = file->f_inode)) |
inode | 30 | fs/read_write.c | return file->f_op->readdir(inode,file,dirent,count); |
inode | 71 | fs/read_write.c | struct inode * inode; |
inode | 73 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode)) |
inode | 81 | fs/read_write.c | return file->f_op->read(inode,file,buf,count); |
inode | 88 | fs/read_write.c | struct inode * inode; |
inode | 90 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->filp[fd]) || !(inode=file->f_inode)) |
inode | 97 | fs/read_write.c | return file->f_op->write(inode,file,buf,count); |
inode | 50 | fs/select.c | static int check_in(select_table * wait, struct inode * inode, struct file * file) |
inode | 53 | fs/select.c | return file->f_op->select(inode,file,SEL_IN,wait); |
inode | 57 | fs/select.c | static int check_out(select_table * wait, struct inode * inode, struct file * file) |
inode | 60 | fs/select.c | return file->f_op->select(inode,file,SEL_OUT,wait); |
inode | 64 | fs/select.c | static int check_ex(select_table * wait, struct inode * inode, struct file * file) |
inode | 67 | fs/select.c | return file->f_op->select(inode,file,SEL_EX,wait); |
inode | 14 | fs/stat.c | static void cp_old_stat(struct inode * inode, struct old_stat * statbuf) |
inode | 18 | fs/stat.c | if (inode->i_ino & 0xffff0000) |
inode | 21 | fs/stat.c | tmp.st_dev = inode->i_dev; |
inode | 22 | fs/stat.c | tmp.st_ino = inode->i_ino; |
inode | 23 | fs/stat.c | tmp.st_mode = inode->i_mode; |
inode | 24 | fs/stat.c | tmp.st_nlink = inode->i_nlink; |
inode | 25 | fs/stat.c | tmp.st_uid = inode->i_uid; |
inode | 26 | fs/stat.c | tmp.st_gid = inode->i_gid; |
inode | 27 | fs/stat.c | tmp.st_rdev = inode->i_rdev; |
inode | 28 | fs/stat.c | if( S_ISFIFO(inode->i_mode) ) |
inode | 31 | fs/stat.c | tmp.st_size = inode->i_size; |
inode | 32 | fs/stat.c | tmp.st_atime = inode->i_atime; |
inode | 33 | fs/stat.c | tmp.st_mtime = inode->i_mtime; |
inode | 34 | fs/stat.c | tmp.st_ctime = inode->i_ctime; |
inode | 38 | fs/stat.c | static void cp_new_stat(struct inode * inode, struct new_stat * statbuf) |
inode | 44 | fs/stat.c | tmp.st_dev = inode->i_dev; |
inode | 45 | fs/stat.c | tmp.st_ino = inode->i_ino; |
inode | 46 | fs/stat.c | tmp.st_mode = inode->i_mode; |
inode | 47 | fs/stat.c | tmp.st_nlink = inode->i_nlink; |
inode | 48 | fs/stat.c | tmp.st_uid = inode->i_uid; |
inode | 49 | fs/stat.c | tmp.st_gid = inode->i_gid; |
inode | 50 | fs/stat.c | tmp.st_rdev = inode->i_rdev; |
inode | 51 | fs/stat.c | if( S_ISFIFO(inode->i_mode) ) |
inode | 54 | fs/stat.c | tmp.st_size = inode->i_size; |
inode | 55 | fs/stat.c | tmp.st_atime = inode->i_atime; |
inode | 56 | fs/stat.c | tmp.st_mtime = inode->i_mtime; |
inode | 57 | fs/stat.c | tmp.st_ctime = inode->i_ctime; |
inode | 84 | fs/stat.c | struct inode * inode; |
inode | 86 | fs/stat.c | if (!(inode=namei(filename))) |
inode | 88 | fs/stat.c | cp_old_stat(inode,statbuf); |
inode | 89 | fs/stat.c | iput(inode); |
inode | 95 | fs/stat.c | struct inode * inode; |
inode | 97 | fs/stat.c | if (!(inode=namei(filename))) |
inode | 99 | fs/stat.c | cp_new_stat(inode,statbuf); |
inode | 100 | fs/stat.c | iput(inode); |
inode | 106 | fs/stat.c | struct inode * inode; |
inode | 108 | fs/stat.c | if (!(inode = lnamei(filename))) |
inode | 110 | fs/stat.c | cp_old_stat(inode,statbuf); |
inode | 111 | fs/stat.c | iput(inode); |
inode | 117 | fs/stat.c | struct inode * inode; |
inode | 119 | fs/stat.c | if (!(inode = lnamei(filename))) |
inode | 121 | fs/stat.c | cp_new_stat(inode,statbuf); |
inode | 122 | fs/stat.c | iput(inode); |
inode | 129 | fs/stat.c | struct inode * inode; |
inode | 131 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
inode | 133 | fs/stat.c | cp_old_stat(inode,statbuf); |
inode | 140 | fs/stat.c | struct inode * inode; |
inode | 142 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->filp[fd]) || !(inode=f->f_inode)) |
inode | 144 | fs/stat.c | cp_new_stat(inode,statbuf); |
inode | 150 | fs/stat.c | struct inode * inode; |
inode | 155 | fs/stat.c | if (!(inode = lnamei(path))) |
inode | 157 | fs/stat.c | if (!inode->i_op || !inode->i_op->readlink) { |
inode | 158 | fs/stat.c | iput(inode); |
inode | 161 | fs/stat.c | return inode->i_op->readlink(inode,buf,bufsiz); |
inode | 149 | fs/super.c | struct inode * inode; |
inode | 157 | fs/super.c | for (inode = inode_table+0 ; inode < inode_table+NR_INODE ; inode++) |
inode | 158 | fs/super.c | if (inode->i_dev==dev && inode->i_count) |
inode | 159 | fs/super.c | if (inode == sb->s_mounted && inode->i_count == 1) |
inode | 176 | fs/super.c | struct inode * inode; |
inode | 181 | fs/super.c | if (!(inode = namei(dev_name))) |
inode | 183 | fs/super.c | dev = inode->i_rdev; |
inode | 184 | fs/super.c | if (!S_ISBLK(inode->i_mode)) { |
inode | 185 | fs/super.c | iput(inode); |
inode | 191 | fs/super.c | blkdev_fops[MAJOR(dev)]->release(inode,NULL); |
inode | 192 | fs/super.c | iput(inode); |
inode | 209 | fs/super.c | struct inode * inode, * dir_i; |
inode | 222 | fs/super.c | for (inode = inode_table+0 ; inode < inode_table+NR_INODE ; inode++) { |
inode | 223 | fs/super.c | if (inode->i_dev != dev) |
inode | 225 | fs/super.c | if (inode->i_count || inode->i_dirt || inode->i_lock) { |
inode | 229 | fs/super.c | inode->i_dev = 0; |
inode | 257 | fs/super.c | struct inode * inode; |
inode | 267 | fs/super.c | if (!(inode = namei(dev_name))) |
inode | 269 | fs/super.c | dev = inode->i_rdev; |
inode | 270 | fs/super.c | if (!S_ISBLK(inode->i_mode)) |
inode | 272 | fs/super.c | else if (IS_NODEV(inode)) |
inode | 275 | fs/super.c | retval = blkdev_fops[MAJOR(dev)]->open(inode,NULL); |
inode | 277 | fs/super.c | iput(inode); |
inode | 301 | fs/super.c | blkdev_fops[MAJOR(dev)]->release(inode,NULL); |
inode | 302 | fs/super.c | iput(inode); |
inode | 311 | fs/super.c | struct inode * mi; |
inode | 74 | include/linux/ext_fs.h | unsigned long inode; |
inode | 80 | include/linux/ext_fs.h | extern int ext_open(struct inode * inode, struct file * filp); |
inode | 81 | include/linux/ext_fs.h | extern void ext_release(struct inode * inode, struct file * filp); |
inode | 82 | include/linux/ext_fs.h | extern int ext_lookup(struct inode * dir,const char * name, int len, |
inode | 83 | include/linux/ext_fs.h | struct inode ** result); |
inode | 84 | include/linux/ext_fs.h | extern int ext_create(struct inode * dir,const char * name, int len, int mode, |
inode | 85 | include/linux/ext_fs.h | struct inode ** result); |
inode | 86 | include/linux/ext_fs.h | extern int ext_mkdir(struct inode * dir, const char * name, int len, int mode); |
inode | 87 | include/linux/ext_fs.h | extern int ext_rmdir(struct inode * dir, const char * name, int len); |
inode | 88 | include/linux/ext_fs.h | extern int ext_unlink(struct inode * dir, const char * name, int len); |
inode | 89 | include/linux/ext_fs.h | extern int ext_symlink(struct inode * inode, const char * name, int len, |
inode | 91 | include/linux/ext_fs.h | extern int ext_link(struct inode * oldinode, struct inode * dir, const char * name, int len); |
inode | 92 | include/linux/ext_fs.h | extern int ext_mknod(struct inode * dir, const char * name, int len, int mode, int rdev); |
inode | 93 | include/linux/ext_fs.h | extern int ext_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 94 | include/linux/ext_fs.h | struct inode * new_dir, const char * new_name, int new_len); |
inode | 95 | include/linux/ext_fs.h | extern struct inode * ext_new_inode(int dev); |
inode | 96 | include/linux/ext_fs.h | extern void ext_free_inode(struct inode * inode); |
inode | 102 | include/linux/ext_fs.h | extern int ext_create_block(struct inode *, int); |
inode | 103 | include/linux/ext_fs.h | extern int ext_bmap(struct inode *,int); |
inode | 105 | include/linux/ext_fs.h | extern void ext_truncate(struct inode *); |
inode | 109 | include/linux/ext_fs.h | extern void ext_read_inode(struct inode *); |
inode | 110 | include/linux/ext_fs.h | extern void ext_write_inode(struct inode *); |
inode | 111 | include/linux/ext_fs.h | extern void ext_put_inode(struct inode *); |
inode | 114 | include/linux/ext_fs.h | extern int ext_lseek(struct inode *, struct file *, off_t, int); |
inode | 115 | include/linux/ext_fs.h | extern int ext_read(struct inode *, struct file *, char *, int); |
inode | 116 | include/linux/ext_fs.h | extern int ext_write(struct inode *, struct file *, char *, int); |
inode | 50 | include/linux/fs.h | #define PIPE_READ_WAIT(inode) ((inode).i_wait) |
inode | 51 | include/linux/fs.h | #define PIPE_WRITE_WAIT(inode) ((inode).i_wait2) |
inode | 52 | include/linux/fs.h | #define PIPE_HEAD(inode) ((inode).i_data[0]) |
inode | 53 | include/linux/fs.h | #define PIPE_TAIL(inode) ((inode).i_data[1]) |
inode | 54 | include/linux/fs.h | #define PIPE_READERS(inode) ((inode).i_data[2]) |
inode | 55 | include/linux/fs.h | #define PIPE_WRITERS(inode) ((inode).i_data[3]) |
inode | 56 | include/linux/fs.h | #define PIPE_SIZE(inode) ((PIPE_HEAD(inode)-PIPE_TAIL(inode))&(PAGE_SIZE-1)) |
inode | 57 | include/linux/fs.h | #define PIPE_EMPTY(inode) (PIPE_HEAD(inode)==PIPE_TAIL(inode)) |
inode | 58 | include/linux/fs.h | #define PIPE_FULL(inode) (PIPE_SIZE(inode)==(PAGE_SIZE-1)) |
inode | 80 | include/linux/fs.h | #define IS_RDONLY(inode) ((inode)->i_flags & MS_RDONLY) |
inode | 81 | include/linux/fs.h | #define IS_NOSUID(inode) ((inode)->i_flags & MS_NOSUID) |
inode | 82 | include/linux/fs.h | #define IS_NODEV(inode) ((inode)->i_flags & MS_NODEV) |
inode | 83 | include/linux/fs.h | #define IS_NOEXEC(inode) ((inode)->i_flags & MS_NOEXEC) |
inode | 84 | include/linux/fs.h | #define IS_SYNC(inode) ((inode)->i_flags & MS_SYNC) |
inode | 147 | include/linux/fs.h | struct inode * f_inode; |
inode | 166 | include/linux/fs.h | struct inode * s_covered; |
inode | 167 | include/linux/fs.h | struct inode * s_mounted; |
inode | 177 | include/linux/fs.h | int (*lseek) (struct inode *, struct file *, off_t, int); |
inode | 178 | include/linux/fs.h | int (*read) (struct inode *, struct file *, char *, int); |
inode | 179 | include/linux/fs.h | int (*write) (struct inode *, struct file *, char *, int); |
inode | 180 | include/linux/fs.h | int (*readdir) (struct inode *, struct file *, struct dirent *, int count); |
inode | 181 | include/linux/fs.h | int (*select) (struct inode *, struct file *, int, select_table *); |
inode | 182 | include/linux/fs.h | int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned int); |
inode | 183 | include/linux/fs.h | int (*open) (struct inode *, struct file *); |
inode | 184 | include/linux/fs.h | void (*release) (struct inode *, struct file *); |
inode | 189 | include/linux/fs.h | int (*create) (struct inode *,const char *,int,int,struct inode **); |
inode | 190 | include/linux/fs.h | int (*lookup) (struct inode *,const char *,int,struct inode **); |
inode | 191 | include/linux/fs.h | int (*link) (struct inode *,struct inode *,const char *,int); |
inode | 192 | include/linux/fs.h | int (*unlink) (struct inode *,const char *,int); |
inode | 193 | include/linux/fs.h | int (*symlink) (struct inode *,const char *,int,const char *); |
inode | 194 | include/linux/fs.h | int (*mkdir) (struct inode *,const char *,int,int); |
inode | 195 | include/linux/fs.h | int (*rmdir) (struct inode *,const char *,int); |
inode | 196 | include/linux/fs.h | int (*mknod) (struct inode *,const char *,int,int,int); |
inode | 197 | include/linux/fs.h | int (*rename) (struct inode *,const char *,int,struct inode *,const char *,int); |
inode | 198 | include/linux/fs.h | int (*readlink) (struct inode *,char *,int); |
inode | 199 | include/linux/fs.h | struct inode * (*follow_link) (struct inode *, struct inode *); |
inode | 200 | include/linux/fs.h | int (*bmap) (struct inode *,int); |
inode | 201 | include/linux/fs.h | void (*truncate) (struct inode *); |
inode | 205 | include/linux/fs.h | void (*read_inode)(struct inode *inode); |
inode | 206 | include/linux/fs.h | void (*write_inode) (struct inode *inode); |
inode | 207 | include/linux/fs.h | void (*put_inode) (struct inode *inode); |
inode | 223 | include/linux/fs.h | extern struct inode inode_table[NR_INODE]; |
inode | 240 | include/linux/fs.h | extern void wait_on(struct inode * inode); |
inode | 241 | include/linux/fs.h | extern int bmap(struct inode * inode,int block); |
inode | 242 | include/linux/fs.h | extern struct inode * namei(const char * pathname); |
inode | 243 | include/linux/fs.h | extern struct inode * lnamei(const char * pathname); |
inode | 244 | include/linux/fs.h | extern int permission(struct inode * inode,int mask); |
inode | 245 | include/linux/fs.h | extern struct inode * _namei(const char * filename, struct inode * base, |
inode | 248 | include/linux/fs.h | struct inode ** res_inode); |
inode | 250 | include/linux/fs.h | extern void iput(struct inode * inode); |
inode | 251 | include/linux/fs.h | extern struct inode * iget(int dev,int nr); |
inode | 252 | include/linux/fs.h | extern struct inode * get_empty_inode(void); |
inode | 253 | include/linux/fs.h | extern struct inode * get_pipe_inode(void); |
inode | 273 | include/linux/fs.h | extern int char_read(struct inode *, struct file *, char *, int); |
inode | 274 | include/linux/fs.h | extern int block_read(struct inode *, struct file *, char *, int); |
inode | 276 | include/linux/fs.h | extern int char_write(struct inode *, struct file *, char *, int); |
inode | 277 | include/linux/fs.h | extern int block_write(struct inode *, struct file *, char *, int); |
inode | 43 | include/linux/minix_fs.h | unsigned short inode; |
inode | 47 | include/linux/minix_fs.h | extern int minix_open(struct inode * inode, struct file * filp); |
inode | 48 | include/linux/minix_fs.h | extern void minix_release(struct inode * inode, struct file * filp); |
inode | 49 | include/linux/minix_fs.h | extern int minix_lookup(struct inode * dir,const char * name, int len, |
inode | 50 | include/linux/minix_fs.h | struct inode ** result); |
inode | 51 | include/linux/minix_fs.h | extern int minix_create(struct inode * dir,const char * name, int len, int mode, |
inode | 52 | include/linux/minix_fs.h | struct inode ** result); |
inode | 53 | include/linux/minix_fs.h | extern int minix_mkdir(struct inode * dir, const char * name, int len, int mode); |
inode | 54 | include/linux/minix_fs.h | extern int minix_rmdir(struct inode * dir, const char * name, int len); |
inode | 55 | include/linux/minix_fs.h | extern int minix_unlink(struct inode * dir, const char * name, int len); |
inode | 56 | include/linux/minix_fs.h | extern int minix_symlink(struct inode * inode, const char * name, int len, |
inode | 58 | include/linux/minix_fs.h | extern int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len); |
inode | 59 | include/linux/minix_fs.h | extern int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev); |
inode | 60 | include/linux/minix_fs.h | extern int minix_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 61 | include/linux/minix_fs.h | struct inode * new_dir, const char * new_name, int new_len); |
inode | 62 | include/linux/minix_fs.h | extern struct inode * minix_new_inode(int dev); |
inode | 63 | include/linux/minix_fs.h | extern void minix_free_inode(struct inode * inode); |
inode | 69 | include/linux/minix_fs.h | extern int minix_create_block(struct inode *, int); |
inode | 70 | include/linux/minix_fs.h | extern int minix_bmap(struct inode *,int); |
inode | 72 | include/linux/minix_fs.h | extern void minix_truncate(struct inode *); |
inode | 75 | include/linux/minix_fs.h | extern void minix_read_inode(struct inode *); |
inode | 76 | include/linux/minix_fs.h | extern void minix_write_inode(struct inode *); |
inode | 77 | include/linux/minix_fs.h | extern void minix_put_inode(struct inode *); |
inode | 80 | include/linux/minix_fs.h | extern int minix_lseek(struct inode *, struct file *, off_t, int); |
inode | 81 | include/linux/minix_fs.h | extern int minix_read(struct inode *, struct file *, char *, int); |
inode | 82 | include/linux/minix_fs.h | extern int minix_write(struct inode *, struct file *, char *, int); |
inode | 83 | include/linux/minix_fs.h | extern int minix_file_read(struct inode *, struct file *, char *, int); |
inode | 47 | include/linux/mm.h | extern struct inode * swap_file; |
inode | 54 | include/linux/mouse.h | struct inode *inode; |
inode | 115 | include/linux/msdos_fs.h | extern int msdos_add_cluster(struct inode *inode); |
inode | 119 | include/linux/msdos_fs.h | extern int msdos_get_entry(struct inode *dir,int *pos,struct buffer_head **bh, |
inode | 121 | include/linux/msdos_fs.h | extern int msdos_scan(struct inode *dir,char *name,struct buffer_head **res_bh, |
inode | 123 | include/linux/msdos_fs.h | extern int msdos_parent_ino(struct inode *dir,int locked); |
inode | 128 | include/linux/msdos_fs.h | extern int msdos_smap(struct inode *inode,int sector); |
inode | 129 | include/linux/msdos_fs.h | extern int fat_free(struct inode *inode,int skip); |
inode | 131 | include/linux/msdos_fs.h | void cache_lookup(struct inode *inode,int cluster,int *f_clu,int *d_clu); |
inode | 132 | include/linux/msdos_fs.h | void cache_add(struct inode *inode,int f_clu,int d_clu); |
inode | 133 | include/linux/msdos_fs.h | void cache_inval_inode(struct inode *inode); |
inode | 135 | include/linux/msdos_fs.h | int get_cluster(struct inode *inode,int cluster); |
inode | 139 | include/linux/msdos_fs.h | extern int msdos_lookup(struct inode *dir,const char *name,int len, |
inode | 140 | include/linux/msdos_fs.h | struct inode **result); |
inode | 141 | include/linux/msdos_fs.h | extern int msdos_create(struct inode *dir,const char *name,int len,int mode, |
inode | 142 | include/linux/msdos_fs.h | struct inode **result); |
inode | 143 | include/linux/msdos_fs.h | extern int msdos_mkdir(struct inode *dir,const char *name,int len,int mode); |
inode | 144 | include/linux/msdos_fs.h | extern int msdos_rmdir(struct inode *dir,const char *name,int len); |
inode | 145 | include/linux/msdos_fs.h | extern int msdos_unlink(struct inode *dir,const char *name,int len); |
inode | 146 | include/linux/msdos_fs.h | extern int msdos_rename(struct inode *old_dir,const char *old_name,int old_len, |
inode | 147 | include/linux/msdos_fs.h | struct inode *new_dir,const char *new_name,int new_len); |
inode | 151 | include/linux/msdos_fs.h | extern void msdos_put_inode(struct inode *inode); |
inode | 155 | include/linux/msdos_fs.h | extern int msdos_bmap(struct inode *inode,int block); |
inode | 156 | include/linux/msdos_fs.h | extern void msdos_read_inode(struct inode *inode); |
inode | 157 | include/linux/msdos_fs.h | extern void msdos_write_inode(struct inode *inode); |
inode | 170 | include/linux/msdos_fs.h | extern void msdos_truncate(struct inode *inode); |
inode | 153 | include/linux/sched.h | struct inode * pwd; |
inode | 154 | include/linux/sched.h | struct inode * root; |
inode | 155 | include/linux/sched.h | struct inode * executable; |
inode | 157 | include/linux/sched.h | struct inode * library; |
inode | 229 | include/linux/tty.h | extern int tty_ioctl(struct inode *, struct file *, unsigned int, unsigned int); |
inode | 1002 | kernel/blk_drv/floppy.c | static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, |
inode | 1009 | kernel/blk_drv/floppy.c | RO_IOCTLS(inode->i_rdev,param); |
inode | 1012 | kernel/blk_drv/floppy.c | drive = MINOR(inode->i_rdev); |
inode | 1140 | kernel/blk_drv/floppy.c | static int floppy_open(struct inode * inode, struct file * filp) |
inode | 1145 | kernel/blk_drv/floppy.c | drive = inode->i_rdev & 3; |
inode | 1148 | kernel/blk_drv/floppy.c | if (old_dev != inode->i_rdev) |
inode | 1151 | kernel/blk_drv/floppy.c | fd_device[drive] = inode->i_rdev; |
inode | 1152 | kernel/blk_drv/floppy.c | if (old_dev && old_dev != inode->i_rdev) |
inode | 1155 | kernel/blk_drv/floppy.c | check_disk_change(inode->i_rdev); |
inode | 1159 | kernel/blk_drv/floppy.c | static void floppy_release(struct inode * inode, struct file * filp) |
inode | 1161 | kernel/blk_drv/floppy.c | sync_dev(inode->i_rdev); |
inode | 1162 | kernel/blk_drv/floppy.c | if (!fd_ref[inode->i_rdev & 3]--) { |
inode | 1164 | kernel/blk_drv/floppy.c | fd_ref[inode->i_rdev & 3] = 0; |
inode | 446 | kernel/blk_drv/hd.c | static int hd_ioctl(struct inode * inode, struct file * file, |
inode | 452 | kernel/blk_drv/hd.c | if (!loc || !inode) |
inode | 454 | kernel/blk_drv/hd.c | dev = MINOR(inode->i_rdev) >> 6; |
inode | 466 | kernel/blk_drv/hd.c | put_fs_long(hd[MINOR(inode->i_rdev)].start_sect, |
inode | 469 | kernel/blk_drv/hd.c | RO_IOCTLS(inode->i_rdev,arg); |
inode | 479 | kernel/blk_drv/hd.c | static void hd_release(struct inode * inode, struct file * file) |
inode | 481 | kernel/blk_drv/hd.c | sync_dev(inode->i_rdev); |
inode | 47 | kernel/blk_drv/scsi/sd.c | extern int sd_ioctl(struct inode *, struct file *, unsigned long, unsigned long); |
inode | 49 | kernel/blk_drv/scsi/sd.c | static void sd_release(struct inode * inode, struct file * file) |
inode | 51 | kernel/blk_drv/scsi/sd.c | sync_dev(inode->i_rdev); |
inode | 11 | kernel/blk_drv/scsi/sd_ioctl.c | int sd_ioctl(struct inode * inode, struct file * file, unsigned long cmd, unsigned long arg) |
inode | 13 | kernel/blk_drv/scsi/sd_ioctl.c | int dev = inode->i_rdev; |
inode | 10 | kernel/blk_drv/scsi/st_ioctl.c | int st_ioctl(struct inode * inode, struct file * file, unsigned long cmd, unsigned long arg) |
inode | 12 | kernel/blk_drv/scsi/st_ioctl.c | int dev = inode->i_rdev; |
inode | 49 | kernel/chr_drv/lp.c | static int lp_write(struct inode * inode, struct file * file, char * buf, int count) |
inode | 52 | kernel/chr_drv/lp.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 82 | kernel/chr_drv/lp.c | static int lp_read(struct inode * inode, struct file * file, char * buf, int count) |
inode | 87 | kernel/chr_drv/lp.c | static int lp_lseek(struct inode * inode, struct file * file, off_t offset, int origin) |
inode | 92 | kernel/chr_drv/lp.c | static int lp_open(struct inode * inode, struct file * file) |
inode | 94 | kernel/chr_drv/lp.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 106 | kernel/chr_drv/lp.c | static void lp_release(struct inode * inode, struct file * file) |
inode | 108 | kernel/chr_drv/lp.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 17 | kernel/chr_drv/mem.c | static int read_ram(struct inode * inode, struct file * file,char * buf, int count) |
inode | 22 | kernel/chr_drv/mem.c | static int write_ram(struct inode * inode, struct file * file,char * buf, int count) |
inode | 27 | kernel/chr_drv/mem.c | static int read_mem(struct inode * inode, struct file * file,char * buf, int count) |
inode | 64 | kernel/chr_drv/mem.c | static int write_mem(struct inode * inode, struct file * file,char * buf, int count) |
inode | 109 | kernel/chr_drv/mem.c | static int read_kmem(struct inode * inode, struct file * file,char * buf, int count) |
inode | 124 | kernel/chr_drv/mem.c | static int write_kmem(struct inode * inode, struct file * file,char * buf, int count) |
inode | 139 | kernel/chr_drv/mem.c | static int read_port(struct inode * inode,struct file * file,char * buf, int count) |
inode | 153 | kernel/chr_drv/mem.c | static int write_port(struct inode * inode,struct file * file,char * buf, int count) |
inode | 167 | kernel/chr_drv/mem.c | static int read_zero(struct inode *node,struct file *file,char *buf,int count) |
inode | 186 | kernel/chr_drv/mem.c | static int mem_lseek(struct inode * inode, struct file * file, off_t offset, int orig) |
inode | 203 | kernel/chr_drv/mem.c | static int mem_read(struct inode * inode, struct file * file, char * buf, int count) |
inode | 205 | kernel/chr_drv/mem.c | switch (MINOR(inode->i_rdev)) { |
inode | 207 | kernel/chr_drv/mem.c | return read_ram(inode,file,buf,count); |
inode | 209 | kernel/chr_drv/mem.c | return read_mem(inode,file,buf,count); |
inode | 211 | kernel/chr_drv/mem.c | return read_kmem(inode,file,buf,count); |
inode | 215 | kernel/chr_drv/mem.c | return read_port(inode,file,buf,count); |
inode | 217 | kernel/chr_drv/mem.c | return read_zero(inode,file,buf,count); |
inode | 223 | kernel/chr_drv/mem.c | static int mem_write(struct inode * inode, struct file * file, char * buf, int count) |
inode | 225 | kernel/chr_drv/mem.c | switch (MINOR(inode->i_rdev)) { |
inode | 227 | kernel/chr_drv/mem.c | return write_ram(inode,file,buf,count); |
inode | 229 | kernel/chr_drv/mem.c | return write_mem(inode,file,buf,count); |
inode | 231 | kernel/chr_drv/mem.c | return write_kmem(inode,file,buf,count); |
inode | 235 | kernel/chr_drv/mem.c | return write_port(inode,file,buf,count); |
inode | 59 | kernel/chr_drv/mouse.c | if (mouse.inode && mouse.inode->i_wait) |
inode | 60 | kernel/chr_drv/mouse.c | wake_up(&mouse.inode->i_wait); |
inode | 65 | kernel/chr_drv/mouse.c | static void release_mouse(struct inode * inode, struct file * file) |
inode | 70 | kernel/chr_drv/mouse.c | mouse.inode = NULL; |
inode | 74 | kernel/chr_drv/mouse.c | static int open_mouse(struct inode * inode, struct file * file) |
inode | 82 | kernel/chr_drv/mouse.c | mouse.inode = inode; |
inode | 91 | kernel/chr_drv/mouse.c | mouse.inode = NULL; |
inode | 97 | kernel/chr_drv/mouse.c | static int write_mouse(struct inode * inode, struct file * file, char * buffer, int count) |
inode | 102 | kernel/chr_drv/mouse.c | static int read_mouse(struct inode * inode, struct file * file, char * buffer, int count) |
inode | 135 | kernel/chr_drv/mouse.c | static int mouse_select(struct inode *inode, struct file *file, int sel_type, select_table * wait) |
inode | 141 | kernel/chr_drv/mouse.c | select_wait(&inode->i_wait,wait); |
inode | 461 | kernel/chr_drv/tty_io.c | static int tty_read(struct inode * inode, struct file * file, char * buf, int count) |
inode | 471 | kernel/chr_drv/tty_io.c | inode->i_atime = CURRENT_TIME; |
inode | 475 | kernel/chr_drv/tty_io.c | static int tty_write(struct inode * inode, struct file * file, char * buf, int count) |
inode | 485 | kernel/chr_drv/tty_io.c | inode->i_mtime = CURRENT_TIME; |
inode | 489 | kernel/chr_drv/tty_io.c | static int tty_lseek(struct inode * inode, struct file * file, off_t offset, int orig) |
inode | 502 | kernel/chr_drv/tty_io.c | static int tty_open(struct inode * inode, struct file * filp) |
inode | 507 | kernel/chr_drv/tty_io.c | dev = inode->i_rdev; |
inode | 554 | kernel/chr_drv/tty_io.c | static void tty_release(struct inode * inode, struct file * filp) |
inode | 583 | kernel/chr_drv/tty_io.c | static int tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
inode | 229 | kernel/chr_drv/tty_ioctl.c | int tty_ioctl(struct inode * inode, struct file * file, |
inode | 608 | mm/memory.c | static int share_page(struct inode * inode, unsigned long address) |
inode | 613 | mm/memory.c | if (!inode || inode->i_count < 2) |
inode | 621 | mm/memory.c | if (inode != (*p)->executable) |
inode | 625 | mm/memory.c | if (inode == (*p)->libraries[i].library) |
inode | 670 | mm/memory.c | struct inode * inode; |
inode | 698 | mm/memory.c | inode = NULL; |
inode | 701 | mm/memory.c | inode = tsk->executable; |
inode | 711 | mm/memory.c | inode = tsk->libraries[i].library; |
inode | 716 | mm/memory.c | if (!inode) { |
inode | 729 | mm/memory.c | if (share_page(inode,tmp)) { |
inode | 741 | mm/memory.c | nr[i] = bmap(inode,block); |
inode | 742 | mm/memory.c | bread_page(page,inode->i_dev,nr); |
inode | 45 | mm/mmap.c | struct inode *inode, unsigned long off) |
inode | 49 | mm/mmap.c | major = MAJOR(inode->i_rdev); |
inode | 50 | mm/mmap.c | minor = MINOR(inode->i_rdev); |
inode | 92 | mm/mmap.c | struct inode *inode; |
inode | 105 | mm/mmap.c | inode = file->f_inode; |
inode | 170 | mm/mmap.c | if (S_ISCHR(inode->i_mode)) |
inode | 172 | mm/mmap.c | inode, off); |
inode | 48 | mm/swap.c | struct inode * swap_file = NULL; |
inode | 307 | mm/swap.c | struct inode * swap_inode; |
inode | 40 | net/socket.c | static int sock_lseek(struct inode *inode, struct file *file, off_t offset, |
inode | 42 | net/socket.c | static int sock_read(struct inode *inode, struct file *file, char *buf, |
inode | 44 | net/socket.c | static int sock_write(struct inode *inode, struct file *file, char *buf, |
inode | 46 | net/socket.c | static int sock_readdir(struct inode *inode, struct file *file, |
inode | 48 | net/socket.c | static void sock_close(struct inode *inode, struct file *file); |
inode | 49 | net/socket.c | static int sock_select(struct inode *inode, struct file *file, int which, select_table *seltable); |
inode | 50 | net/socket.c | static int sock_ioctl(struct inode *inode, struct file *file, |
inode | 64 | net/socket.c | #define SOCK_INODE(S) ((struct inode *)(S)->dummy) |
inode | 74 | net/socket.c | get_fd(struct inode *inode) |
inode | 98 | net/socket.c | file->f_inode = inode; |
inode | 116 | net/socket.c | socki_lookup(struct inode *inode) |
inode | 121 | net/socket.c | if (sock->state != SS_FREE && SOCK_INODE(sock) == inode) |
inode | 225 | net/socket.c | sock_lseek(struct inode *inode, struct file *file, off_t offset, int whence) |
inode | 232 | net/socket.c | sock_read(struct inode *inode, struct file *file, char *ubuf, int size) |
inode | 237 | net/socket.c | if (!(sock = socki_lookup(inode))) { |
inode | 247 | net/socket.c | sock_write(struct inode *inode, struct file *file, char *ubuf, int size) |
inode | 252 | net/socket.c | if (!(sock = socki_lookup(inode))) { |
inode | 262 | net/socket.c | sock_readdir(struct inode *inode, struct file *file, struct dirent *dirent, |
inode | 270 | net/socket.c | sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd, |
inode | 275 | net/socket.c | PRINTK("sock_ioctl: inode=0x%x cmd=0x%x arg=%d\n", inode, cmd, arg); |
inode | 276 | net/socket.c | if (!(sock = socki_lookup(inode))) { |
inode | 294 | net/socket.c | sock_select(struct inode *inode, struct file *file, int sel_type, select_table * wait) |
inode | 298 | net/socket.c | PRINTK("sock_select: inode = 0x%x, kind = %s\n", inode, |
inode | 301 | net/socket.c | if (!(sock = socki_lookup(inode))) { |
inode | 315 | net/socket.c | select_wait(&inode->i_wait, wait); |
inode | 319 | net/socket.c | select_wait(&inode->i_wait, wait); |
inode | 331 | net/socket.c | sock_close(struct inode *inode, struct file *file) |
inode | 335 | net/socket.c | PRINTK("sock_close: inode=0x%x (cnt=%d)\n", inode, inode->i_count); |
inode | 340 | net/socket.c | if (!inode) |
inode | 342 | net/socket.c | if (!(sock = socki_lookup(inode))) { |
inode | 25 | net/unix.c | struct inode *inode; |
inode | 126 | net/unix.c | upd->inode = NULL; |
inode | 207 | net/unix.c | if (upd->inode) { |
inode | 209 | net/unix.c | upd->inode); |
inode | 210 | net/unix.c | iput(upd->inode); |
inode | 211 | net/unix.c | upd->inode = NULL; |
inode | 246 | net/unix.c | if (upd->sockaddr_len || upd->inode) { |
inode | 264 | net/unix.c | i = open_namei(fname, 0, S_IFSOCK, &upd->inode); |