tag | line | file | source code |
inode | 173 | arch/alpha/kernel/osf_sys.c | struct inode * inode; |
inode | 181 | arch/alpha/kernel/osf_sys.c | retval = namei(path, &inode); |
inode | 184 | arch/alpha/kernel/osf_sys.c | if (!inode->i_sb->s_op->statfs) { |
inode | 185 | arch/alpha/kernel/osf_sys.c | iput(inode); |
inode | 188 | arch/alpha/kernel/osf_sys.c | inode->i_sb->s_op->statfs(inode->i_sb, buffer, bufsiz); |
inode | 189 | arch/alpha/kernel/osf_sys.c | iput(inode); |
inode | 196 | arch/alpha/kernel/osf_sys.c | struct inode * inode; |
inode | 206 | arch/alpha/kernel/osf_sys.c | if (!(inode = file->f_inode)) |
inode | 208 | arch/alpha/kernel/osf_sys.c | if (!inode->i_sb->s_op->statfs) |
inode | 210 | arch/alpha/kernel/osf_sys.c | inode->i_sb->s_op->statfs(inode->i_sb, buffer, bufsiz); |
inode | 241 | arch/alpha/kernel/osf_sys.c | static int getdev(const char * name, int rdonly, struct inode ** ino) |
inode | 244 | arch/alpha/kernel/osf_sys.c | struct inode * inode; |
inode | 248 | arch/alpha/kernel/osf_sys.c | retval = namei(name, &inode); |
inode | 251 | arch/alpha/kernel/osf_sys.c | if (!S_ISBLK(inode->i_mode)) { |
inode | 252 | arch/alpha/kernel/osf_sys.c | iput(inode); |
inode | 255 | arch/alpha/kernel/osf_sys.c | if (IS_NODEV(inode)) { |
inode | 256 | arch/alpha/kernel/osf_sys.c | iput(inode); |
inode | 259 | arch/alpha/kernel/osf_sys.c | dev = inode->i_rdev; |
inode | 261 | arch/alpha/kernel/osf_sys.c | iput(inode); |
inode | 266 | arch/alpha/kernel/osf_sys.c | iput(inode); |
inode | 272 | arch/alpha/kernel/osf_sys.c | dummy.f_inode = inode; |
inode | 274 | arch/alpha/kernel/osf_sys.c | retval = fops->open(inode, &dummy); |
inode | 276 | arch/alpha/kernel/osf_sys.c | iput(inode); |
inode | 280 | arch/alpha/kernel/osf_sys.c | *ino = inode; |
inode | 284 | arch/alpha/kernel/osf_sys.c | static void putdev(struct inode * inode) |
inode | 288 | arch/alpha/kernel/osf_sys.c | fops = get_blkfops(MAJOR(inode->i_rdev)); |
inode | 290 | arch/alpha/kernel/osf_sys.c | fops->release(inode, NULL); |
inode | 301 | arch/alpha/kernel/osf_sys.c | struct inode * inode; |
inode | 308 | arch/alpha/kernel/osf_sys.c | retval = getdev(tmp.devname, 0, &inode); |
inode | 311 | arch/alpha/kernel/osf_sys.c | retval = do_mount(inode->i_rdev, dirname, "ext2", flags, NULL); |
inode | 313 | arch/alpha/kernel/osf_sys.c | putdev(inode); |
inode | 314 | arch/alpha/kernel/osf_sys.c | iput(inode); |
inode | 321 | arch/alpha/kernel/osf_sys.c | struct inode * inode; |
inode | 328 | arch/alpha/kernel/osf_sys.c | retval = getdev(tmp.devname, 1, &inode); |
inode | 331 | arch/alpha/kernel/osf_sys.c | retval = do_mount(inode->i_rdev, dirname, "iso9660", flags, NULL); |
inode | 333 | arch/alpha/kernel/osf_sys.c | putdev(inode); |
inode | 334 | arch/alpha/kernel/osf_sys.c | iput(inode); |
inode | 3173 | drivers/block/floppy.c | static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, |
inode | 3194 | drivers/block/floppy.c | device = inode->i_rdev; |
inode | 3362 | drivers/block/floppy.c | static int floppy_read(struct inode * inode, struct file * filp, |
inode | 3365 | drivers/block/floppy.c | int drive = DRIVE(inode->i_rdev); |
inode | 3367 | drivers/block/floppy.c | check_disk_change(inode->i_rdev); |
inode | 3370 | drivers/block/floppy.c | return block_read(inode, filp, buf, count); |
inode | 3373 | drivers/block/floppy.c | static int floppy_write(struct inode * inode, struct file * filp, |
inode | 3378 | drivers/block/floppy.c | int drive = DRIVE(inode->i_rdev); |
inode | 3382 | drivers/block/floppy.c | check_disk_change(inode->i_rdev); |
inode | 3389 | drivers/block/floppy.c | ret= block_write(inode, filp, buf, count); |
inode | 3393 | drivers/block/floppy.c | static void floppy_release(struct inode * inode, struct file * filp) |
inode | 3397 | drivers/block/floppy.c | drive = DRIVE(inode->i_rdev); |
inode | 3402 | drivers/block/floppy.c | block_fsync(inode,filp); |
inode | 3418 | drivers/block/floppy.c | #define RETERR(x) do{floppy_release(inode,filp); return -(x);}while(0) |
inode | 3420 | drivers/block/floppy.c | static int floppy_open(struct inode * inode, struct file * filp) |
inode | 3432 | drivers/block/floppy.c | drive = DRIVE(inode->i_rdev); |
inode | 3438 | drivers/block/floppy.c | if (TYPE(inode->i_rdev) >= NUMBER(floppy_type)) |
inode | 3441 | drivers/block/floppy.c | if (UDRS->fd_ref && old_dev != MINOR(inode->i_rdev)) |
inode | 3487 | drivers/block/floppy.c | UDRS->fd_device = MINOR(inode->i_rdev); |
inode | 3488 | drivers/block/floppy.c | if (old_dev != -1 && old_dev != MINOR(inode->i_rdev)) { |
inode | 3495 | drivers/block/floppy.c | if ((filp->f_mode & 2) || (permission(inode,2) == 0)) |
inode | 3507 | drivers/block/floppy.c | check_disk_change(inode->i_rdev); |
inode | 778 | drivers/block/hd.c | static int hd_ioctl(struct inode * inode, struct file * file, |
inode | 785 | drivers/block/hd.c | if ((!inode) || !(inode->i_rdev)) |
inode | 787 | drivers/block/hd.c | dev = DEVICE_NR(inode->i_rdev); |
inode | 802 | drivers/block/hd.c | put_user(hd[MINOR(inode->i_rdev)].start_sect, |
inode | 808 | drivers/block/hd.c | read_ahead[MAJOR(inode->i_rdev)] = arg; |
inode | 815 | drivers/block/hd.c | put_user(read_ahead[MAJOR(inode->i_rdev)],(long *) arg); |
inode | 822 | drivers/block/hd.c | put_user(hd[MINOR(inode->i_rdev)].nr_sects, (long *) arg); |
inode | 826 | drivers/block/hd.c | fsync_dev(inode->i_rdev); |
inode | 827 | drivers/block/hd.c | invalidate_buffers(inode->i_rdev); |
inode | 831 | drivers/block/hd.c | return revalidate_hddisk(inode->i_rdev, 1); |
inode | 835 | drivers/block/hd.c | if ((arg > 1) || (MINOR(inode->i_rdev) & 0x3F)) |
inode | 858 | drivers/block/hd.c | if (MINOR(inode->i_rdev) & 0x3F) return -EINVAL; |
inode | 876 | drivers/block/hd.c | if (MINOR(inode->i_rdev) & 0x3F) return -EINVAL; |
inode | 884 | drivers/block/hd.c | RO_IOCTLS(inode->i_rdev,arg); |
inode | 890 | drivers/block/hd.c | static int hd_open(struct inode * inode, struct file * filp) |
inode | 893 | drivers/block/hd.c | target = DEVICE_NR(inode->i_rdev); |
inode | 907 | drivers/block/hd.c | static void hd_release(struct inode * inode, struct file * file) |
inode | 910 | drivers/block/hd.c | sync_dev(inode->i_rdev); |
inode | 912 | drivers/block/hd.c | target = DEVICE_NR(inode->i_rdev); |
inode | 2054 | drivers/block/ide-cd.c | int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode, |
inode | 2514 | drivers/block/ide-cd.c | int ide_cdrom_open (struct inode *ip, struct file *fp, ide_drive_t *drive) |
inode | 2562 | drivers/block/ide-cd.c | void ide_cdrom_release (struct inode *inode, struct file *file, ide_drive_t *drive) |
inode | 2566 | drivers/block/ide-cd.c | invalidate_buffers (inode->i_rdev); |
inode | 1669 | drivers/block/ide.c | static int ide_open(struct inode * inode, struct file * filp) |
inode | 1674 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) == NULL) |
inode | 1684 | drivers/block/ide.c | return ide_cdrom_open (inode, filp, drive); |
inode | 1688 | drivers/block/ide.c | check_disk_change(inode->i_rdev); |
inode | 1689 | drivers/block/ide.c | ide_do_drive_cmd(inode->i_rdev, door_lock); |
inode | 1698 | drivers/block/ide.c | static void ide_release(struct inode * inode, struct file * file) |
inode | 1702 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) != NULL) { |
inode | 1703 | drivers/block/ide.c | sync_dev(inode->i_rdev); |
inode | 1707 | drivers/block/ide.c | ide_cdrom_release (inode, file, drive); |
inode | 1712 | drivers/block/ide.c | invalidate_buffers(inode->i_rdev); |
inode | 1713 | drivers/block/ide.c | ide_do_drive_cmd(inode->i_rdev, door_unlock); |
inode | 1778 | drivers/block/ide.c | static int ide_ioctl (struct inode *inode, struct file *file, |
inode | 1786 | drivers/block/ide.c | if (!inode || !(inode->i_rdev)) |
inode | 1788 | drivers/block/ide.c | if ((drive = get_info_ptr(inode->i_rdev)) == NULL) |
inode | 1798 | drivers/block/ide.c | put_user((unsigned)drive->part[MINOR(inode->i_rdev)&PARTN_MASK].start_sect, |
inode | 1804 | drivers/block/ide.c | fsync_dev(inode->i_rdev); |
inode | 1805 | drivers/block/ide.c | invalidate_buffers(inode->i_rdev); |
inode | 1811 | drivers/block/ide.c | read_ahead[MAJOR(inode->i_rdev)] = arg; |
inode | 1815 | drivers/block/ide.c | return write_fs_long(arg, read_ahead[MAJOR(inode->i_rdev)]); |
inode | 1818 | drivers/block/ide.c | return write_fs_long(arg, drive->part[MINOR(inode->i_rdev)&PARTN_MASK].nr_sects); |
inode | 1820 | drivers/block/ide.c | return revalidate_disk(inode->i_rdev); |
inode | 1838 | drivers/block/ide.c | if (!arg || (MINOR(inode->i_rdev) & PARTN_MASK)) |
inode | 1863 | drivers/block/ide.c | if ((MINOR(inode->i_rdev) & PARTN_MASK)) |
inode | 1904 | drivers/block/ide.c | if (MINOR(inode->i_rdev) & PARTN_MASK) |
inode | 1917 | drivers/block/ide.c | ide_do_drive_cmd (inode->i_rdev, NULL); |
inode | 1925 | drivers/block/ide.c | err = ide_do_drive_cmd(inode->i_rdev,NULL); |
inode | 1931 | drivers/block/ide.c | err = ide_do_drive_cmd(inode->i_rdev,(char *)&args); |
inode | 1939 | drivers/block/ide.c | RO_IOCTLS(inode->i_rdev, arg); |
inode | 1944 | drivers/block/ide.c | return ide_cdrom_ioctl(drive, inode, file, cmd, arg); |
inode | 457 | drivers/block/ide.h | int ide_cdrom_ioctl (ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long); |
inode | 459 | drivers/block/ide.h | int ide_cdrom_open (struct inode *, struct file *, ide_drive_t *); |
inode | 460 | drivers/block/ide.h | void ide_cdrom_release (struct inode *, struct file *, ide_drive_t *); |
inode | 205 | drivers/block/ramdisk.c | struct inode inode; |
inode | 223 | drivers/block/ramdisk.c | memset(&inode, 0, sizeof(inode)); |
inode | 224 | drivers/block/ramdisk.c | inode.i_rdev = ROOT_DEV; |
inode | 226 | drivers/block/ramdisk.c | filp.f_inode = &inode; |
inode | 227 | drivers/block/ramdisk.c | if(blkdev_open(&inode, &filp) == 0 ){ |
inode | 230 | drivers/block/ramdisk.c | filp.f_op->release(&inode,&filp); |
inode | 193 | drivers/block/xd.c | static int xd_open (struct inode *inode,struct file *file) |
inode | 195 | drivers/block/xd.c | int dev = DEVICE_NR(inode->i_rdev); |
inode | 240 | drivers/block/xd.c | static int xd_ioctl (struct inode *inode,struct file *file,u_int cmd,u_long arg) |
inode | 243 | drivers/block/xd.c | int dev = DEVICE_NR(inode->i_rdev),err; |
inode | 245 | drivers/block/xd.c | if (inode && (dev < xd_drives)) |
inode | 254 | drivers/block/xd.c | put_user(xd[MINOR(inode->i_rdev)].start_sect,&geometry->start); |
inode | 262 | drivers/block/xd.c | if(!(inode->i_rdev)) |
inode | 266 | drivers/block/xd.c | read_ahead[MAJOR(inode->i_rdev)] = arg; |
inode | 272 | drivers/block/xd.c | put_user(xd[MINOR(inode->i_rdev)].nr_sects,(long *) arg); |
inode | 279 | drivers/block/xd.c | if(!(inode->i_rdev)) |
inode | 281 | drivers/block/xd.c | fsync_dev(inode->i_rdev); |
inode | 282 | drivers/block/xd.c | invalidate_buffers(inode->i_rdev); |
inode | 286 | drivers/block/xd.c | return (xd_reread_partitions(inode->i_rdev)); |
inode | 287 | drivers/block/xd.c | RO_IOCTLS(inode->i_rdev,arg); |
inode | 293 | drivers/block/xd.c | static void xd_release (struct inode *inode, struct file *file) |
inode | 295 | drivers/block/xd.c | int dev = DEVICE_NR(inode->i_rdev); |
inode | 298 | drivers/block/xd.c | sync_dev(inode->i_rdev); |
inode | 607 | drivers/cdrom/aztcd.c | static int aztcd_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) |
inode | 1434 | drivers/cdrom/aztcd.c | int aztcd_open(struct inode *ip, struct file *fp) |
inode | 1478 | drivers/cdrom/aztcd.c | static void aztcd_release(struct inode * inode, struct file * file) |
inode | 1482 | drivers/cdrom/aztcd.c | printk("inode: %p, inode->i_rdev: %x file: %p\n",inode,inode->i_rdev,file); |
inode | 1487 | drivers/cdrom/aztcd.c | sync_dev(inode->i_rdev); /*??? isn't it a read only dev?*/ |
inode | 1488 | drivers/cdrom/aztcd.c | invalidate_buffers(inode -> i_rdev); |
inode | 237 | drivers/cdrom/cdu31a.c | static int scd_open(struct inode *inode, struct file *filp); |
inode | 1536 | drivers/cdrom/cdu31a.c | struct inode in; |
inode | 2174 | drivers/cdrom/cdu31a.c | struct inode *inode) |
inode | 2204 | drivers/cdrom/cdu31a.c | scd_open (inode, NULL); |
inode | 2377 | drivers/cdrom/cdu31a.c | static int scd_ioctl(struct inode *inode, |
inode | 2388 | drivers/cdrom/cdu31a.c | if (!inode) |
inode | 2703 | drivers/cdrom/cdu31a.c | return(read_audio(&ra, inode)); |
inode | 2725 | drivers/cdrom/cdu31a.c | scd_open(struct inode *inode, |
inode | 2829 | drivers/cdrom/cdu31a.c | check_disk_change(inode->i_rdev); |
inode | 2848 | drivers/cdrom/cdu31a.c | scd_release(struct inode *inode, |
inode | 2862 | drivers/cdrom/cdu31a.c | sync_dev(inode->i_rdev); |
inode | 532 | drivers/cdrom/cm206.c | static int cm206_open(struct inode *ip, struct file *fp) |
inode | 569 | drivers/cdrom/cm206.c | static void cm206_release(struct inode *ip, struct file *fp) |
inode | 885 | drivers/cdrom/cm206.c | static int cm206_ioctl(struct inode * inode, struct file * file, |
inode | 87 | drivers/cdrom/gscd.c | static int gscd_ioctl (struct inode *, struct file *, unsigned int, unsigned long); |
inode | 88 | drivers/cdrom/gscd.c | static int gscd_open (struct inode *, struct file *); |
inode | 89 | drivers/cdrom/gscd.c | static void gscd_release (struct inode *, struct file *); |
inode | 202 | drivers/cdrom/gscd.c | static int gscd_ioctl (struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) |
inode | 362 | drivers/cdrom/gscd.c | static int gscd_open (struct inode *ip, struct file *fp) |
inode | 395 | drivers/cdrom/gscd.c | static void gscd_release (struct inode * inode, struct file * file) |
inode | 403 | drivers/cdrom/gscd.c | sync_dev(inode->i_rdev); |
inode | 404 | drivers/cdrom/gscd.c | invalidate_buffers(inode -> i_rdev); |
inode | 284 | drivers/cdrom/mcd.c | mcd_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, |
inode | 1093 | drivers/cdrom/mcd.c | mcd_open(struct inode *ip, struct file *fp) |
inode | 1132 | drivers/cdrom/mcd.c | mcd_release(struct inode * inode, struct file * file) |
inode | 1136 | drivers/cdrom/mcd.c | sync_dev(inode->i_rdev); |
inode | 1137 | drivers/cdrom/mcd.c | invalidate_buffers(inode -> i_rdev); |
inode | 197 | drivers/cdrom/mcdx.c | static int mcdx_open(struct inode*, struct file*); |
inode | 198 | drivers/cdrom/mcdx.c | static void mcdx_close(struct inode*, struct file*); |
inode | 199 | drivers/cdrom/mcdx.c | static int mcdx_ioctl(struct inode*, struct file*, unsigned int, unsigned long); |
inode | 267 | drivers/cdrom/mcdx.c | struct inode* ip, struct file* fp, |
inode | 609 | drivers/cdrom/mcdx.c | mcdx_open(struct inode *ip, struct file *fp) |
inode | 757 | drivers/cdrom/mcdx.c | mcdx_close(struct inode *ip, struct file *fp) |
inode | 1035 | drivers/cdrom/optcd.c | static int opt_ioctl(struct inode *ip, struct file *fp, |
inode | 1292 | drivers/cdrom/optcd.c | static int opt_open(struct inode *ip, struct file *fp) { |
inode | 1325 | drivers/cdrom/optcd.c | static void opt_release(struct inode *ip, struct file *fp) { |
inode | 3723 | drivers/cdrom/sbpcd.c | static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd, |
inode | 3729 | drivers/cdrom/sbpcd.c | MINOR(inode->i_rdev), cmd, arg); |
inode | 3730 | drivers/cdrom/sbpcd.c | if (!inode) return (-EINVAL); |
inode | 3731 | drivers/cdrom/sbpcd.c | i=MINOR(inode->i_rdev); |
inode | 3734 | drivers/cdrom/sbpcd.c | msg(DBG_INF, "ioctl: bad device: %04X\n", inode->i_rdev); |
inode | 4264 | drivers/cdrom/sbpcd.c | if(!(inode->i_rdev)) return -EINVAL; |
inode | 4266 | drivers/cdrom/sbpcd.c | read_ahead[MAJOR(inode->i_rdev)] = arg; |
inode | 4759 | drivers/cdrom/sbpcd.c | static int sbpcd_open(struct inode *ip, struct file *fp) |
inode | 4844 | drivers/cdrom/sbpcd.c | static void sbpcd_release(struct inode * ip, struct file * file) |
inode | 713 | drivers/cdrom/sjcd.c | static int sjcd_ioctl( struct inode *ip, struct file *fp, |
inode | 1369 | drivers/cdrom/sjcd.c | int sjcd_open( struct inode *ip, struct file *fp ){ |
inode | 1442 | drivers/cdrom/sjcd.c | static void sjcd_release( struct inode *inode, struct file *file ){ |
inode | 1451 | drivers/cdrom/sjcd.c | sync_dev( inode->i_rdev ); |
inode | 1452 | drivers/cdrom/sjcd.c | invalidate_buffers( inode->i_rdev ); |
inode | 192 | drivers/cdrom/sonycd535.c | static int cdu_open(struct inode *inode, struct file *filp); |
inode | 1069 | drivers/cdrom/sonycd535.c | cdu_ioctl(struct inode *inode, |
inode | 1081 | drivers/cdrom/sonycd535.c | if (!inode) { |
inode | 1084 | drivers/cdrom/sonycd535.c | dev = MINOR(inode->i_rdev) >> 6; |
inode | 1387 | drivers/cdrom/sonycd535.c | cdu_open(struct inode *inode, |
inode | 1415 | drivers/cdrom/sonycd535.c | if (inode) { |
inode | 1416 | drivers/cdrom/sonycd535.c | check_disk_change(inode->i_rdev); |
inode | 1435 | drivers/cdrom/sonycd535.c | cdu_release(struct inode *inode, |
inode | 1447 | drivers/cdrom/sonycd535.c | sync_dev(inode->i_rdev); |
inode | 96 | drivers/char/atixlmouse.c | static int fasync_mouse(struct inode *inode, struct file *filp, int on) |
inode | 100 | drivers/char/atixlmouse.c | retval = fasync_helper(inode, filp, on, &mouse.fasync); |
inode | 106 | drivers/char/atixlmouse.c | static void release_mouse(struct inode * inode, struct file * file) |
inode | 108 | drivers/char/atixlmouse.c | fasync_mouse(inode, file, 0); |
inode | 117 | drivers/char/atixlmouse.c | static int open_mouse(struct inode * inode, struct file * file) |
inode | 137 | drivers/char/atixlmouse.c | static int write_mouse(struct inode * inode, struct file * file, const char * buffer, int count) |
inode | 142 | drivers/char/atixlmouse.c | static int read_mouse(struct inode * inode, struct file * file, char * buffer, int count) |
inode | 173 | drivers/char/atixlmouse.c | static int mouse_select(struct inode *inode, struct file *file, int sel_type, select_table * wait) |
inode | 106 | drivers/char/busmouse.c | static int fasync_mouse(struct inode *inode, struct file *filp, int on) |
inode | 110 | drivers/char/busmouse.c | retval = fasync_helper(inode, filp, on, &mouse.fasyncptr); |
inode | 120 | drivers/char/busmouse.c | static void close_mouse(struct inode * inode, struct file * file) |
inode | 122 | drivers/char/busmouse.c | fasync_mouse(inode, file, 0); |
inode | 134 | drivers/char/busmouse.c | static int open_mouse(struct inode * inode, struct file * file) |
inode | 157 | drivers/char/busmouse.c | static int write_mouse(struct inode * inode, struct file * file, const char * buffer, int count) |
inode | 166 | drivers/char/busmouse.c | static int read_mouse(struct inode * inode, struct file * file, char * buffer, int count) |
inode | 215 | drivers/char/busmouse.c | static int mouse_select(struct inode *inode, struct file *file, int sel_type, select_table * wait) |
inode | 603 | drivers/char/istallion.c | static int stli_memread(struct inode *ip, struct file *fp, char *buf, int count); |
inode | 604 | drivers/char/istallion.c | static int stli_memwrite(struct inode *ip, struct file *fp, const char *buf, int count); |
inode | 605 | drivers/char/istallion.c | static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg); |
inode | 3832 | drivers/char/istallion.c | static int stli_memread(struct inode *ip, struct file *fp, char *buf, int count) |
inode | 3879 | drivers/char/istallion.c | static int stli_memwrite(struct inode *ip, struct file *fp, const char *buf, int count) |
inode | 3928 | drivers/char/istallion.c | static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) |
inode | 297 | drivers/char/lp.c | static int lp_write(struct inode * inode, struct file * file, const char * buf, int count) |
inode | 299 | drivers/char/lp.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 311 | drivers/char/lp.c | static int lp_lseek(struct inode * inode, struct file * file, |
inode | 317 | drivers/char/lp.c | static int lp_open(struct inode * inode, struct file * file) |
inode | 319 | drivers/char/lp.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 375 | drivers/char/lp.c | static void lp_release(struct inode * inode, struct file * file) |
inode | 377 | drivers/char/lp.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 391 | drivers/char/lp.c | static int lp_ioctl(struct inode *inode, struct file *file, |
inode | 394 | drivers/char/lp.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 29 | drivers/char/mem.c | static int read_ram(struct inode * inode, struct file * file, char * buf, int count) |
inode | 34 | drivers/char/mem.c | static int write_ram(struct inode * inode, struct file * file, const char * buf, int count) |
inode | 39 | drivers/char/mem.c | static int read_mem(struct inode * inode, struct file * file, char * buf, int count) |
inode | 67 | drivers/char/mem.c | static int write_mem(struct inode * inode, struct file * file, const char * buf, int count) |
inode | 95 | drivers/char/mem.c | static int mmap_mem(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
inode | 111 | drivers/char/mem.c | vma->vm_inode = inode; |
inode | 112 | drivers/char/mem.c | inode->i_count++; |
inode | 116 | drivers/char/mem.c | static int read_kmem(struct inode *inode, struct file *file, char *buf, int count) |
inode | 120 | drivers/char/mem.c | read1 = read_mem(inode, file, buf, count); |
inode | 130 | drivers/char/mem.c | static int read_port(struct inode * inode, struct file * file,char * buf, int count) |
inode | 144 | drivers/char/mem.c | static int write_port(struct inode * inode, struct file * file, const char * buf, int count) |
inode | 158 | drivers/char/mem.c | static int read_null(struct inode * node, struct file * file, char * buf, int count) |
inode | 163 | drivers/char/mem.c | static int write_null(struct inode * inode, struct file * file, const char * buf, int count) |
inode | 168 | drivers/char/mem.c | static int read_zero(struct inode * node, struct file * file, char * buf, int count) |
inode | 179 | drivers/char/mem.c | static int mmap_zero(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
inode | 188 | drivers/char/mem.c | static int read_full(struct inode * node, struct file * file, char * buf,int count) |
inode | 193 | drivers/char/mem.c | static int write_full(struct inode * inode, struct file * file, const char * buf, int count) |
inode | 203 | drivers/char/mem.c | static int null_lseek(struct inode * inode, struct file * file, off_t offset, int orig) |
inode | 215 | drivers/char/mem.c | static int memory_lseek(struct inode * inode, struct file * file, off_t offset, int orig) |
inode | 326 | drivers/char/mem.c | static int memory_open(struct inode * inode, struct file * filp) |
inode | 328 | drivers/char/mem.c | switch (MINOR(inode->i_rdev)) { |
inode | 360 | drivers/char/mem.c | return filp->f_op->open(inode,filp); |
inode | 41 | drivers/char/mouse.c | static int mouse_open(struct inode * inode, struct file * file) |
inode | 43 | drivers/char/mouse.c | int minor = MINOR(inode->i_rdev); |
inode | 57 | drivers/char/mouse.c | return file->f_op->open(inode,file); |
inode | 83 | drivers/char/msbusmouse.c | static int fasync_mouse(struct inode *inode, struct file *filp, int on) |
inode | 87 | drivers/char/msbusmouse.c | retval = fasync_helper(inode, filp, on, &mouse.fasyncptr); |
inode | 93 | drivers/char/msbusmouse.c | static void release_mouse(struct inode * inode, struct file * file) |
inode | 95 | drivers/char/msbusmouse.c | fasync_mouse(inode, file, 0); |
inode | 104 | drivers/char/msbusmouse.c | static int open_mouse(struct inode * inode, struct file * file) |
inode | 123 | drivers/char/msbusmouse.c | static int write_mouse(struct inode * inode, struct file * file, const char * buffer, int count) |
inode | 128 | drivers/char/msbusmouse.c | static int read_mouse(struct inode * inode, struct file * file, char * buffer, int count) |
inode | 149 | drivers/char/msbusmouse.c | static int mouse_select(struct inode *inode, struct file *file, int sel_type, select_table * wait) |
inode | 976 | drivers/char/n_tty.c | static int normal_select(struct tty_struct * tty, struct inode * inode, |
inode | 125 | drivers/char/psaux.c | static int fasync_aux(struct inode *inode, struct file *filp, int on); |
inode | 256 | drivers/char/psaux.c | static void release_aux(struct inode * inode, struct file * file) |
inode | 258 | drivers/char/psaux.c | fasync_aux(inode, file, 0); |
inode | 270 | drivers/char/psaux.c | static void release_qp(struct inode * inode, struct file * file) |
inode | 274 | drivers/char/psaux.c | fasync_aux(inode, file, 0); |
inode | 288 | drivers/char/psaux.c | static int fasync_aux(struct inode *inode, struct file *filp, int on) |
inode | 292 | drivers/char/psaux.c | retval = fasync_helper(inode, filp, on, &queue->fasync); |
inode | 303 | drivers/char/psaux.c | static int open_aux(struct inode * inode, struct file * file) |
inode | 334 | drivers/char/psaux.c | static int open_qp(struct inode * inode, struct file * file) |
inode | 378 | drivers/char/psaux.c | static int write_aux(struct inode * inode, struct file * file, const char * buffer, int count) |
inode | 390 | drivers/char/psaux.c | inode->i_mtime = CURRENT_TIME; |
inode | 400 | drivers/char/psaux.c | static int write_qp(struct inode * inode, struct file * file, const char * buffer, int count) |
inode | 409 | drivers/char/psaux.c | inode->i_mtime = CURRENT_TIME; |
inode | 419 | drivers/char/psaux.c | static int read_aux(struct inode * inode, struct file * file, char * buffer, int count) |
inode | 445 | drivers/char/psaux.c | inode->i_atime = CURRENT_TIME; |
inode | 454 | drivers/char/psaux.c | static int aux_select(struct inode *inode, struct file *file, int sel_type, select_table * wait) |
inode | 234 | drivers/char/random.c | static int random_read(struct inode * inode, struct file * file, |
inode | 236 | drivers/char/random.c | static int random_read_unlimited(struct inode * inode, struct file * file, |
inode | 238 | drivers/char/random.c | static int random_select(struct inode *inode, struct file *file, |
inode | 240 | drivers/char/random.c | static int random_write(struct inode * inode, struct file * file, |
inode | 242 | drivers/char/random.c | static int random_ioctl(struct inode * inode, struct file * file, |
inode | 640 | drivers/char/random.c | random_read(struct inode * inode, struct file * file, char * buf, int nbytes) |
inode | 683 | drivers/char/random.c | random_read_unlimited(struct inode * inode, struct file * file, |
inode | 690 | drivers/char/random.c | random_select(struct inode *inode, struct file *file, |
inode | 702 | drivers/char/random.c | random_write(struct inode * inode, struct file * file, |
inode | 719 | drivers/char/random.c | if (inode) |
inode | 720 | drivers/char/random.c | inode->i_mtime = CURRENT_TIME; |
inode | 725 | drivers/char/random.c | random_ioctl(struct inode * inode, struct file * file, |
inode | 1883 | drivers/char/tpqic02.c | static int qic02_tape_lseek(struct inode * inode, struct file * file, off_t offset, int origin) |
inode | 1921 | drivers/char/tpqic02.c | static int qic02_tape_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 1924 | drivers/char/tpqic02.c | kdev_t dev = inode->i_rdev; |
inode | 2096 | drivers/char/tpqic02.c | static int qic02_tape_write(struct inode * inode, struct file * filp, const char * buf, int count) |
inode | 2099 | drivers/char/tpqic02.c | kdev_t dev = inode->i_rdev; |
inode | 2248 | drivers/char/tpqic02.c | static int qic02_tape_open(struct inode * inode, struct file * filp) |
inode | 2250 | drivers/char/tpqic02.c | kdev_t dev = inode->i_rdev; |
inode | 2434 | drivers/char/tpqic02.c | static void qic02_tape_release(struct inode * inode, struct file * filp) |
inode | 2436 | drivers/char/tpqic02.c | kdev_t dev = inode->i_rdev; |
inode | 2556 | drivers/char/tpqic02.c | static int qic02_tape_ioctl(struct inode * inode, struct file * filp, |
inode | 2561 | drivers/char/tpqic02.c | int dev_maj = MAJOR(inode->i_rdev); |
inode | 2572 | drivers/char/tpqic02.c | if (!inode || !ioarg) |
inode | 103 | drivers/char/tty_io.c | static int tty_read(struct inode *, struct file *, char *, int); |
inode | 104 | drivers/char/tty_io.c | static int tty_write(struct inode *, struct file *, const char *, int); |
inode | 105 | drivers/char/tty_io.c | static int tty_select(struct inode *, struct file *, int, select_table *); |
inode | 106 | drivers/char/tty_io.c | static int tty_open(struct inode *, struct file *); |
inode | 107 | drivers/char/tty_io.c | static void tty_release(struct inode *, struct file *); |
inode | 108 | drivers/char/tty_io.c | static int tty_ioctl(struct inode * inode, struct file * file, |
inode | 110 | drivers/char/tty_io.c | static int tty_fasync(struct inode * inode, struct file * filp, int on); |
inode | 296 | drivers/char/tty_io.c | static int hung_up_tty_read(struct inode * inode, struct file * file, char * buf, int count) |
inode | 301 | drivers/char/tty_io.c | static int hung_up_tty_write(struct inode * inode, struct file * file, const char * buf, int count) |
inode | 306 | drivers/char/tty_io.c | static int hung_up_tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
inode | 311 | drivers/char/tty_io.c | static int hung_up_tty_ioctl(struct inode * inode, struct file * file, |
inode | 317 | drivers/char/tty_io.c | static int tty_lseek(struct inode * inode, struct file * file, off_t offset, int orig) |
inode | 699 | drivers/char/tty_io.c | static int tty_read(struct inode * inode, struct file * file, char * buf, int count) |
inode | 705 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_read")) |
inode | 715 | drivers/char/tty_io.c | if ((inode->i_rdev != CONSOLE_DEV) && /* don't stop on /dev/console */ |
inode | 732 | drivers/char/tty_io.c | inode->i_atime = CURRENT_TIME; |
inode | 736 | drivers/char/tty_io.c | static int tty_write(struct inode * inode, struct file * file, const char * buf, int count) |
inode | 741 | drivers/char/tty_io.c | is_console = (inode->i_rdev == CONSOLE_DEV); |
inode | 747 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_write")) |
inode | 768 | drivers/char/tty_io.c | inode->i_mtime = CURRENT_TIME; |
inode | 1146 | drivers/char/tty_io.c | static int tty_open(struct inode * inode, struct file * filp) |
inode | 1155 | drivers/char/tty_io.c | device = inode->i_rdev; |
inode | 1221 | drivers/char/tty_io.c | static void tty_release(struct inode * inode, struct file * filp) |
inode | 1226 | drivers/char/tty_io.c | static int tty_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
inode | 1231 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_select")) |
inode | 1235 | drivers/char/tty_io.c | return (tty->ldisc.select)(tty, inode, filp, sel_type, wait); |
inode | 1244 | drivers/char/tty_io.c | int fasync_helper(struct inode * inode, struct file * filp, int on, struct fasync_struct **fapp) |
inode | 1279 | drivers/char/tty_io.c | static int tty_fasync(struct inode * inode, struct file * filp, int on) |
inode | 1285 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_fasync")) |
inode | 1288 | drivers/char/tty_io.c | retval = fasync_helper(inode, filp, on, &tty->fasync); |
inode | 1342 | drivers/char/tty_io.c | static int tty_ioctl(struct inode * inode, struct file * file, |
inode | 1354 | drivers/char/tty_io.c | if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl")) |
inode | 31 | drivers/char/vc_screen.c | vcs_size(struct inode *inode) |
inode | 34 | drivers/char/vc_screen.c | if (MINOR(inode->i_rdev) & 128) |
inode | 40 | drivers/char/vc_screen.c | vcs_lseek(struct inode *inode, struct file *file, off_t offset, int orig) |
inode | 42 | drivers/char/vc_screen.c | int size = vcs_size(inode); |
inode | 63 | drivers/char/vc_screen.c | vcs_read(struct inode *inode, struct file *file, char *buf, int count) |
inode | 66 | drivers/char/vc_screen.c | unsigned int cons = MINOR(inode->i_rdev); |
inode | 83 | drivers/char/vc_screen.c | size = vcs_size(inode); |
inode | 121 | drivers/char/vc_screen.c | vcs_write(struct inode *inode, struct file *file, const char *buf, int count) |
inode | 124 | drivers/char/vc_screen.c | unsigned int cons = MINOR(inode->i_rdev); |
inode | 141 | drivers/char/vc_screen.c | size = vcs_size(inode); |
inode | 186 | drivers/char/vc_screen.c | vcs_open(struct inode *inode, struct file *filp) |
inode | 188 | drivers/char/vc_screen.c | unsigned int cons = (MINOR(inode->i_rdev) & 127); |
inode | 237 | drivers/net/ppp.c | static int ppp_tty_select (struct tty_struct *tty, struct inode *inode, |
inode | 2622 | drivers/net/ppp.c | ppp_tty_select (struct tty_struct *tty, struct inode *inode, |
inode | 2144 | drivers/scsi/53c7,8xx.c | static struct Scsi_Host * inode_to_host (struct inode *inode) {$ |
inode | 2147 | drivers/scsi/53c7,8xx.c | for (dev = MINOR(inode->rdev), host = first_host; |
inode | 2154 | drivers/scsi/53c7,8xx.c | static debugger_user_write (struct inode *inode,struct file *filp, |
inode | 2163 | drivers/scsi/53c7,8xx.c | if (!(host = inode_to_host(inode))) |
inode | 2206 | drivers/scsi/53c7,8xx.c | static debugger_user_read (struct inode *inode,struct file *filp, |
inode | 634 | drivers/scsi/scsi_debug.c | int length, int inode, int inout) |
inode | 51 | drivers/scsi/scsi_proc.c | int length, int inode, int inout) |
inode | 72 | drivers/scsi/sd.c | extern int sd_ioctl(struct inode *, struct file *, unsigned int, unsigned long); |
inode | 94 | drivers/scsi/sd.c | static int sd_open(struct inode * inode, struct file * filp) |
inode | 97 | drivers/scsi/sd.c | target = DEVICE_NR(inode->i_rdev); |
inode | 111 | drivers/scsi/sd.c | check_disk_change(inode->i_rdev); |
inode | 130 | drivers/scsi/sd.c | sd_ioctl(inode, NULL, SCSI_IOCTL_DOORLOCK, 0); |
inode | 137 | drivers/scsi/sd.c | if(sd_sizes[MINOR(inode->i_rdev)] == 0) |
inode | 147 | drivers/scsi/sd.c | static void sd_release(struct inode * inode, struct file * file) |
inode | 150 | drivers/scsi/sd.c | sync_dev(inode->i_rdev); |
inode | 152 | drivers/scsi/sd.c | target = DEVICE_NR(inode->i_rdev); |
inode | 161 | drivers/scsi/sd.c | sd_ioctl(inode, NULL, SCSI_IOCTL_DOORUNLOCK, 0); |
inode | 900 | drivers/scsi/sd.c | struct inode inode; |
inode | 913 | drivers/scsi/sd.c | inode.i_rdev = full_dev; /* This is all we really need here */ |
inode | 914 | drivers/scsi/sd.c | retval = sd_ioctl(&inode, NULL, SCSI_IOCTL_TEST_UNIT_READY, 0); |
inode | 22 | drivers/scsi/sd_ioctl.c | int sd_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg) |
inode | 24 | drivers/scsi/sd_ioctl.c | kdev_t dev = inode->i_rdev; |
inode | 47 | drivers/scsi/sd_ioctl.c | put_user(sd[MINOR(inode->i_rdev)].start_sect, &loc->start); |
inode | 54 | drivers/scsi/sd_ioctl.c | put_user(sd[MINOR(inode->i_rdev)].nr_sects, |
inode | 59 | drivers/scsi/sd_ioctl.c | if(!(inode->i_rdev)) return -EINVAL; |
inode | 61 | drivers/scsi/sd_ioctl.c | read_ahead[MAJOR(inode->i_rdev)] = arg; |
inode | 65 | drivers/scsi/sd_ioctl.c | if(!(inode->i_rdev)) return -EINVAL; |
inode | 66 | drivers/scsi/sd_ioctl.c | fsync_dev(inode->i_rdev); |
inode | 67 | drivers/scsi/sd_ioctl.c | invalidate_buffers(inode->i_rdev); |
inode | 66 | drivers/scsi/sg.c | static int sg_ioctl(struct inode * inode,struct file * file, |
inode | 70 | drivers/scsi/sg.c | int dev = MINOR(inode->i_rdev); |
inode | 88 | drivers/scsi/sg.c | static int sg_open(struct inode * inode, struct file * filp) |
inode | 90 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
inode | 150 | drivers/scsi/sg.c | static void sg_close(struct inode * inode, struct file * filp) |
inode | 152 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
inode | 199 | drivers/scsi/sg.c | static int sg_read(struct inode *inode,struct file *filp,char *buf,int count) |
inode | 201 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
inode | 298 | drivers/scsi/sg.c | static int sg_write(struct inode *inode,struct file *filp,const char *buf,int count) |
inode | 302 | drivers/scsi/sg.c | kdev_t devt = inode->i_rdev; |
inode | 470 | drivers/scsi/sg.c | static int sg_select(struct inode *inode, struct file *file, int sel_type, select_table * wait) |
inode | 472 | drivers/scsi/sg.c | int dev=MINOR(inode->i_rdev); |
inode | 60 | drivers/scsi/sr.c | static int sr_open(struct inode *, struct file *); |
inode | 63 | drivers/scsi/sr.c | extern int sr_ioctl(struct inode *, struct file *, unsigned int, unsigned long); |
inode | 68 | drivers/scsi/sr.c | static void sr_release(struct inode * inode, struct file * file) |
inode | 70 | drivers/scsi/sr.c | sync_dev(inode->i_rdev); |
inode | 71 | drivers/scsi/sr.c | if(! --scsi_CDs[MINOR(inode->i_rdev)].device->access_count) |
inode | 73 | drivers/scsi/sr.c | sr_ioctl(inode, NULL, SCSI_IOCTL_DOORUNLOCK, 0); |
inode | 74 | drivers/scsi/sr.c | if (scsi_CDs[MINOR(inode->i_rdev)].auto_eject) |
inode | 75 | drivers/scsi/sr.c | sr_ioctl(inode, NULL, CDROMEJECT, 0); |
inode | 77 | drivers/scsi/sr.c | if (scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count) |
inode | 78 | drivers/scsi/sr.c | (*scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count)--; |
inode | 111 | drivers/scsi/sr.c | struct inode inode; |
inode | 121 | drivers/scsi/sr.c | inode.i_rdev = full_dev; /* This is all we really need here */ |
inode | 122 | drivers/scsi/sr.c | retval = sr_ioctl(&inode, NULL, SCSI_IOCTL_TEST_UNIT_READY, 0); |
inode | 317 | drivers/scsi/sr.c | static void sr_photocd(struct inode *inode) |
inode | 326 | drivers/scsi/sr.c | if (scsi_CDs[MINOR(inode->i_rdev)].xa_flags & 0x02) { |
inode | 340 | drivers/scsi/sr.c | if (1 == scsi_CDs[MINOR(inode->i_rdev)].device->access_count) { |
inode | 341 | drivers/scsi/sr.c | scsi_CDs[MINOR(inode->i_rdev)].mpcd_sector = 0; |
inode | 342 | drivers/scsi/sr.c | scsi_CDs[MINOR(inode->i_rdev)].xa_flags &= ~0x01; |
inode | 352 | drivers/scsi/sr.c | switch(scsi_CDs[MINOR(inode->i_rdev)].device->manufacturer) { |
inode | 364 | drivers/scsi/sr.c | rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device, |
inode | 399 | drivers/scsi/sr.c | rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device, |
inode | 406 | drivers/scsi/sr.c | if (kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device, |
inode | 436 | drivers/scsi/sr.c | rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device, |
inode | 461 | drivers/scsi/sr.c | rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device, |
inode | 467 | drivers/scsi/sr.c | scsi_CDs[MINOR(inode->i_rdev)].needs_sector_size = 1; |
inode | 482 | drivers/scsi/sr.c | rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device, |
inode | 509 | drivers/scsi/sr.c | scsi_CDs[MINOR(inode->i_rdev)].mpcd_sector = sector; |
inode | 511 | drivers/scsi/sr.c | scsi_CDs[MINOR(inode->i_rdev)].xa_flags |= 0x01; |
inode | 513 | drivers/scsi/sr.c | scsi_CDs[MINOR(inode->i_rdev)].xa_flags &= ~0x01; |
inode | 515 | drivers/scsi/sr.c | scsi_CDs[MINOR(inode->i_rdev)].xa_flags |= 0x02; |
inode | 519 | drivers/scsi/sr.c | static int sr_open(struct inode * inode, struct file * filp) |
inode | 521 | drivers/scsi/sr.c | if(MINOR(inode->i_rdev) >= sr_template.nr_dev || |
inode | 522 | drivers/scsi/sr.c | !scsi_CDs[MINOR(inode->i_rdev)].device) return -ENXIO; /* No such device */ |
inode | 527 | drivers/scsi/sr.c | check_disk_change(inode->i_rdev); |
inode | 529 | drivers/scsi/sr.c | if(!scsi_CDs[MINOR(inode->i_rdev)].device->access_count++) |
inode | 530 | drivers/scsi/sr.c | sr_ioctl(inode, NULL, SCSI_IOCTL_DOORLOCK, 0); |
inode | 531 | drivers/scsi/sr.c | if (scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count) |
inode | 532 | drivers/scsi/sr.c | (*scsi_CDs[MINOR(inode->i_rdev)].device->host->hostt->usage_count)++; |
inode | 535 | drivers/scsi/sr.c | sr_photocd(inode); |
inode | 542 | drivers/scsi/sr.c | if(scsi_CDs[MINOR(inode->i_rdev)].needs_sector_size) |
inode | 543 | drivers/scsi/sr.c | get_sectorsize(MINOR(inode->i_rdev)); |
inode | 87 | drivers/scsi/sr_ioctl.c | int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg) |
inode | 91 | drivers/scsi/sr_ioctl.c | kdev_t dev = inode->i_rdev; |
inode | 298 | drivers/scsi/sr_ioctl.c | sr_ioctl (inode, NULL, SCSI_IOCTL_DOORUNLOCK, 0); |
inode | 462 | drivers/scsi/sr_ioctl.c | if(!(inode->i_rdev)) return -EINVAL; |
inode | 464 | drivers/scsi/sr_ioctl.c | read_ahead[MAJOR(inode->i_rdev)] = arg; |
inode | 96 | drivers/scsi/st.c | static int st_int_ioctl(struct inode * inode,struct file * file, |
inode | 389 | drivers/scsi/st.c | flush_buffer(struct inode * inode, struct file * filp, int seek_next) |
inode | 394 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
inode | 431 | drivers/scsi/st.c | result = st_int_ioctl(inode, filp, MTBSR, backspace); |
inode | 440 | drivers/scsi/st.c | scsi_tape_open(struct inode * inode, struct file * filp) |
inode | 447 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
inode | 642 | drivers/scsi/st.c | scsi_tape_close(struct inode * inode, struct file * filp) |
inode | 649 | drivers/scsi/st.c | kdev_t devt = inode->i_rdev; |
inode | 699 | drivers/scsi/st.c | flush_buffer(inode, filp, 0); |
inode | 707 | drivers/scsi/st.c | st_int_ioctl(inode, filp, MTREW, 1); |
inode | 710 | drivers/scsi/st.c | st_int_ioctl(inode, filp, MTUNLOCK, 0); |
inode | 728 | drivers/scsi/st.c | st_write(struct inode * inode, struct file * filp, const char * buf, int count) |
inode | 737 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
inode | 766 | drivers/scsi/st.c | !st_int_ioctl(inode, filp, MTLOCK, 0)) |
inode | 770 | drivers/scsi/st.c | retval = flush_buffer(inode, filp, 0); |
inode | 983 | drivers/scsi/st.c | st_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 990 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
inode | 1012 | drivers/scsi/st.c | !st_int_ioctl(inode, filp, MTLOCK, 0)) |
inode | 1016 | drivers/scsi/st.c | transfer = flush_buffer(inode, filp, 0); |
inode | 1223 | drivers/scsi/st.c | st_set_options(struct inode * inode, long options) |
inode | 1227 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
inode | 1269 | drivers/scsi/st.c | st_int_ioctl(struct inode * inode,struct file * file, |
inode | 1279 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
inode | 1472 | drivers/scsi/st.c | ioctl_result = st_int_ioctl(inode, file, MTFSF, 0x3fff); |
inode | 1646 | drivers/scsi/st.c | ioctl_result = st_int_ioctl(inode, file, MTFSF, 1); |
inode | 1648 | drivers/scsi/st.c | ioctl_result = st_int_ioctl(inode, file, MTBSF, 1); |
inode | 1734 | drivers/scsi/st.c | st_ioctl(struct inode * inode,struct file * file, |
inode | 1743 | drivers/scsi/st.c | int dev = TAPE_NR(inode->i_rdev); |
inode | 1775 | drivers/scsi/st.c | i = flush_buffer(inode, file, mtc.mt_op == MTSEEK || |
inode | 1798 | drivers/scsi/st.c | if (st_int_ioctl(inode, file, MTLOCK, 0)) { |
inode | 1811 | drivers/scsi/st.c | st_int_ioctl(inode, file, MTUNLOCK, 0); /* Ignore result! */ |
inode | 1815 | drivers/scsi/st.c | return st_set_options(inode, mtc.mt_count); |
inode | 1817 | drivers/scsi/st.c | return st_int_ioctl(inode, file, mtc.mt_op, mtc.mt_count); |
inode | 1882 | drivers/scsi/st.c | i = flush_buffer(inode, file, 0); |
inode | 77 | drivers/sound/soundcard.c | sound_read (struct inode *inode, struct file *file, char *buf, int count) |
inode | 81 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
inode | 89 | drivers/sound/soundcard.c | sound_write (struct inode *inode, struct file *file, const char *buf, int count) |
inode | 93 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
inode | 101 | drivers/sound/soundcard.c | sound_lseek (struct inode *inode, struct file *file, off_t offset, int orig) |
inode | 107 | drivers/sound/soundcard.c | sound_open (struct inode *inode, struct file *file) |
inode | 118 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
inode | 149 | drivers/sound/soundcard.c | sound_release (struct inode *inode, struct file *file) |
inode | 153 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
inode | 164 | drivers/sound/soundcard.c | sound_ioctl (struct inode *inode, struct file *file, |
inode | 169 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
inode | 202 | drivers/sound/soundcard.c | sound_select (struct inode *inode, struct file *file, int sel_type, select_table * wait) |
inode | 206 | drivers/sound/soundcard.c | dev = inode->i_rdev; |
inode | 164 | fs/binfmt_elf.c | struct inode * interpreter_inode, unsigned int *interp_load_addr) |
inode | 292 | fs/binfmt_elf.c | struct inode * interpreter_inode) |
inode | 346 | fs/binfmt_elf.c | struct inode *interpreter_inode; |
inode | 379 | fs/binfmt_elf.c | (!bprm->inode->i_op || !bprm->inode->i_op->default_file_ops || |
inode | 380 | fs/binfmt_elf.c | !bprm->inode->i_op->default_file_ops->mmap)){ |
inode | 392 | fs/binfmt_elf.c | retval = read_exec(bprm->inode, elf_ex.e_phoff, (char *) elf_phdata, |
inode | 404 | fs/binfmt_elf.c | elf_exec_fileno = open_inode(bprm->inode, O_RDONLY); |
inode | 440 | fs/binfmt_elf.c | retval = read_exec(bprm->inode,elf_ppnt->p_offset,elf_interpreter, |
inode | 627 | fs/binfmt_elf.c | current->executable = bprm->inode; |
inode | 628 | fs/binfmt_elf.c | bprm->inode->i_count++; |
inode | 712 | fs/binfmt_elf.c | struct inode * inode; |
inode | 722 | fs/binfmt_elf.c | inode = file->f_inode; |
inode | 730 | fs/binfmt_elf.c | if ((error = file->f_op->lseek(inode, file, 0, 0)) != 0) |
inode | 736 | fs/binfmt_elf.c | error = file->f_op->read(inode, file, (char *) &elf_ex, sizeof(elf_ex)); |
inode | 748 | fs/binfmt_elf.c | (!inode->i_op || !inode->i_op->default_file_ops->mmap)) |
inode | 761 | fs/binfmt_elf.c | retval = read_exec(inode, elf_ex.e_phoff, (char *) elf_phdata, |
inode | 940 | fs/binfmt_elf.c | struct inode *inode; |
inode | 1012 | fs/binfmt_elf.c | if (open_namei(corefile,O_CREAT | 2 | O_TRUNC,0600,&inode,NULL)) { |
inode | 1013 | fs/binfmt_elf.c | inode = NULL; |
inode | 1016 | fs/binfmt_elf.c | if (!S_ISREG(inode->i_mode)) |
inode | 1018 | fs/binfmt_elf.c | if (!inode->i_op || !inode->i_op->default_file_ops) |
inode | 1023 | fs/binfmt_elf.c | file.f_inode = inode; |
inode | 1026 | fs/binfmt_elf.c | file.f_op = inode->i_op->default_file_ops; |
inode | 1028 | fs/binfmt_elf.c | if (file.f_op->open(inode,&file)) |
inode | 1207 | fs/binfmt_elf.c | file.f_op->release(inode,&file); |
inode | 1211 | fs/binfmt_elf.c | iput(inode); |
inode | 23 | fs/block_dev.c | int block_write(struct inode * inode, struct file * filp, const char * buf, int count) |
inode | 40 | fs/block_dev.c | dev = inode->i_rdev; |
inode | 41 | fs/block_dev.c | if ( is_read_only( inode->i_rdev )) |
inode | 160 | fs/block_dev.c | int block_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 179 | fs/block_dev.c | dev = inode->i_rdev; |
inode | 316 | fs/block_dev.c | int block_fsync(struct inode *inode, struct file *filp) |
inode | 318 | fs/block_dev.c | return fsync_dev (inode->i_rdev); |
inode | 241 | fs/buffer.c | int file_fsync (struct inode *inode, struct file *filp) |
inode | 243 | fs/buffer.c | return fsync_dev(inode->i_dev); |
inode | 249 | fs/buffer.c | struct inode * inode; |
inode | 251 | fs/buffer.c | if (fd>=NR_OPEN || !(file=current->files->fd[fd]) || !(inode=file->f_inode)) |
inode | 255 | fs/buffer.c | if (file->f_op->fsync(inode,file)) |
inode | 133 | fs/dcache.c | static inline struct dir_cache_entry * find_entry(struct inode * dir, const char * name, int len, struct hash_list * hash) |
inode | 172 | fs/dcache.c | int dcache_lookup(struct inode * dir, const char * name, int len, unsigned long * ino) |
inode | 188 | fs/dcache.c | void dcache_add(struct inode * dir, const char * name, int len, unsigned long ino) |
inode | 171 | fs/devices.c | int blkdev_open(struct inode * inode, struct file * filp) |
inode | 175 | fs/devices.c | i = MAJOR(inode->i_rdev); |
inode | 180 | fs/devices.c | return filp->f_op->open(inode,filp); |
inode | 222 | fs/devices.c | int chrdev_open(struct inode * inode, struct file * filp) |
inode | 226 | fs/devices.c | i = MAJOR(inode->i_rdev); |
inode | 231 | fs/devices.c | return filp->f_op->open(inode,filp); |
inode | 104 | fs/exec.c | int open_inode(struct inode * inode, int mode) |
inode | 109 | fs/exec.c | if (!inode->i_op || !inode->i_op->default_file_ops) |
inode | 128 | fs/exec.c | f->f_inode = inode; |
inode | 131 | fs/exec.c | f->f_op = inode->i_op->default_file_ops; |
inode | 133 | fs/exec.c | error = f->f_op->open(inode,f); |
inode | 140 | fs/exec.c | inode->i_count++; |
inode | 149 | fs/exec.c | while (file.f_op->write(inode,&file,(char *)(addr),(nr)) != (nr)) goto close_coredump |
inode | 153 | fs/exec.c | if (file.f_op->lseek(inode,&file,(offset),0) != (offset)) \ |
inode | 168 | fs/exec.c | struct inode * inode = NULL; |
inode | 196 | fs/exec.c | if (open_namei(corefile,O_CREAT | 2 | O_TRUNC,0600,&inode,NULL)) { |
inode | 197 | fs/exec.c | inode = NULL; |
inode | 200 | fs/exec.c | if (!S_ISREG(inode->i_mode)) |
inode | 202 | fs/exec.c | if (!inode->i_op || !inode->i_op->default_file_ops) |
inode | 204 | fs/exec.c | if (get_write_access(inode)) |
inode | 209 | fs/exec.c | file.f_inode = inode; |
inode | 212 | fs/exec.c | file.f_op = inode->i_op->default_file_ops; |
inode | 214 | fs/exec.c | if (file.f_op->open(inode,&file)) |
inode | 266 | fs/exec.c | file.f_op->release(inode,&file); |
inode | 268 | fs/exec.c | put_write_access(inode); |
inode | 271 | fs/exec.c | iput(inode); |
inode | 487 | fs/exec.c | int read_exec(struct inode *inode, unsigned long offset, |
inode | 493 | fs/exec.c | if (!inode->i_op || !inode->i_op->default_file_ops) |
inode | 498 | fs/exec.c | file.f_inode = inode; |
inode | 501 | fs/exec.c | file.f_op = inode->i_op->default_file_ops; |
inode | 503 | fs/exec.c | if (file.f_op->open(inode,&file)) |
inode | 508 | fs/exec.c | if (file.f_op->lseek(inode,&file,offset,0) != offset) |
inode | 515 | fs/exec.c | result = file.f_op->read(inode, &file, addr, count); |
inode | 521 | fs/exec.c | result = file.f_op->read(inode, &file, addr, count); |
inode | 525 | fs/exec.c | file.f_op->release(inode,&file); |
inode | 589 | fs/exec.c | permission(bprm->inode,MAY_READ)) |
inode | 624 | fs/exec.c | retval = open_namei(filename, 0, 0, &bprm.inode, NULL); |
inode | 636 | fs/exec.c | if (!S_ISREG(bprm.inode->i_mode)) { /* must be regular file */ |
inode | 640 | fs/exec.c | if (IS_NOEXEC(bprm.inode)) { /* FS mustn't be mounted noexec */ |
inode | 644 | fs/exec.c | if (!bprm.inode->i_sb) { |
inode | 648 | fs/exec.c | i = bprm.inode->i_mode; |
inode | 649 | fs/exec.c | if (IS_NOSUID(bprm.inode) && (((i & S_ISUID) && bprm.inode->i_uid != current-> |
inode | 650 | fs/exec.c | euid) || ((i & S_ISGID) && !in_group_p(bprm.inode->i_gid))) && !suser()) { |
inode | 659 | fs/exec.c | bprm.e_uid = (i & S_ISUID) ? bprm.inode->i_uid : current->euid; |
inode | 660 | fs/exec.c | bprm.e_gid = (i & S_ISGID) ? bprm.inode->i_gid : current->egid; |
inode | 662 | fs/exec.c | if ((retval = permission(bprm.inode, MAY_EXEC)) != 0) |
inode | 664 | fs/exec.c | if (!(bprm.inode->i_mode & 0111) && fsuser()) { |
inode | 669 | fs/exec.c | if (bprm.inode->i_wcount > 0) { |
inode | 674 | fs/exec.c | retval = read_exec(bprm.inode,0,bprm.buf,128,1); |
inode | 685 | fs/exec.c | iput(bprm.inode); |
inode | 745 | fs/exec.c | retval = open_namei(interp, 0, 0, &bprm.inode, NULL); |
inode | 754 | fs/exec.c | iput(bprm.inode); |
inode | 758 | fs/exec.c | retval = open_namei(dynloader[0], 0, 0, &bprm.inode, NULL); |
inode | 782 | fs/exec.c | iput(bprm.inode); |
inode | 790 | fs/exec.c | iput(bprm.inode); |
inode | 827 | fs/exec.c | bprm->inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { |
inode | 841 | fs/exec.c | (fd_offset < bprm->inode->i_sb->s_blocksize)) { |
inode | 877 | fs/exec.c | read_exec(bprm->inode, fd_offset, (char *) N_TXTADDR(ex), |
inode | 883 | fs/exec.c | read_exec(bprm->inode, 32, (char *) 0, ex.a_text+ex.a_data, 0); |
inode | 889 | fs/exec.c | fd = open_inode(bprm->inode, O_RDONLY); |
inode | 899 | fs/exec.c | read_exec(bprm->inode, fd_offset, |
inode | 962 | fs/exec.c | struct inode * inode; |
inode | 969 | fs/exec.c | inode = file->f_inode; |
inode | 976 | fs/exec.c | if ((error = file->f_op->lseek(inode, file, 0, 0)) != 0) |
inode | 982 | fs/exec.c | error = file->f_op->read(inode, file, (char *) &ex, sizeof(ex)); |
inode | 990 | fs/exec.c | inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { |
inode | 994 | fs/exec.c | (N_TXTOFF(ex) < inode->i_sb->s_blocksize)) { |
inode | 23 | fs/ext/dir.c | static int ext_dir_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 28 | fs/ext/dir.c | static int ext_readdir(struct inode *, struct file *, void *, filldir_t); |
inode | 64 | fs/ext/dir.c | static int ext_readdir(struct inode * inode, struct file * filp, |
inode | 73 | fs/ext/dir.c | if (!inode || !S_ISDIR(inode->i_mode)) |
inode | 78 | fs/ext/dir.c | while (!error && filp->f_pos < inode->i_size) { |
inode | 80 | fs/ext/dir.c | bh = ext_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
inode | 93 | fs/ext/dir.c | while (offset < 1024 && filp->f_pos < inode->i_size) { |
inode | 100 | fs/ext/dir.c | kdevname(inode->i_dev), inode->i_ino, |
inode | 103 | fs/ext/dir.c | if (filp->f_pos > inode->i_size) |
inode | 104 | fs/ext/dir.c | filp->f_pos = inode->i_size; |
inode | 107 | fs/ext/dir.c | if (de->inode) { |
inode | 108 | fs/ext/dir.c | error = filldir(dirent, de->name, de->name_len, filp->f_pos, de->inode); |
inode | 34 | fs/ext/file.c | static int ext_file_read(struct inode *, struct file *, char *, int); |
inode | 35 | fs/ext/file.c | static int ext_file_write(struct inode *, struct file *, const char *, int); |
inode | 72 | fs/ext/file.c | static int ext_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 82 | fs/ext/file.c | if (!inode) { |
inode | 86 | fs/ext/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 87 | fs/ext/file.c | printk("ext_file_read: mode = %07o\n",inode->i_mode); |
inode | 91 | fs/ext/file.c | size = inode->i_size; |
inode | 107 | fs/ext/file.c | if(blocks < read_ahead[MAJOR(inode->i_dev)] / (BLOCK_SIZE >> 9)) |
inode | 108 | fs/ext/file.c | blocks = read_ahead[MAJOR(inode->i_dev)] / (BLOCK_SIZE >> 9); |
inode | 128 | fs/ext/file.c | *bhb = ext_getblk(inode, block++, 0); |
inode | 190 | fs/ext/file.c | if (!IS_RDONLY(inode)) { |
inode | 191 | fs/ext/file.c | inode->i_atime = CURRENT_TIME; |
inode | 192 | fs/ext/file.c | inode->i_dirt = 1; |
inode | 197 | fs/ext/file.c | static int ext_file_write(struct inode * inode, struct file * filp, const char * buf, int count) |
inode | 204 | fs/ext/file.c | if (!inode) { |
inode | 208 | fs/ext/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 209 | fs/ext/file.c | printk("ext_file_write: mode = %07o\n",inode->i_mode); |
inode | 217 | fs/ext/file.c | pos = inode->i_size; |
inode | 222 | fs/ext/file.c | bh = ext_getblk(inode,pos/BLOCK_SIZE,1); |
inode | 243 | fs/ext/file.c | if (pos > inode->i_size) { |
inode | 244 | fs/ext/file.c | inode->i_size = pos; |
inode | 245 | fs/ext/file.c | inode->i_dirt = 1; |
inode | 254 | fs/ext/file.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 256 | fs/ext/file.c | inode->i_dirt = 1; |
inode | 175 | fs/ext/freelists.c | void ext_free_inode(struct inode * inode) |
inode | 184 | fs/ext/freelists.c | if (!inode) |
inode | 186 | fs/ext/freelists.c | if (!inode->i_dev) { |
inode | 190 | fs/ext/freelists.c | if (inode->i_count != 1) { |
inode | 191 | fs/ext/freelists.c | printk("free_inode: inode has count=%d\n",inode->i_count); |
inode | 194 | fs/ext/freelists.c | if (inode->i_nlink) { |
inode | 195 | fs/ext/freelists.c | printk("free_inode: inode has nlink=%d\n",inode->i_nlink); |
inode | 198 | fs/ext/freelists.c | if (!inode->i_sb) { |
inode | 202 | fs/ext/freelists.c | sb = inode->i_sb; |
inode | 203 | fs/ext/freelists.c | ino = inode->i_ino; |
inode | 204 | fs/ext/freelists.c | dev = inode->i_dev; |
inode | 205 | fs/ext/freelists.c | clear_inode(inode); |
inode | 239 | fs/ext/freelists.c | struct inode * ext_new_inode(const struct inode * dir) |
inode | 242 | fs/ext/freelists.c | struct inode * inode; |
inode | 247 | fs/ext/freelists.c | if (!dir || !(inode=get_empty_inode())) |
inode | 250 | fs/ext/freelists.c | inode->i_sb = sb; |
inode | 251 | fs/ext/freelists.c | inode->i_flags = sb->s_flags; |
inode | 282 | fs/ext/freelists.c | inode->i_count = 1; |
inode | 283 | fs/ext/freelists.c | inode->i_nlink = 1; |
inode | 284 | fs/ext/freelists.c | inode->i_dev = sb->s_dev; |
inode | 285 | fs/ext/freelists.c | inode->i_uid = current->fsuid; |
inode | 286 | fs/ext/freelists.c | inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; |
inode | 287 | fs/ext/freelists.c | inode->i_dirt = 1; |
inode | 288 | fs/ext/freelists.c | inode->i_ino = j; |
inode | 289 | fs/ext/freelists.c | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
inode | 290 | fs/ext/freelists.c | inode->i_op = NULL; |
inode | 291 | fs/ext/freelists.c | inode->i_blocks = inode->i_blksize = 0; |
inode | 292 | fs/ext/freelists.c | insert_inode_hash(inode); |
inode | 294 | fs/ext/freelists.c | printk("ext_new_inode : allocating inode %d\n", inode->i_ino); |
inode | 297 | fs/ext/freelists.c | return inode; |
inode | 30 | fs/ext/fsync.c | static int sync_block (struct inode * inode, unsigned long * block, int wait) |
inode | 38 | fs/ext/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
inode | 59 | fs/ext/fsync.c | static int sync_iblock (struct inode * inode, unsigned long * iblock, |
inode | 68 | fs/ext/fsync.c | rc = sync_block (inode, iblock, wait); |
inode | 71 | fs/ext/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
inode | 83 | fs/ext/fsync.c | static int sync_direct(struct inode *inode, int wait) |
inode | 89 | fs/ext/fsync.c | rc = sync_block (inode, inode->u.ext_i.i_data + i, wait); |
inode | 98 | fs/ext/fsync.c | static int sync_indirect(struct inode *inode, unsigned long *iblock, int wait) |
inode | 104 | fs/ext/fsync.c | rc = sync_iblock (inode, iblock, &ind_bh, wait); |
inode | 109 | fs/ext/fsync.c | rc = sync_block (inode, |
inode | 121 | fs/ext/fsync.c | static int sync_dindirect(struct inode *inode, unsigned long *diblock, |
inode | 128 | fs/ext/fsync.c | rc = sync_iblock (inode, diblock, &dind_bh, wait); |
inode | 133 | fs/ext/fsync.c | rc = sync_indirect (inode, |
inode | 145 | fs/ext/fsync.c | static int sync_tindirect(struct inode *inode, unsigned long *tiblock, |
inode | 152 | fs/ext/fsync.c | rc = sync_iblock (inode, tiblock, &tind_bh, wait); |
inode | 157 | fs/ext/fsync.c | rc = sync_dindirect (inode, |
inode | 169 | fs/ext/fsync.c | int ext_sync_file(struct inode * inode, struct file *file) |
inode | 173 | fs/ext/fsync.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 174 | fs/ext/fsync.c | S_ISLNK(inode->i_mode))) |
inode | 178 | fs/ext/fsync.c | err |= sync_direct(inode, wait); |
inode | 179 | fs/ext/fsync.c | err |= sync_indirect(inode, inode->u.ext_i.i_data+9, wait); |
inode | 180 | fs/ext/fsync.c | err |= sync_dindirect(inode, inode->u.ext_i.i_data+10, wait); |
inode | 181 | fs/ext/fsync.c | err |= sync_tindirect(inode, inode->u.ext_i.i_data+11, wait); |
inode | 183 | fs/ext/fsync.c | err |= ext_sync_inode (inode); |
inode | 26 | fs/ext/inode.c | void ext_put_inode(struct inode *inode) |
inode | 28 | fs/ext/inode.c | if (inode->i_nlink) |
inode | 30 | fs/ext/inode.c | inode->i_size = 0; |
inode | 31 | fs/ext/inode.c | ext_truncate(inode); |
inode | 32 | fs/ext/inode.c | ext_free_inode(inode); |
inode | 172 | fs/ext/inode.c | #define inode_bmap(inode,nr) ((inode)->u.ext_i.i_data[(nr)]) |
inode | 185 | fs/ext/inode.c | int ext_bmap(struct inode * inode,int block) |
inode | 198 | fs/ext/inode.c | return inode_bmap(inode,block); |
inode | 201 | fs/ext/inode.c | i = inode_bmap(inode,9); |
inode | 204 | fs/ext/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block); |
inode | 208 | fs/ext/inode.c | i = inode_bmap(inode,10); |
inode | 211 | fs/ext/inode.c | i = block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block>>8); |
inode | 214 | fs/ext/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block & 255); |
inode | 217 | fs/ext/inode.c | i = inode_bmap(inode,11); |
inode | 220 | fs/ext/inode.c | i = block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block>>16); |
inode | 223 | fs/ext/inode.c | i = block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),(block>>8) & 255); |
inode | 226 | fs/ext/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block & 255); |
inode | 229 | fs/ext/inode.c | static struct buffer_head * inode_getblk(struct inode * inode, int nr, int create) |
inode | 235 | fs/ext/inode.c | p = inode->u.ext_i.i_data + nr; |
inode | 239 | fs/ext/inode.c | result = getblk(inode->i_dev, tmp, BLOCK_SIZE); |
inode | 247 | fs/ext/inode.c | tmp = ext_new_block(inode->i_sb); |
inode | 250 | fs/ext/inode.c | result = getblk(inode->i_dev, tmp, BLOCK_SIZE); |
inode | 252 | fs/ext/inode.c | ext_free_block(inode->i_sb,tmp); |
inode | 257 | fs/ext/inode.c | inode->i_ctime = CURRENT_TIME; |
inode | 258 | fs/ext/inode.c | inode->i_dirt = 1; |
inode | 262 | fs/ext/inode.c | static struct buffer_head * block_getblk(struct inode * inode, |
inode | 295 | fs/ext/inode.c | tmp = ext_new_block(inode->i_sb); |
inode | 302 | fs/ext/inode.c | ext_free_block(inode->i_sb,tmp); |
inode | 312 | fs/ext/inode.c | struct buffer_head * ext_getblk(struct inode * inode, int block, int create) |
inode | 325 | fs/ext/inode.c | return inode_getblk(inode,block,create); |
inode | 328 | fs/ext/inode.c | bh = inode_getblk(inode,9,create); |
inode | 329 | fs/ext/inode.c | return block_getblk(inode,bh,block,create); |
inode | 333 | fs/ext/inode.c | bh = inode_getblk(inode,10,create); |
inode | 334 | fs/ext/inode.c | bh = block_getblk(inode,bh,block>>8,create); |
inode | 335 | fs/ext/inode.c | return block_getblk(inode,bh,block & 255,create); |
inode | 338 | fs/ext/inode.c | bh = inode_getblk(inode,11,create); |
inode | 339 | fs/ext/inode.c | bh = block_getblk(inode,bh,block>>16,create); |
inode | 340 | fs/ext/inode.c | bh = block_getblk(inode,bh,(block>>8) & 255,create); |
inode | 341 | fs/ext/inode.c | return block_getblk(inode,bh,block & 255,create); |
inode | 344 | fs/ext/inode.c | struct buffer_head * ext_bread(struct inode * inode, int block, int create) |
inode | 348 | fs/ext/inode.c | bh = ext_getblk(inode,block,create); |
inode | 359 | fs/ext/inode.c | void ext_read_inode(struct inode * inode) |
inode | 365 | fs/ext/inode.c | block = 2 + (inode->i_ino-1)/EXT_INODES_PER_BLOCK; |
inode | 366 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
inode | 369 | fs/ext/inode.c | (inode->i_ino-1)%EXT_INODES_PER_BLOCK; |
inode | 370 | fs/ext/inode.c | inode->i_mode = raw_inode->i_mode; |
inode | 371 | fs/ext/inode.c | inode->i_uid = raw_inode->i_uid; |
inode | 372 | fs/ext/inode.c | inode->i_gid = raw_inode->i_gid; |
inode | 373 | fs/ext/inode.c | inode->i_nlink = raw_inode->i_nlinks; |
inode | 374 | fs/ext/inode.c | inode->i_size = raw_inode->i_size; |
inode | 375 | fs/ext/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = raw_inode->i_time; |
inode | 376 | fs/ext/inode.c | inode->i_blocks = inode->i_blksize = 0; |
inode | 377 | fs/ext/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 378 | fs/ext/inode.c | inode->i_rdev = to_kdev_t(raw_inode->i_zone[0]); |
inode | 380 | fs/ext/inode.c | inode->u.ext_i.i_data[block] = raw_inode->i_zone[block]; |
inode | 382 | fs/ext/inode.c | inode->i_op = NULL; |
inode | 383 | fs/ext/inode.c | if (S_ISREG(inode->i_mode)) |
inode | 384 | fs/ext/inode.c | inode->i_op = &ext_file_inode_operations; |
inode | 385 | fs/ext/inode.c | else if (S_ISDIR(inode->i_mode)) |
inode | 386 | fs/ext/inode.c | inode->i_op = &ext_dir_inode_operations; |
inode | 387 | fs/ext/inode.c | else if (S_ISLNK(inode->i_mode)) |
inode | 388 | fs/ext/inode.c | inode->i_op = &ext_symlink_inode_operations; |
inode | 389 | fs/ext/inode.c | else if (S_ISCHR(inode->i_mode)) |
inode | 390 | fs/ext/inode.c | inode->i_op = &chrdev_inode_operations; |
inode | 391 | fs/ext/inode.c | else if (S_ISBLK(inode->i_mode)) |
inode | 392 | fs/ext/inode.c | inode->i_op = &blkdev_inode_operations; |
inode | 393 | fs/ext/inode.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 394 | fs/ext/inode.c | init_fifo(inode); |
inode | 397 | fs/ext/inode.c | static struct buffer_head * ext_update_inode(struct inode * inode) |
inode | 403 | fs/ext/inode.c | block = 2 + (inode->i_ino-1)/EXT_INODES_PER_BLOCK; |
inode | 404 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
inode | 407 | fs/ext/inode.c | (inode->i_ino-1)%EXT_INODES_PER_BLOCK; |
inode | 408 | fs/ext/inode.c | raw_inode->i_mode = inode->i_mode; |
inode | 409 | fs/ext/inode.c | raw_inode->i_uid = inode->i_uid; |
inode | 410 | fs/ext/inode.c | raw_inode->i_gid = inode->i_gid; |
inode | 411 | fs/ext/inode.c | raw_inode->i_nlinks = inode->i_nlink; |
inode | 412 | fs/ext/inode.c | raw_inode->i_size = inode->i_size; |
inode | 413 | fs/ext/inode.c | raw_inode->i_time = inode->i_mtime; |
inode | 414 | fs/ext/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 415 | fs/ext/inode.c | raw_inode->i_zone[0] = kdev_t_to_nr(inode->i_rdev); |
inode | 417 | fs/ext/inode.c | raw_inode->i_zone[block] = inode->u.ext_i.i_data[block]; |
inode | 419 | fs/ext/inode.c | inode->i_dirt=0; |
inode | 423 | fs/ext/inode.c | void ext_write_inode(struct inode * inode) |
inode | 426 | fs/ext/inode.c | bh = ext_update_inode (inode); |
inode | 430 | fs/ext/inode.c | int ext_sync_inode (struct inode *inode) |
inode | 435 | fs/ext/inode.c | bh = ext_update_inode(inode); |
inode | 444 | fs/ext/inode.c | kdevname(inode->i_dev), inode->i_ino); |
inode | 58 | fs/ext/namei.c | if (!de || !de->inode || len > EXT_NAME_LEN) |
inode | 79 | fs/ext/namei.c | static struct buffer_head * ext_find_entry(struct inode * dir, |
inode | 151 | fs/ext/namei.c | int ext_lookup(struct inode * dir,const char * name, int len, |
inode | 152 | fs/ext/namei.c | struct inode ** result) |
inode | 169 | fs/ext/namei.c | ino = de->inode; |
inode | 189 | fs/ext/namei.c | static struct buffer_head * ext_add_entry(struct inode * dir, |
inode | 236 | fs/ext/namei.c | de->inode = 0; |
inode | 259 | fs/ext/namei.c | de->inode=0; |
inode | 278 | fs/ext/namei.c | if (!de->inode && de->rec_len >= rec_len) { |
inode | 286 | 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); |
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); |
inode | 356 | fs/ext/namei.c | if (!inode) { |
inode | 360 | fs/ext/namei.c | inode->i_uid = current->fsuid; |
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 | 368 | fs/ext/namei.c | inode->i_mode |= S_ISGID; |
inode | 370 | fs/ext/namei.c | else if (S_ISLNK(inode->i_mode)) |
inode | 371 | fs/ext/namei.c | inode->i_op = &ext_symlink_inode_operations; |
inode | 372 | fs/ext/namei.c | else if (S_ISCHR(inode->i_mode)) |
inode | 373 | fs/ext/namei.c | inode->i_op = &chrdev_inode_operations; |
inode | 374 | fs/ext/namei.c | else if (S_ISBLK(inode->i_mode)) |
inode | 375 | fs/ext/namei.c | inode->i_op = &blkdev_inode_operations; |
inode | 376 | fs/ext/namei.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 377 | fs/ext/namei.c | init_fifo(inode); |
inode | 379 | fs/ext/namei.c | inode->i_rdev = to_kdev_t(rdev); |
inode | 381 | 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); |
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 | 424 | fs/ext/namei.c | inode->i_mtime = inode->i_atime = CURRENT_TIME; |
inode | 426 | fs/ext/namei.c | dir_block = ext_bread(inode,0,1); |
inode | 429 | fs/ext/namei.c | inode->i_nlink--; |
inode | 430 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 431 | fs/ext/namei.c | iput(inode); |
inode | 435 | fs/ext/namei.c | de->inode=inode->i_ino; |
inode | 440 | fs/ext/namei.c | de->inode = dir->i_ino; |
inode | 444 | fs/ext/namei.c | inode->i_nlink = 2; |
inode | 447 | fs/ext/namei.c | inode->i_mode = S_IFDIR | (mode & 0777 & ~current->fs->umask); |
inode | 449 | fs/ext/namei.c | inode->i_mode |= S_ISGID; |
inode | 450 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 454 | fs/ext/namei.c | inode->i_nlink=0; |
inode | 455 | fs/ext/namei.c | iput(inode); |
inode | 458 | fs/ext/namei.c | de->inode = inode->i_ino; |
inode | 463 | fs/ext/namei.c | iput(inode); |
inode | 471 | fs/ext/namei.c | static int empty_dir(struct inode * inode) |
inode | 477 | fs/ext/namei.c | if (inode->i_size < 2 * 12 || !(bh = ext_bread(inode,0,0))) { |
inode | 479 | fs/ext/namei.c | kdevname(inode->i_dev)); |
inode | 484 | fs/ext/namei.c | if (de->inode != inode->i_ino || !de1->inode || |
inode | 487 | fs/ext/namei.c | kdevname(inode->i_dev)); |
inode | 492 | fs/ext/namei.c | while (offset < inode->i_size ) { |
inode | 495 | fs/ext/namei.c | bh = ext_bread(inode, offset >> BLOCK_SIZE_BITS,1); |
inode | 507 | fs/ext/namei.c | kdevname(inode->i_dev), inode->i_ino, |
inode | 512 | fs/ext/namei.c | if (de->inode) { |
inode | 526 | fs/ext/namei.c | if (nde && !nde->inode) |
inode | 528 | fs/ext/namei.c | if (pde && !pde->inode) |
inode | 532 | fs/ext/namei.c | int ext_rmdir(struct inode * dir, const char * name, int len) |
inode | 535 | fs/ext/namei.c | struct inode * inode; |
inode | 539 | fs/ext/namei.c | inode = NULL; |
inode | 545 | fs/ext/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
inode | 548 | fs/ext/namei.c | current->fsuid != inode->i_uid && |
inode | 551 | fs/ext/namei.c | if (inode->i_dev != dir->i_dev) |
inode | 553 | fs/ext/namei.c | if (inode == dir) /* we may not delete ".", but "../dir" is ok */ |
inode | 555 | fs/ext/namei.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 559 | fs/ext/namei.c | if (!empty_dir(inode)) { |
inode | 563 | fs/ext/namei.c | if (inode->i_count > 1) { |
inode | 567 | fs/ext/namei.c | if (inode->i_nlink != 2) |
inode | 568 | fs/ext/namei.c | printk("empty directory has nlink!=2 (%d)\n",inode->i_nlink); |
inode | 569 | fs/ext/namei.c | de->inode = 0; |
inode | 573 | fs/ext/namei.c | inode->i_nlink=0; |
inode | 574 | fs/ext/namei.c | inode->i_dirt=1; |
inode | 576 | fs/ext/namei.c | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
inode | 581 | fs/ext/namei.c | iput(inode); |
inode | 586 | fs/ext/namei.c | int ext_unlink(struct inode * dir, const char * name, int len) |
inode | 589 | fs/ext/namei.c | struct inode * inode; |
inode | 594 | fs/ext/namei.c | inode = NULL; |
inode | 598 | fs/ext/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
inode | 602 | fs/ext/namei.c | current->fsuid != inode->i_uid && |
inode | 605 | fs/ext/namei.c | if (S_ISDIR(inode->i_mode)) |
inode | 607 | fs/ext/namei.c | if (!inode->i_nlink) { |
inode | 609 | fs/ext/namei.c | kdevname(inode->i_dev), inode->i_ino, |
inode | 610 | fs/ext/namei.c | inode->i_nlink); |
inode | 611 | fs/ext/namei.c | inode->i_nlink=1; |
inode | 613 | fs/ext/namei.c | de->inode = 0; |
inode | 617 | fs/ext/namei.c | inode->i_nlink--; |
inode | 618 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 619 | fs/ext/namei.c | inode->i_ctime = CURRENT_TIME; |
inode | 620 | fs/ext/namei.c | dir->i_ctime = dir->i_mtime = inode->i_ctime; |
inode | 625 | fs/ext/namei.c | iput(inode); |
inode | 630 | fs/ext/namei.c | int ext_symlink(struct inode * dir, const char * name, int len, const char * symname) |
inode | 633 | fs/ext/namei.c | struct inode * inode = NULL; |
inode | 638 | fs/ext/namei.c | if (!(inode = ext_new_inode(dir))) { |
inode | 642 | fs/ext/namei.c | inode->i_mode = S_IFLNK | 0777; |
inode | 643 | fs/ext/namei.c | inode->i_op = &ext_symlink_inode_operations; |
inode | 644 | fs/ext/namei.c | name_block = ext_bread(inode,0,1); |
inode | 647 | fs/ext/namei.c | inode->i_nlink--; |
inode | 648 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 649 | fs/ext/namei.c | iput(inode); |
inode | 658 | fs/ext/namei.c | inode->i_size = i; |
inode | 659 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 662 | fs/ext/namei.c | inode->i_nlink--; |
inode | 663 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 664 | fs/ext/namei.c | iput(inode); |
inode | 671 | fs/ext/namei.c | inode->i_nlink--; |
inode | 672 | fs/ext/namei.c | inode->i_dirt = 1; |
inode | 673 | fs/ext/namei.c | iput(inode); |
inode | 677 | fs/ext/namei.c | de->inode = inode->i_ino; |
inode | 681 | fs/ext/namei.c | iput(inode); |
inode | 685 | fs/ext/namei.c | int ext_link(struct inode * oldinode, struct inode * dir, const char * name, int len) |
inode | 713 | fs/ext/namei.c | de->inode = oldinode->i_ino; |
inode | 724 | fs/ext/namei.c | static int subdir(struct inode * new_inode, struct inode * old_inode) |
inode | 750 | fs/ext/namei.c | ((struct ext_dir_entry *) buffer)->rec_len))->inode |
inode | 766 | fs/ext/namei.c | static int do_ext_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 767 | fs/ext/namei.c | struct inode * new_dir, const char * new_name, int new_len) |
inode | 769 | fs/ext/namei.c | struct inode * old_inode, * new_inode; |
inode | 790 | fs/ext/namei.c | old_inode = __iget(old_dir->i_sb, old_de->inode,0); /* don't cross mnt-points */ |
inode | 800 | fs/ext/namei.c | new_inode = __iget(new_dir->i_sb, new_de->inode,0); /* don't cross mnt-points */ |
inode | 841 | fs/ext/namei.c | if (new_inode && (new_de->inode != new_inode->i_ino)) |
inode | 843 | fs/ext/namei.c | if (new_de->inode && !new_inode) |
inode | 845 | fs/ext/namei.c | if (old_de->inode != old_inode->i_ino) |
inode | 848 | fs/ext/namei.c | old_de->inode = 0; |
inode | 850 | fs/ext/namei.c | new_de->inode = old_inode->i_ino; |
inode | 887 | fs/ext/namei.c | int ext_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 888 | 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 int ext_follow_link(struct inode *, struct inode *, int, int, struct inode **); |
inode | 47 | fs/ext/symlink.c | static int ext_follow_link(struct inode * dir, struct inode * inode, |
inode | 48 | fs/ext/symlink.c | int flag, int mode, struct inode ** res_inode) |
inode | 58 | fs/ext/symlink.c | if (!inode) { |
inode | 62 | fs/ext/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 64 | fs/ext/symlink.c | *res_inode = inode; |
inode | 69 | fs/ext/symlink.c | iput(inode); |
inode | 72 | fs/ext/symlink.c | if (!(bh = ext_bread(inode, 0, 0))) { |
inode | 73 | fs/ext/symlink.c | iput(inode); |
inode | 77 | fs/ext/symlink.c | iput(inode); |
inode | 85 | fs/ext/symlink.c | static int ext_readlink(struct inode * inode, char * buffer, int buflen) |
inode | 91 | fs/ext/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 92 | fs/ext/symlink.c | iput(inode); |
inode | 97 | fs/ext/symlink.c | bh = ext_bread(inode, 0, 0); |
inode | 98 | fs/ext/symlink.c | iput(inode); |
inode | 32 | fs/ext/truncate.c | static int trunc_direct(struct inode * inode) |
inode | 38 | fs/ext/truncate.c | #define DIRECT_BLOCK ((inode->i_size + 1023) >> 10) |
inode | 42 | fs/ext/truncate.c | p = inode->u.ext_i.i_data+i; |
inode | 45 | fs/ext/truncate.c | bh = getblk(inode->i_dev,tmp,BLOCK_SIZE); |
inode | 56 | fs/ext/truncate.c | inode->i_dirt = 1; |
inode | 58 | fs/ext/truncate.c | ext_free_block(inode->i_sb,tmp); |
inode | 63 | fs/ext/truncate.c | static int trunc_indirect(struct inode * inode, int offset, unsigned long * p) |
inode | 75 | fs/ext/truncate.c | ind_bh = bread(inode->i_dev, tmp, BLOCK_SIZE); |
inode | 94 | fs/ext/truncate.c | bh = getblk(inode->i_dev,tmp,BLOCK_SIZE); |
inode | 107 | fs/ext/truncate.c | ext_free_block(inode->i_sb,tmp); |
inode | 119 | fs/ext/truncate.c | inode->i_dirt = 1; |
inode | 120 | fs/ext/truncate.c | ext_free_block(inode->i_sb,tmp); |
inode | 126 | fs/ext/truncate.c | static int trunc_dindirect(struct inode * inode, int offset, unsigned long * p) |
inode | 137 | fs/ext/truncate.c | dind_bh = bread(inode->i_dev, tmp, BLOCK_SIZE); |
inode | 156 | fs/ext/truncate.c | retry |= trunc_indirect(inode,offset+(i<<8),dind); |
inode | 169 | fs/ext/truncate.c | inode->i_dirt = 1; |
inode | 170 | fs/ext/truncate.c | ext_free_block(inode->i_sb,tmp); |
inode | 176 | fs/ext/truncate.c | static int trunc_tindirect(struct inode * inode) |
inode | 184 | fs/ext/truncate.c | p = inode->u.ext_i.i_data+11; |
inode | 187 | fs/ext/truncate.c | tind_bh = bread(inode->i_dev, tmp, BLOCK_SIZE); |
inode | 203 | fs/ext/truncate.c | retry |= trunc_dindirect(inode,9+256+256*256+(i<<16),tind); |
inode | 216 | fs/ext/truncate.c | inode->i_dirt = 1; |
inode | 217 | fs/ext/truncate.c | ext_free_block(inode->i_sb,tmp); |
inode | 223 | fs/ext/truncate.c | void ext_truncate(struct inode * inode) |
inode | 227 | fs/ext/truncate.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 228 | fs/ext/truncate.c | S_ISLNK(inode->i_mode))) |
inode | 231 | fs/ext/truncate.c | retry = trunc_direct(inode); |
inode | 232 | fs/ext/truncate.c | retry |= trunc_indirect(inode,9,inode->u.ext_i.i_data+9); |
inode | 233 | fs/ext/truncate.c | retry |= trunc_dindirect(inode,9+256,inode->u.ext_i.i_data+10); |
inode | 234 | fs/ext/truncate.c | retry |= trunc_tindirect(inode); |
inode | 240 | fs/ext/truncate.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 241 | fs/ext/truncate.c | inode->i_dirt = 1; |
inode | 249 | fs/ext/truncate.c | void ext_release(struct inode * inode, struct file * filp) |
inode | 26 | fs/ext2/acl.c | int ext2_permission (struct inode * inode, int mask) |
inode | 28 | fs/ext2/acl.c | unsigned short mode = inode->i_mode; |
inode | 33 | fs/ext2/acl.c | if ((mask & S_IWOTH) && IS_IMMUTABLE(inode)) |
inode | 43 | fs/ext2/acl.c | else if (current->fsuid == inode->i_uid) |
inode | 45 | fs/ext2/acl.c | else if (in_group_p (inode->i_gid)) |
inode | 26 | fs/ext2/dir.c | static int ext2_dir_read (struct inode * inode, struct file * filp, |
inode | 32 | fs/ext2/dir.c | static int ext2_readdir (struct inode *, struct file *, void *, filldir_t); |
inode | 72 | fs/ext2/dir.c | int ext2_check_dir_entry (const char * function, struct inode * dir, |
inode | 87 | fs/ext2/dir.c | else if (dir && de->inode > dir->i_sb->u.ext2_sb.s_es->s_inodes_count) |
inode | 93 | fs/ext2/dir.c | dir->i_ino, error_msg, offset, (unsigned long) de->inode, |
inode | 98 | fs/ext2/dir.c | static int ext2_readdir (struct inode * inode, struct file * filp, |
inode | 109 | fs/ext2/dir.c | if (!inode || !S_ISDIR(inode->i_mode)) |
inode | 111 | fs/ext2/dir.c | sb = inode->i_sb; |
inode | 117 | fs/ext2/dir.c | while (!error && !stored && filp->f_pos < inode->i_size) { |
inode | 119 | fs/ext2/dir.c | bh = ext2_bread (inode, blk, 0, &err); |
inode | 123 | fs/ext2/dir.c | inode->i_ino, (unsigned long)filp->f_pos); |
inode | 134 | fs/ext2/dir.c | tmp = ext2_getblk (inode, ++blk, 0, &err); |
inode | 152 | fs/ext2/dir.c | if (filp->f_version != inode->i_version) { |
inode | 169 | fs/ext2/dir.c | filp->f_version = inode->i_version; |
inode | 172 | fs/ext2/dir.c | while (!error && filp->f_pos < inode->i_size |
inode | 175 | fs/ext2/dir.c | if (!ext2_check_dir_entry ("ext2_readdir", inode, de, |
inode | 185 | fs/ext2/dir.c | if (de->inode) { |
inode | 193 | fs/ext2/dir.c | dcache_add(inode, de->name, de->name_len, de->inode); |
inode | 194 | fs/ext2/dir.c | version = inode->i_version; |
inode | 195 | fs/ext2/dir.c | error = filldir(dirent, de->name, de->name_len, filp->f_pos, de->inode); |
inode | 198 | fs/ext2/dir.c | if (version != inode->i_version) |
inode | 207 | fs/ext2/dir.c | if (!IS_RDONLY(inode)) { |
inode | 208 | fs/ext2/dir.c | inode->i_atime = CURRENT_TIME; |
inode | 209 | fs/ext2/dir.c | inode->i_dirt = 1; |
inode | 37 | fs/ext2/file.c | static int ext2_file_read (struct inode *, struct file *, char *, int); |
inode | 38 | fs/ext2/file.c | static int ext2_file_write (struct inode *, struct file *, const char *, int); |
inode | 39 | fs/ext2/file.c | static void ext2_release_file (struct inode *, struct file *); |
inode | 80 | fs/ext2/file.c | static int ext2_file_read (struct inode * inode, struct file * filp, |
inode | 94 | fs/ext2/file.c | if (!inode) { |
inode | 98 | fs/ext2/file.c | sb = inode->i_sb; |
inode | 99 | fs/ext2/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 101 | fs/ext2/file.c | inode->i_mode); |
inode | 105 | fs/ext2/file.c | size = inode->i_size; |
inode | 122 | fs/ext2/file.c | if (blocks < read_ahead[MAJOR(inode->i_dev)] >> (EXT2_BLOCK_SIZE_BITS(sb) - 9)) |
inode | 123 | fs/ext2/file.c | blocks = read_ahead[MAJOR(inode->i_dev)] >> (EXT2_BLOCK_SIZE_BITS(sb) - 9); |
inode | 148 | fs/ext2/file.c | if(!clusterblocks) clusterblocks = ext2_getcluster(inode, block); |
inode | 152 | fs/ext2/file.c | *bhb = ext2_getblk (inode, block++, 0, &err); |
inode | 224 | fs/ext2/file.c | if (!IS_RDONLY(inode)) { |
inode | 225 | fs/ext2/file.c | inode->i_atime = CURRENT_TIME; |
inode | 226 | fs/ext2/file.c | inode->i_dirt = 1; |
inode | 231 | fs/ext2/file.c | static int ext2_file_write (struct inode * inode, struct file * filp, |
inode | 246 | fs/ext2/file.c | if (!inode) { |
inode | 250 | fs/ext2/file.c | sb = inode->i_sb; |
inode | 257 | fs/ext2/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 259 | fs/ext2/file.c | inode->i_mode); |
inode | 262 | fs/ext2/file.c | down(&inode->i_sem); |
inode | 264 | fs/ext2/file.c | pos = inode->i_size; |
inode | 275 | fs/ext2/file.c | inode->u.ext2_i.i_osync++; |
inode | 286 | fs/ext2/file.c | bh = ext2_getblk (inode, block, 1, &err); |
inode | 341 | fs/ext2/file.c | if (pos > inode->i_size) |
inode | 342 | fs/ext2/file.c | inode->i_size = pos; |
inode | 344 | fs/ext2/file.c | inode->u.ext2_i.i_osync--; |
inode | 345 | fs/ext2/file.c | up(&inode->i_sem); |
inode | 346 | fs/ext2/file.c | inode->i_ctime = inode->i_mtime = CURRENT_TIME; |
inode | 348 | fs/ext2/file.c | inode->i_dirt = 1; |
inode | 357 | fs/ext2/file.c | static void ext2_release_file (struct inode * inode, struct file * filp) |
inode | 360 | fs/ext2/file.c | ext2_discard_prealloc (inode); |
inode | 27 | fs/ext2/fsync.c | #define blocksize (EXT2_BLOCK_SIZE(inode->i_sb)) |
inode | 28 | fs/ext2/fsync.c | #define addr_per_block (EXT2_ADDR_PER_BLOCK(inode->i_sb)) |
inode | 30 | fs/ext2/fsync.c | static int sync_block (struct inode * inode, u32 * block, int wait) |
inode | 38 | fs/ext2/fsync.c | bh = get_hash_table (inode->i_dev, *block, blocksize); |
inode | 58 | fs/ext2/fsync.c | static int sync_iblock (struct inode * inode, u32 * iblock, |
inode | 67 | fs/ext2/fsync.c | rc = sync_block (inode, iblock, wait); |
inode | 70 | fs/ext2/fsync.c | *bh = bread (inode->i_dev, tmp, blocksize); |
inode | 82 | fs/ext2/fsync.c | static int sync_direct (struct inode * inode, int wait) |
inode | 88 | fs/ext2/fsync.c | rc = sync_block (inode, inode->u.ext2_i.i_data + i, wait); |
inode | 97 | fs/ext2/fsync.c | static int sync_indirect (struct inode * inode, u32 * iblock, int wait) |
inode | 103 | fs/ext2/fsync.c | rc = sync_iblock (inode, iblock, &ind_bh, wait); |
inode | 108 | fs/ext2/fsync.c | rc = sync_block (inode, |
inode | 120 | fs/ext2/fsync.c | static int sync_dindirect (struct inode * inode, u32 * diblock, int wait) |
inode | 126 | fs/ext2/fsync.c | rc = sync_iblock (inode, diblock, &dind_bh, wait); |
inode | 131 | fs/ext2/fsync.c | rc = sync_indirect (inode, |
inode | 143 | fs/ext2/fsync.c | static int sync_tindirect (struct inode * inode, u32 * tiblock, int wait) |
inode | 149 | fs/ext2/fsync.c | rc = sync_iblock (inode, tiblock, &tind_bh, wait); |
inode | 154 | fs/ext2/fsync.c | rc = sync_dindirect (inode, |
inode | 166 | fs/ext2/fsync.c | int ext2_sync_file (struct inode * inode, struct file * file) |
inode | 170 | fs/ext2/fsync.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 171 | fs/ext2/fsync.c | S_ISLNK(inode->i_mode))) |
inode | 173 | fs/ext2/fsync.c | if (S_ISLNK(inode->i_mode) && !(inode->i_blocks)) |
inode | 181 | fs/ext2/fsync.c | err |= sync_direct (inode, wait); |
inode | 182 | fs/ext2/fsync.c | err |= sync_indirect (inode, |
inode | 183 | fs/ext2/fsync.c | inode->u.ext2_i.i_data+EXT2_IND_BLOCK, |
inode | 185 | fs/ext2/fsync.c | err |= sync_dindirect (inode, |
inode | 186 | fs/ext2/fsync.c | inode->u.ext2_i.i_data+EXT2_DIND_BLOCK, |
inode | 188 | fs/ext2/fsync.c | err |= sync_tindirect (inode, |
inode | 189 | fs/ext2/fsync.c | inode->u.ext2_i.i_data+EXT2_TIND_BLOCK, |
inode | 193 | fs/ext2/fsync.c | err |= ext2_sync_inode (inode); |
inode | 159 | fs/ext2/ialloc.c | static void set_inode_dtime (struct inode * inode, |
inode | 166 | fs/ext2/ialloc.c | inode_block = gdp->bg_inode_table + (((inode->i_ino - 1) % |
inode | 167 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(inode->i_sb)) / |
inode | 168 | fs/ext2/ialloc.c | EXT2_INODES_PER_BLOCK(inode->i_sb)); |
inode | 169 | fs/ext2/ialloc.c | bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize); |
inode | 171 | fs/ext2/ialloc.c | ext2_panic (inode->i_sb, "set_inode_dtime", |
inode | 174 | fs/ext2/ialloc.c | inode->i_ino, inode_block); |
inode | 176 | fs/ext2/ialloc.c | (((inode->i_ino - 1) % |
inode | 177 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(inode->i_sb)) % |
inode | 178 | fs/ext2/ialloc.c | EXT2_INODES_PER_BLOCK(inode->i_sb)); |
inode | 182 | fs/ext2/ialloc.c | if (IS_SYNC(inode)) { |
inode | 189 | fs/ext2/ialloc.c | void ext2_free_inode (struct inode * inode) |
inode | 200 | fs/ext2/ialloc.c | if (!inode) |
inode | 202 | fs/ext2/ialloc.c | if (!inode->i_dev) { |
inode | 206 | fs/ext2/ialloc.c | if (inode->i_count > 1) { |
inode | 208 | fs/ext2/ialloc.c | inode->i_count); |
inode | 211 | fs/ext2/ialloc.c | if (inode->i_nlink) { |
inode | 213 | fs/ext2/ialloc.c | inode->i_nlink); |
inode | 216 | fs/ext2/ialloc.c | if (!inode->i_sb) { |
inode | 221 | fs/ext2/ialloc.c | ext2_debug ("freeing inode %lu\n", inode->i_ino); |
inode | 223 | fs/ext2/ialloc.c | sb = inode->i_sb; |
inode | 225 | fs/ext2/ialloc.c | if (inode->i_ino < EXT2_FIRST_INO || |
inode | 226 | fs/ext2/ialloc.c | inode->i_ino > sb->u.ext2_sb.s_es->s_inodes_count) { |
inode | 233 | fs/ext2/ialloc.c | block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(sb); |
inode | 234 | fs/ext2/ialloc.c | bit = (inode->i_ino - 1) % EXT2_INODES_PER_GROUP(sb); |
inode | 239 | fs/ext2/ialloc.c | "bit already cleared for inode %lu", inode->i_ino); |
inode | 243 | fs/ext2/ialloc.c | if (S_ISDIR(inode->i_mode)) |
inode | 248 | fs/ext2/ialloc.c | set_inode_dtime (inode, gdp); |
inode | 257 | fs/ext2/ialloc.c | clear_inode (inode); |
inode | 266 | fs/ext2/ialloc.c | static void inc_inode_version (struct inode * inode, |
inode | 274 | fs/ext2/ialloc.c | inode_block = gdp->bg_inode_table + (((inode->i_ino - 1) % |
inode | 275 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(inode->i_sb)) / |
inode | 276 | fs/ext2/ialloc.c | EXT2_INODES_PER_BLOCK(inode->i_sb)); |
inode | 277 | fs/ext2/ialloc.c | bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize); |
inode | 279 | fs/ext2/ialloc.c | ext2_error (inode->i_sb, "inc_inode_version", |
inode | 282 | fs/ext2/ialloc.c | inode->i_ino, inode_block); |
inode | 283 | fs/ext2/ialloc.c | inode->u.ext2_i.i_version = 1; |
inode | 287 | fs/ext2/ialloc.c | (((inode->i_ino - 1) % |
inode | 288 | fs/ext2/ialloc.c | EXT2_INODES_PER_GROUP(inode->i_sb)) % |
inode | 289 | fs/ext2/ialloc.c | EXT2_INODES_PER_BLOCK(inode->i_sb)); |
inode | 291 | fs/ext2/ialloc.c | inode->u.ext2_i.i_version = raw_inode->i_version; |
inode | 306 | fs/ext2/ialloc.c | struct inode * ext2_new_inode (const struct inode * dir, int mode) |
inode | 312 | fs/ext2/ialloc.c | struct inode * inode; |
inode | 318 | fs/ext2/ialloc.c | if (!dir || !(inode = get_empty_inode ())) |
inode | 321 | fs/ext2/ialloc.c | inode->i_sb = sb; |
inode | 322 | fs/ext2/ialloc.c | inode->i_flags = sb->s_flags; |
inode | 404 | fs/ext2/ialloc.c | iput(inode); |
inode | 428 | fs/ext2/ialloc.c | iput (inode); |
inode | 439 | fs/ext2/ialloc.c | iput (inode); |
inode | 449 | fs/ext2/ialloc.c | inode->i_mode = mode; |
inode | 450 | fs/ext2/ialloc.c | inode->i_sb = sb; |
inode | 451 | fs/ext2/ialloc.c | inode->i_count = 1; |
inode | 452 | fs/ext2/ialloc.c | inode->i_nlink = 1; |
inode | 453 | fs/ext2/ialloc.c | inode->i_dev = sb->s_dev; |
inode | 454 | fs/ext2/ialloc.c | inode->i_uid = current->fsuid; |
inode | 456 | fs/ext2/ialloc.c | inode->i_gid = dir->i_gid; |
inode | 458 | fs/ext2/ialloc.c | inode->i_gid = dir->i_gid; |
inode | 462 | fs/ext2/ialloc.c | inode->i_gid = current->fsgid; |
inode | 463 | fs/ext2/ialloc.c | inode->i_dirt = 1; |
inode | 464 | fs/ext2/ialloc.c | inode->i_ino = j; |
inode | 465 | fs/ext2/ialloc.c | inode->i_blksize = sb->s_blocksize; |
inode | 466 | fs/ext2/ialloc.c | inode->i_blocks = 0; |
inode | 467 | fs/ext2/ialloc.c | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
inode | 468 | fs/ext2/ialloc.c | inode->u.ext2_i.i_flags = dir->u.ext2_i.i_flags; |
inode | 470 | fs/ext2/ialloc.c | inode->u.ext2_i.i_flags &= ~(EXT2_IMMUTABLE_FL | EXT2_APPEND_FL); |
inode | 471 | fs/ext2/ialloc.c | inode->u.ext2_i.i_faddr = 0; |
inode | 472 | fs/ext2/ialloc.c | inode->u.ext2_i.i_frag_no = 0; |
inode | 473 | fs/ext2/ialloc.c | inode->u.ext2_i.i_frag_size = 0; |
inode | 474 | fs/ext2/ialloc.c | inode->u.ext2_i.i_file_acl = 0; |
inode | 475 | fs/ext2/ialloc.c | inode->u.ext2_i.i_dir_acl = 0; |
inode | 476 | fs/ext2/ialloc.c | inode->u.ext2_i.i_dtime = 0; |
inode | 477 | fs/ext2/ialloc.c | inode->u.ext2_i.i_block_group = i; |
inode | 478 | fs/ext2/ialloc.c | inode->i_op = NULL; |
inode | 479 | fs/ext2/ialloc.c | if (inode->u.ext2_i.i_flags & EXT2_SYNC_FL) |
inode | 480 | fs/ext2/ialloc.c | inode->i_flags |= MS_SYNCHRONOUS; |
inode | 481 | fs/ext2/ialloc.c | insert_inode_hash(inode); |
inode | 482 | fs/ext2/ialloc.c | inc_inode_version (inode, gdp, mode); |
inode | 484 | fs/ext2/ialloc.c | ext2_debug ("allocating inode %lu\n", inode->i_ino); |
inode | 487 | fs/ext2/ialloc.c | return inode; |
inode | 30 | fs/ext2/inode.c | void ext2_put_inode (struct inode * inode) |
inode | 32 | fs/ext2/inode.c | ext2_discard_prealloc (inode); |
inode | 33 | fs/ext2/inode.c | if (inode->i_nlink || inode->i_ino == EXT2_ACL_IDX_INO || |
inode | 34 | fs/ext2/inode.c | inode->i_ino == EXT2_ACL_DATA_INO) |
inode | 36 | fs/ext2/inode.c | inode->i_size = 0; |
inode | 37 | fs/ext2/inode.c | if (inode->i_blocks) |
inode | 38 | fs/ext2/inode.c | ext2_truncate (inode); |
inode | 39 | fs/ext2/inode.c | ext2_free_inode (inode); |
inode | 42 | fs/ext2/inode.c | #define inode_bmap(inode, nr) ((inode)->u.ext2_i.i_data[(nr)]) |
inode | 62 | fs/ext2/inode.c | void ext2_discard_prealloc (struct inode * inode) |
inode | 65 | fs/ext2/inode.c | if (inode->u.ext2_i.i_prealloc_count) { |
inode | 66 | fs/ext2/inode.c | int i = inode->u.ext2_i.i_prealloc_count; |
inode | 67 | fs/ext2/inode.c | inode->u.ext2_i.i_prealloc_count = 0; |
inode | 68 | fs/ext2/inode.c | ext2_free_blocks (inode->i_sb, |
inode | 69 | fs/ext2/inode.c | inode->u.ext2_i.i_prealloc_block, |
inode | 75 | fs/ext2/inode.c | static int ext2_alloc_block (struct inode * inode, unsigned long goal) |
inode | 83 | fs/ext2/inode.c | wait_on_super (inode->i_sb); |
inode | 86 | fs/ext2/inode.c | if (inode->u.ext2_i.i_prealloc_count && |
inode | 87 | fs/ext2/inode.c | (goal == inode->u.ext2_i.i_prealloc_block || |
inode | 88 | fs/ext2/inode.c | goal + 1 == inode->u.ext2_i.i_prealloc_block)) |
inode | 90 | fs/ext2/inode.c | result = inode->u.ext2_i.i_prealloc_block++; |
inode | 91 | fs/ext2/inode.c | inode->u.ext2_i.i_prealloc_count--; |
inode | 98 | fs/ext2/inode.c | if (!(bh = getblk (inode->i_sb->s_dev, result, |
inode | 99 | fs/ext2/inode.c | inode->i_sb->s_blocksize))) { |
inode | 100 | fs/ext2/inode.c | ext2_error (inode->i_sb, "ext2_alloc_block", |
inode | 104 | fs/ext2/inode.c | memset(bh->b_data, 0, inode->i_sb->s_blocksize); |
inode | 109 | fs/ext2/inode.c | ext2_discard_prealloc (inode); |
inode | 112 | fs/ext2/inode.c | if (S_ISREG(inode->i_mode)) |
inode | 114 | fs/ext2/inode.c | (inode->i_sb, goal, |
inode | 115 | fs/ext2/inode.c | &inode->u.ext2_i.i_prealloc_count, |
inode | 116 | fs/ext2/inode.c | &inode->u.ext2_i.i_prealloc_block); |
inode | 118 | fs/ext2/inode.c | result = ext2_new_block (inode->i_sb, goal, 0, 0); |
inode | 121 | fs/ext2/inode.c | result = ext2_new_block (inode->i_sb, goal, 0, 0); |
inode | 128 | fs/ext2/inode.c | int ext2_bmap (struct inode * inode, int block) |
inode | 131 | fs/ext2/inode.c | int addr_per_block = EXT2_ADDR_PER_BLOCK(inode->i_sb); |
inode | 132 | fs/ext2/inode.c | int addr_per_block_bits = EXT2_ADDR_PER_BLOCK_BITS(inode->i_sb); |
inode | 135 | fs/ext2/inode.c | ext2_warning (inode->i_sb, "ext2_bmap", "block < 0"); |
inode | 141 | fs/ext2/inode.c | ext2_warning (inode->i_sb, "ext2_bmap", "block > big"); |
inode | 145 | fs/ext2/inode.c | return inode_bmap (inode, block); |
inode | 148 | fs/ext2/inode.c | i = inode_bmap (inode, EXT2_IND_BLOCK); |
inode | 151 | fs/ext2/inode.c | return block_bmap (bread (inode->i_dev, i, |
inode | 152 | fs/ext2/inode.c | inode->i_sb->s_blocksize), block); |
inode | 156 | fs/ext2/inode.c | i = inode_bmap (inode, EXT2_DIND_BLOCK); |
inode | 159 | fs/ext2/inode.c | i = block_bmap (bread (inode->i_dev, i, |
inode | 160 | fs/ext2/inode.c | inode->i_sb->s_blocksize), |
inode | 164 | fs/ext2/inode.c | return block_bmap (bread (inode->i_dev, i, |
inode | 165 | fs/ext2/inode.c | inode->i_sb->s_blocksize), |
inode | 169 | fs/ext2/inode.c | i = inode_bmap (inode, EXT2_TIND_BLOCK); |
inode | 172 | fs/ext2/inode.c | i = block_bmap (bread (inode->i_dev, i, inode->i_sb->s_blocksize), |
inode | 176 | fs/ext2/inode.c | i = block_bmap (bread (inode->i_dev, i, inode->i_sb->s_blocksize), |
inode | 180 | fs/ext2/inode.c | return block_bmap (bread (inode->i_dev, i, inode->i_sb->s_blocksize), |
inode | 184 | fs/ext2/inode.c | static struct buffer_head * inode_getblk (struct inode * inode, int nr, |
inode | 190 | fs/ext2/inode.c | int blocks = inode->i_sb->s_blocksize / 512; |
inode | 192 | fs/ext2/inode.c | p = inode->u.ext2_i.i_data + nr; |
inode | 196 | fs/ext2/inode.c | result = getblk (inode->i_dev, tmp, inode->i_sb->s_blocksize); |
inode | 204 | fs/ext2/inode.c | EXT2_BLOCK_SIZE_BITS(inode->i_sb))) { |
inode | 208 | fs/ext2/inode.c | if (inode->u.ext2_i.i_next_alloc_block == new_block) |
inode | 209 | fs/ext2/inode.c | goal = inode->u.ext2_i.i_next_alloc_goal; |
inode | 215 | fs/ext2/inode.c | if (inode->u.ext2_i.i_data[tmp]) { |
inode | 216 | fs/ext2/inode.c | goal = inode->u.ext2_i.i_data[tmp]; |
inode | 221 | fs/ext2/inode.c | goal = (inode->u.ext2_i.i_block_group * |
inode | 222 | fs/ext2/inode.c | EXT2_BLOCKS_PER_GROUP(inode->i_sb)) + |
inode | 223 | fs/ext2/inode.c | inode->i_sb->u.ext2_sb.s_es->s_first_data_block; |
inode | 228 | fs/ext2/inode.c | tmp = ext2_alloc_block (inode, goal); |
inode | 231 | fs/ext2/inode.c | result = getblk (inode->i_dev, tmp, inode->i_sb->s_blocksize); |
inode | 233 | fs/ext2/inode.c | ext2_free_blocks (inode->i_sb, tmp, 1); |
inode | 238 | fs/ext2/inode.c | inode->u.ext2_i.i_next_alloc_block = new_block; |
inode | 239 | fs/ext2/inode.c | inode->u.ext2_i.i_next_alloc_goal = tmp; |
inode | 240 | fs/ext2/inode.c | inode->i_ctime = CURRENT_TIME; |
inode | 241 | fs/ext2/inode.c | inode->i_blocks += blocks; |
inode | 242 | fs/ext2/inode.c | if (IS_SYNC(inode) || inode->u.ext2_i.i_osync) |
inode | 243 | fs/ext2/inode.c | ext2_sync_inode (inode); |
inode | 245 | fs/ext2/inode.c | inode->i_dirt = 1; |
inode | 249 | fs/ext2/inode.c | static struct buffer_head * block_getblk (struct inode * inode, |
inode | 257 | fs/ext2/inode.c | int blocks = inode->i_sb->s_blocksize / 512; |
inode | 283 | fs/ext2/inode.c | EXT2_BLOCK_SIZE_BITS(inode->i_sb))) { |
inode | 288 | fs/ext2/inode.c | if (inode->u.ext2_i.i_next_alloc_block == new_block) |
inode | 289 | fs/ext2/inode.c | goal = inode->u.ext2_i.i_next_alloc_goal; |
inode | 300 | fs/ext2/inode.c | tmp = ext2_alloc_block (inode, goal); |
inode | 307 | fs/ext2/inode.c | ext2_free_blocks (inode->i_sb, tmp, 1); |
inode | 313 | fs/ext2/inode.c | if (IS_SYNC(inode) || inode->u.ext2_i.i_osync) { |
inode | 317 | fs/ext2/inode.c | inode->i_ctime = CURRENT_TIME; |
inode | 318 | fs/ext2/inode.c | inode->i_blocks += blocks; |
inode | 319 | fs/ext2/inode.c | inode->i_dirt = 1; |
inode | 320 | fs/ext2/inode.c | inode->u.ext2_i.i_next_alloc_block = new_block; |
inode | 321 | fs/ext2/inode.c | inode->u.ext2_i.i_next_alloc_goal = tmp; |
inode | 326 | fs/ext2/inode.c | static int block_getcluster (struct inode * inode, struct buffer_head * bh, |
inode | 339 | fs/ext2/inode.c | if((nr & ((PAGE_SIZE >> EXT2_BLOCK_SIZE_BITS(inode->i_sb)) - 1)) != 0) |
inode | 341 | fs/ext2/inode.c | if(nr + 3 > EXT2_ADDR_PER_BLOCK(inode->i_sb)) goto out; |
inode | 343 | fs/ext2/inode.c | for(i=0; i< (PAGE_SIZE >> EXT2_BLOCK_SIZE_BITS(inode->i_sb)); i++) { |
inode | 362 | fs/ext2/inode.c | struct buffer_head * ext2_getblk (struct inode * inode, long block, |
inode | 367 | fs/ext2/inode.c | unsigned long addr_per_block = EXT2_ADDR_PER_BLOCK(inode->i_sb); |
inode | 368 | fs/ext2/inode.c | int addr_per_block_bits = EXT2_ADDR_PER_BLOCK_BITS(inode->i_sb); |
inode | 372 | fs/ext2/inode.c | ext2_warning (inode->i_sb, "ext2_getblk", "block < 0"); |
inode | 378 | fs/ext2/inode.c | ext2_warning (inode->i_sb, "ext2_getblk", "block > big"); |
inode | 388 | fs/ext2/inode.c | inode->u.ext2_i.i_next_alloc_block, |
inode | 389 | fs/ext2/inode.c | inode->u.ext2_i.i_next_alloc_goal); |
inode | 391 | fs/ext2/inode.c | if (block == inode->u.ext2_i.i_next_alloc_block + 1) { |
inode | 392 | fs/ext2/inode.c | inode->u.ext2_i.i_next_alloc_block++; |
inode | 393 | fs/ext2/inode.c | inode->u.ext2_i.i_next_alloc_goal++; |
inode | 399 | fs/ext2/inode.c | return inode_getblk (inode, block, create, b, err); |
inode | 402 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_IND_BLOCK, create, b, err); |
inode | 403 | fs/ext2/inode.c | return block_getblk (inode, bh, block, create, |
inode | 404 | fs/ext2/inode.c | inode->i_sb->s_blocksize, b, err); |
inode | 408 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_DIND_BLOCK, create, b, err); |
inode | 409 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block >> addr_per_block_bits, |
inode | 410 | fs/ext2/inode.c | create, inode->i_sb->s_blocksize, b, err); |
inode | 411 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), |
inode | 412 | fs/ext2/inode.c | create, inode->i_sb->s_blocksize, b, err); |
inode | 415 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_TIND_BLOCK, create, b, err); |
inode | 416 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block >> (addr_per_block_bits * 2), |
inode | 417 | fs/ext2/inode.c | create, inode->i_sb->s_blocksize, b, err); |
inode | 418 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block >> addr_per_block_bits) & (addr_per_block - 1), |
inode | 419 | fs/ext2/inode.c | create, inode->i_sb->s_blocksize, b, err); |
inode | 420 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), create, |
inode | 421 | fs/ext2/inode.c | inode->i_sb->s_blocksize, b, err); |
inode | 424 | fs/ext2/inode.c | int ext2_getcluster (struct inode * inode, long block) |
inode | 429 | fs/ext2/inode.c | unsigned long addr_per_block = EXT2_ADDR_PER_BLOCK(inode->i_sb); |
inode | 430 | fs/ext2/inode.c | int addr_per_block_bits = EXT2_ADDR_PER_BLOCK_BITS(inode->i_sb); |
inode | 435 | fs/ext2/inode.c | ext2_warning (inode->i_sb, "ext2_getblk", "block < 0"); |
inode | 441 | fs/ext2/inode.c | ext2_warning (inode->i_sb, "ext2_getblk", "block > big"); |
inode | 452 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_IND_BLOCK, create, b, &err); |
inode | 453 | fs/ext2/inode.c | return block_getcluster (inode, bh, block, |
inode | 454 | fs/ext2/inode.c | inode->i_sb->s_blocksize); |
inode | 458 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_DIND_BLOCK, create, b, &err); |
inode | 459 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block >> addr_per_block_bits, |
inode | 460 | fs/ext2/inode.c | create, inode->i_sb->s_blocksize, b, &err); |
inode | 461 | fs/ext2/inode.c | return block_getcluster (inode, bh, block & (addr_per_block - 1), |
inode | 462 | fs/ext2/inode.c | inode->i_sb->s_blocksize); |
inode | 465 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_TIND_BLOCK, create, b, &err); |
inode | 466 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block >> (addr_per_block_bits * 2), |
inode | 467 | fs/ext2/inode.c | create, inode->i_sb->s_blocksize, b, &err); |
inode | 468 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block >> addr_per_block_bits) & (addr_per_block - 1), |
inode | 469 | fs/ext2/inode.c | create, inode->i_sb->s_blocksize, b, &err); |
inode | 470 | fs/ext2/inode.c | return block_getcluster (inode, bh, block & (addr_per_block - 1), |
inode | 471 | fs/ext2/inode.c | inode->i_sb->s_blocksize); |
inode | 474 | fs/ext2/inode.c | struct buffer_head * ext2_bread (struct inode * inode, int block, |
inode | 479 | fs/ext2/inode.c | bh = ext2_getblk (inode, block, create, err); |
inode | 491 | fs/ext2/inode.c | void ext2_read_inode (struct inode * inode) |
inode | 501 | fs/ext2/inode.c | if ((inode->i_ino != EXT2_ROOT_INO && inode->i_ino != EXT2_ACL_IDX_INO && |
inode | 502 | fs/ext2/inode.c | inode->i_ino != EXT2_ACL_DATA_INO && inode->i_ino < EXT2_FIRST_INO) || |
inode | 503 | fs/ext2/inode.c | inode->i_ino > inode->i_sb->u.ext2_sb.s_es->s_inodes_count) { |
inode | 504 | fs/ext2/inode.c | ext2_error (inode->i_sb, "ext2_read_inode", |
inode | 505 | fs/ext2/inode.c | "bad inode number: %lu", inode->i_ino); |
inode | 508 | fs/ext2/inode.c | block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb); |
inode | 509 | fs/ext2/inode.c | if (block_group >= inode->i_sb->u.ext2_sb.s_groups_count) |
inode | 510 | fs/ext2/inode.c | ext2_panic (inode->i_sb, "ext2_read_inode", |
inode | 512 | fs/ext2/inode.c | group_desc = block_group >> EXT2_DESC_PER_BLOCK_BITS(inode->i_sb); |
inode | 513 | fs/ext2/inode.c | desc = block_group & (EXT2_DESC_PER_BLOCK(inode->i_sb) - 1); |
inode | 514 | fs/ext2/inode.c | bh = inode->i_sb->u.ext2_sb.s_group_desc[group_desc]; |
inode | 516 | fs/ext2/inode.c | ext2_panic (inode->i_sb, "ext2_read_inode", |
inode | 520 | fs/ext2/inode.c | (((inode->i_ino - 1) % EXT2_INODES_PER_GROUP(inode->i_sb)) |
inode | 521 | fs/ext2/inode.c | >> EXT2_INODES_PER_BLOCK_BITS(inode->i_sb)); |
inode | 522 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
inode | 523 | fs/ext2/inode.c | ext2_panic (inode->i_sb, "ext2_read_inode", |
inode | 525 | fs/ext2/inode.c | "inode=%lu, block=%lu", inode->i_ino, block); |
inode | 527 | fs/ext2/inode.c | ((inode->i_ino - 1) & (EXT2_INODES_PER_BLOCK(inode->i_sb) - 1)); |
inode | 528 | fs/ext2/inode.c | inode->i_mode = raw_inode->i_mode; |
inode | 529 | fs/ext2/inode.c | inode->i_uid = raw_inode->i_uid; |
inode | 530 | fs/ext2/inode.c | inode->i_gid = raw_inode->i_gid; |
inode | 531 | fs/ext2/inode.c | inode->i_nlink = raw_inode->i_links_count; |
inode | 532 | fs/ext2/inode.c | inode->i_size = raw_inode->i_size; |
inode | 533 | fs/ext2/inode.c | inode->i_atime = raw_inode->i_atime; |
inode | 534 | fs/ext2/inode.c | inode->i_ctime = raw_inode->i_ctime; |
inode | 535 | fs/ext2/inode.c | inode->i_mtime = raw_inode->i_mtime; |
inode | 536 | fs/ext2/inode.c | inode->u.ext2_i.i_dtime = raw_inode->i_dtime; |
inode | 537 | fs/ext2/inode.c | inode->i_blksize = inode->i_sb->s_blocksize; |
inode | 538 | fs/ext2/inode.c | inode->i_blocks = raw_inode->i_blocks; |
inode | 539 | fs/ext2/inode.c | inode->i_version = ++event; |
inode | 540 | fs/ext2/inode.c | inode->u.ext2_i.i_flags = raw_inode->i_flags; |
inode | 541 | fs/ext2/inode.c | inode->u.ext2_i.i_faddr = raw_inode->i_faddr; |
inode | 542 | fs/ext2/inode.c | inode->u.ext2_i.i_frag_no = raw_inode->i_frag; |
inode | 543 | fs/ext2/inode.c | inode->u.ext2_i.i_frag_size = raw_inode->i_fsize; |
inode | 544 | fs/ext2/inode.c | inode->u.ext2_i.i_osync = 0; |
inode | 545 | fs/ext2/inode.c | inode->u.ext2_i.i_file_acl = raw_inode->i_file_acl; |
inode | 546 | fs/ext2/inode.c | inode->u.ext2_i.i_dir_acl = raw_inode->i_dir_acl; |
inode | 547 | fs/ext2/inode.c | inode->u.ext2_i.i_version = raw_inode->i_version; |
inode | 548 | fs/ext2/inode.c | inode->u.ext2_i.i_block_group = block_group; |
inode | 549 | fs/ext2/inode.c | inode->u.ext2_i.i_next_alloc_block = 0; |
inode | 550 | fs/ext2/inode.c | inode->u.ext2_i.i_next_alloc_goal = 0; |
inode | 551 | fs/ext2/inode.c | if (inode->u.ext2_i.i_prealloc_count) |
inode | 552 | fs/ext2/inode.c | ext2_error (inode->i_sb, "ext2_read_inode", |
inode | 554 | fs/ext2/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 555 | fs/ext2/inode.c | inode->i_rdev = to_kdev_t(raw_inode->i_block[0]); |
inode | 557 | fs/ext2/inode.c | inode->u.ext2_i.i_data[block] = raw_inode->i_block[block]; |
inode | 559 | fs/ext2/inode.c | inode->i_op = NULL; |
inode | 560 | fs/ext2/inode.c | if (inode->i_ino == EXT2_ACL_IDX_INO || |
inode | 561 | fs/ext2/inode.c | inode->i_ino == EXT2_ACL_DATA_INO) |
inode | 563 | fs/ext2/inode.c | else if (S_ISREG(inode->i_mode)) |
inode | 564 | fs/ext2/inode.c | inode->i_op = &ext2_file_inode_operations; |
inode | 565 | fs/ext2/inode.c | else if (S_ISDIR(inode->i_mode)) |
inode | 566 | fs/ext2/inode.c | inode->i_op = &ext2_dir_inode_operations; |
inode | 567 | fs/ext2/inode.c | else if (S_ISLNK(inode->i_mode)) |
inode | 568 | fs/ext2/inode.c | inode->i_op = &ext2_symlink_inode_operations; |
inode | 569 | fs/ext2/inode.c | else if (S_ISCHR(inode->i_mode)) |
inode | 570 | fs/ext2/inode.c | inode->i_op = &chrdev_inode_operations; |
inode | 571 | fs/ext2/inode.c | else if (S_ISBLK(inode->i_mode)) |
inode | 572 | fs/ext2/inode.c | inode->i_op = &blkdev_inode_operations; |
inode | 573 | fs/ext2/inode.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 574 | fs/ext2/inode.c | init_fifo(inode); |
inode | 575 | fs/ext2/inode.c | if (inode->u.ext2_i.i_flags & EXT2_SYNC_FL) |
inode | 576 | fs/ext2/inode.c | inode->i_flags |= MS_SYNCHRONOUS; |
inode | 577 | fs/ext2/inode.c | if (inode->u.ext2_i.i_flags & EXT2_APPEND_FL) |
inode | 578 | fs/ext2/inode.c | inode->i_flags |= S_APPEND; |
inode | 579 | fs/ext2/inode.c | if (inode->u.ext2_i.i_flags & EXT2_IMMUTABLE_FL) |
inode | 580 | fs/ext2/inode.c | inode->i_flags |= S_IMMUTABLE; |
inode | 583 | fs/ext2/inode.c | static struct buffer_head * ext2_update_inode (struct inode * inode) |
inode | 593 | fs/ext2/inode.c | if ((inode->i_ino != EXT2_ROOT_INO && inode->i_ino < EXT2_FIRST_INO) || |
inode | 594 | fs/ext2/inode.c | inode->i_ino > inode->i_sb->u.ext2_sb.s_es->s_inodes_count) { |
inode | 595 | fs/ext2/inode.c | ext2_error (inode->i_sb, "ext2_write_inode", |
inode | 596 | fs/ext2/inode.c | "bad inode number: %lu", inode->i_ino); |
inode | 599 | fs/ext2/inode.c | block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb); |
inode | 600 | fs/ext2/inode.c | if (block_group >= inode->i_sb->u.ext2_sb.s_groups_count) |
inode | 601 | fs/ext2/inode.c | ext2_panic (inode->i_sb, "ext2_write_inode", |
inode | 603 | fs/ext2/inode.c | group_desc = block_group >> EXT2_DESC_PER_BLOCK_BITS(inode->i_sb); |
inode | 604 | fs/ext2/inode.c | desc = block_group & (EXT2_DESC_PER_BLOCK(inode->i_sb) - 1); |
inode | 605 | fs/ext2/inode.c | bh = inode->i_sb->u.ext2_sb.s_group_desc[group_desc]; |
inode | 607 | fs/ext2/inode.c | ext2_panic (inode->i_sb, "ext2_write_inode", |
inode | 611 | fs/ext2/inode.c | (((inode->i_ino - 1) % EXT2_INODES_PER_GROUP(inode->i_sb)) |
inode | 612 | fs/ext2/inode.c | >> EXT2_INODES_PER_BLOCK_BITS(inode->i_sb)); |
inode | 613 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
inode | 614 | fs/ext2/inode.c | ext2_panic (inode->i_sb, "ext2_write_inode", |
inode | 616 | fs/ext2/inode.c | "inode=%lu, block=%lu", inode->i_ino, block); |
inode | 618 | fs/ext2/inode.c | (inode->i_ino - 1) % EXT2_INODES_PER_BLOCK(inode->i_sb); |
inode | 619 | fs/ext2/inode.c | raw_inode->i_mode = inode->i_mode; |
inode | 620 | fs/ext2/inode.c | raw_inode->i_uid = inode->i_uid; |
inode | 621 | fs/ext2/inode.c | raw_inode->i_gid = inode->i_gid; |
inode | 622 | fs/ext2/inode.c | raw_inode->i_links_count = inode->i_nlink; |
inode | 623 | fs/ext2/inode.c | raw_inode->i_size = inode->i_size; |
inode | 624 | fs/ext2/inode.c | raw_inode->i_atime = inode->i_atime; |
inode | 625 | fs/ext2/inode.c | raw_inode->i_ctime = inode->i_ctime; |
inode | 626 | fs/ext2/inode.c | raw_inode->i_mtime = inode->i_mtime; |
inode | 627 | fs/ext2/inode.c | raw_inode->i_blocks = inode->i_blocks; |
inode | 628 | fs/ext2/inode.c | raw_inode->i_dtime = inode->u.ext2_i.i_dtime; |
inode | 629 | fs/ext2/inode.c | raw_inode->i_flags = inode->u.ext2_i.i_flags; |
inode | 630 | fs/ext2/inode.c | raw_inode->i_faddr = inode->u.ext2_i.i_faddr; |
inode | 631 | fs/ext2/inode.c | raw_inode->i_frag = inode->u.ext2_i.i_frag_no; |
inode | 632 | fs/ext2/inode.c | raw_inode->i_fsize = inode->u.ext2_i.i_frag_size; |
inode | 633 | fs/ext2/inode.c | raw_inode->i_file_acl = inode->u.ext2_i.i_file_acl; |
inode | 634 | fs/ext2/inode.c | raw_inode->i_dir_acl = inode->u.ext2_i.i_dir_acl; |
inode | 635 | fs/ext2/inode.c | raw_inode->i_version = inode->u.ext2_i.i_version; |
inode | 636 | fs/ext2/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 637 | fs/ext2/inode.c | raw_inode->i_block[0] = kdev_t_to_nr(inode->i_rdev); |
inode | 639 | fs/ext2/inode.c | raw_inode->i_block[block] = inode->u.ext2_i.i_data[block]; |
inode | 641 | fs/ext2/inode.c | inode->i_dirt = 0; |
inode | 645 | fs/ext2/inode.c | void ext2_write_inode (struct inode * inode) |
inode | 648 | fs/ext2/inode.c | bh = ext2_update_inode (inode); |
inode | 652 | fs/ext2/inode.c | int ext2_sync_inode (struct inode *inode) |
inode | 657 | fs/ext2/inode.c | bh = ext2_update_inode (inode); |
inode | 666 | fs/ext2/inode.c | kdevname(inode->i_dev), inode->i_ino); |
inode | 19 | fs/ext2/ioctl.c | int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, |
inode | 31 | fs/ext2/ioctl.c | put_fs_long (inode->u.ext2_i.i_flags, (long *) arg); |
inode | 39 | fs/ext2/ioctl.c | (inode->u.ext2_i.i_flags & EXT2_IMMUTABLE_FL)) { |
inode | 44 | fs/ext2/ioctl.c | if ((current->fsuid != inode->i_uid) && !fsuser()) |
inode | 46 | fs/ext2/ioctl.c | if (IS_RDONLY(inode)) |
inode | 48 | fs/ext2/ioctl.c | inode->u.ext2_i.i_flags = flags; |
inode | 50 | fs/ext2/ioctl.c | inode->i_flags |= S_APPEND; |
inode | 52 | fs/ext2/ioctl.c | inode->i_flags &= ~S_APPEND; |
inode | 54 | fs/ext2/ioctl.c | inode->i_flags |= S_IMMUTABLE; |
inode | 56 | fs/ext2/ioctl.c | inode->i_flags &= ~S_IMMUTABLE; |
inode | 57 | fs/ext2/ioctl.c | inode->i_ctime = CURRENT_TIME; |
inode | 58 | fs/ext2/ioctl.c | inode->i_dirt = 1; |
inode | 63 | fs/ext2/ioctl.c | put_fs_long (inode->u.ext2_i.i_version, (long *) arg); |
inode | 66 | fs/ext2/ioctl.c | if ((current->fsuid != inode->i_uid) && !fsuser()) |
inode | 68 | fs/ext2/ioctl.c | if (IS_RDONLY(inode)) |
inode | 70 | fs/ext2/ioctl.c | inode->u.ext2_i.i_version = get_fs_long ((long *) arg); |
inode | 71 | fs/ext2/ioctl.c | inode->i_ctime = CURRENT_TIME; |
inode | 72 | fs/ext2/ioctl.c | inode->i_dirt = 1; |
inode | 47 | fs/ext2/namei.c | if (!de || !de->inode || len > EXT2_NAME_LEN) |
inode | 68 | fs/ext2/namei.c | static struct buffer_head * ext2_find_entry (struct inode * dir, |
inode | 135 | fs/ext2/namei.c | if (de->inode != 0 && ext2_match (namelen, name, de)) { |
inode | 165 | fs/ext2/namei.c | int ext2_lookup (struct inode * dir, const char * name, int len, |
inode | 166 | fs/ext2/namei.c | struct inode ** result) |
inode | 198 | fs/ext2/namei.c | ino = de->inode; |
inode | 219 | fs/ext2/namei.c | static struct buffer_head * ext2_add_entry (struct inode * dir, |
inode | 275 | fs/ext2/namei.c | de->inode = 0; |
inode | 292 | fs/ext2/namei.c | if (de->inode != 0 && ext2_match (namelen, name, de)) { |
inode | 297 | fs/ext2/namei.c | if ((de->inode == 0 && de->rec_len >= rec_len) || |
inode | 300 | fs/ext2/namei.c | if (de->inode) { |
inode | 308 | fs/ext2/namei.c | de->inode = 0; |
inode | 357 | fs/ext2/namei.c | dir->inode = 0; |
inode | 367 | fs/ext2/namei.c | int ext2_create (struct inode * dir,const char * name, int len, int mode, |
inode | 368 | fs/ext2/namei.c | struct inode ** result) |
inode | 370 | fs/ext2/namei.c | struct inode * inode; |
inode | 378 | fs/ext2/namei.c | inode = ext2_new_inode (dir, mode); |
inode | 379 | fs/ext2/namei.c | if (!inode) { |
inode | 383 | fs/ext2/namei.c | inode->i_op = &ext2_file_inode_operations; |
inode | 384 | fs/ext2/namei.c | inode->i_mode = mode; |
inode | 385 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 388 | fs/ext2/namei.c | inode->i_nlink--; |
inode | 389 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 390 | fs/ext2/namei.c | iput (inode); |
inode | 394 | fs/ext2/namei.c | de->inode = inode->i_ino; |
inode | 396 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
inode | 404 | fs/ext2/namei.c | *result = inode; |
inode | 408 | fs/ext2/namei.c | int ext2_mknod (struct inode * dir, const char * name, int len, int mode, |
inode | 411 | fs/ext2/namei.c | struct inode * inode; |
inode | 424 | fs/ext2/namei.c | inode = ext2_new_inode (dir, mode); |
inode | 425 | fs/ext2/namei.c | if (!inode) { |
inode | 429 | fs/ext2/namei.c | inode->i_uid = current->fsuid; |
inode | 430 | fs/ext2/namei.c | inode->i_mode = mode; |
inode | 431 | fs/ext2/namei.c | inode->i_op = NULL; |
inode | 432 | fs/ext2/namei.c | if (S_ISREG(inode->i_mode)) |
inode | 433 | fs/ext2/namei.c | inode->i_op = &ext2_file_inode_operations; |
inode | 434 | fs/ext2/namei.c | else if (S_ISDIR(inode->i_mode)) { |
inode | 435 | fs/ext2/namei.c | inode->i_op = &ext2_dir_inode_operations; |
inode | 437 | fs/ext2/namei.c | inode->i_mode |= S_ISGID; |
inode | 439 | fs/ext2/namei.c | else if (S_ISLNK(inode->i_mode)) |
inode | 440 | fs/ext2/namei.c | inode->i_op = &ext2_symlink_inode_operations; |
inode | 441 | fs/ext2/namei.c | else if (S_ISCHR(inode->i_mode)) |
inode | 442 | fs/ext2/namei.c | inode->i_op = &chrdev_inode_operations; |
inode | 443 | fs/ext2/namei.c | else if (S_ISBLK(inode->i_mode)) |
inode | 444 | fs/ext2/namei.c | inode->i_op = &blkdev_inode_operations; |
inode | 445 | fs/ext2/namei.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 446 | fs/ext2/namei.c | init_fifo(inode); |
inode | 448 | fs/ext2/namei.c | inode->i_rdev = to_kdev_t(rdev); |
inode | 449 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 452 | fs/ext2/namei.c | inode->i_nlink--; |
inode | 453 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 454 | fs/ext2/namei.c | iput (inode); |
inode | 458 | fs/ext2/namei.c | de->inode = inode->i_ino; |
inode | 460 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
inode | 468 | fs/ext2/namei.c | iput (inode); |
inode | 472 | fs/ext2/namei.c | int ext2_mkdir (struct inode * dir, const char * name, int len, int mode) |
inode | 474 | fs/ext2/namei.c | struct inode * inode; |
inode | 491 | fs/ext2/namei.c | inode = ext2_new_inode (dir, S_IFDIR); |
inode | 492 | fs/ext2/namei.c | if (!inode) { |
inode | 496 | fs/ext2/namei.c | inode->i_op = &ext2_dir_inode_operations; |
inode | 497 | fs/ext2/namei.c | inode->i_size = inode->i_sb->s_blocksize; |
inode | 498 | fs/ext2/namei.c | dir_block = ext2_bread (inode, 0, 1, &err); |
inode | 501 | fs/ext2/namei.c | inode->i_nlink--; |
inode | 502 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 503 | fs/ext2/namei.c | iput (inode); |
inode | 506 | fs/ext2/namei.c | inode->i_blocks = inode->i_sb->s_blocksize / 512; |
inode | 508 | fs/ext2/namei.c | de->inode = inode->i_ino; |
inode | 513 | fs/ext2/namei.c | de->inode = dir->i_ino; |
inode | 514 | fs/ext2/namei.c | de->rec_len = inode->i_sb->s_blocksize - EXT2_DIR_REC_LEN(1); |
inode | 517 | fs/ext2/namei.c | inode->i_nlink = 2; |
inode | 520 | fs/ext2/namei.c | inode->i_mode = S_IFDIR | (mode & S_IRWXUGO & ~current->fs->umask); |
inode | 522 | fs/ext2/namei.c | inode->i_mode |= S_ISGID; |
inode | 523 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 527 | fs/ext2/namei.c | inode->i_nlink = 0; |
inode | 528 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 529 | fs/ext2/namei.c | iput (inode); |
inode | 532 | fs/ext2/namei.c | de->inode = inode->i_ino; |
inode | 534 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
inode | 543 | fs/ext2/namei.c | iput (inode); |
inode | 551 | fs/ext2/namei.c | static int empty_dir (struct inode * inode) |
inode | 559 | fs/ext2/namei.c | sb = inode->i_sb; |
inode | 560 | fs/ext2/namei.c | if (inode->i_size < EXT2_DIR_REC_LEN(1) + EXT2_DIR_REC_LEN(2) || |
inode | 561 | fs/ext2/namei.c | !(bh = ext2_bread (inode, 0, 0, &err))) { |
inode | 562 | fs/ext2/namei.c | ext2_warning (inode->i_sb, "empty_dir", |
inode | 564 | fs/ext2/namei.c | inode->i_ino); |
inode | 569 | fs/ext2/namei.c | if (de->inode != inode->i_ino || !de1->inode || |
inode | 571 | fs/ext2/namei.c | ext2_warning (inode->i_sb, "empty_dir", |
inode | 573 | fs/ext2/namei.c | inode->i_ino); |
inode | 578 | fs/ext2/namei.c | while (offset < inode->i_size ) { |
inode | 581 | fs/ext2/namei.c | bh = ext2_bread (inode, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, &err); |
inode | 585 | fs/ext2/namei.c | inode->i_ino, offset); |
inode | 591 | fs/ext2/namei.c | if (!ext2_check_dir_entry ("empty_dir", inode, de, bh, |
inode | 596 | fs/ext2/namei.c | if (de->inode) { |
inode | 607 | fs/ext2/namei.c | int ext2_rmdir (struct inode * dir, const char * name, int len) |
inode | 610 | fs/ext2/namei.c | struct inode * inode; |
inode | 617 | fs/ext2/namei.c | inode = NULL; |
inode | 623 | fs/ext2/namei.c | if (!(inode = iget (dir->i_sb, de->inode))) |
inode | 625 | fs/ext2/namei.c | if (inode->i_dev != dir->i_dev) |
inode | 627 | fs/ext2/namei.c | if (de->inode != inode->i_ino) { |
inode | 628 | fs/ext2/namei.c | iput(inode); |
inode | 635 | fs/ext2/namei.c | current->fsuid != inode->i_uid && |
inode | 638 | fs/ext2/namei.c | if (inode == dir) /* we may not delete ".", but "../dir" is ok */ |
inode | 640 | fs/ext2/namei.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 644 | fs/ext2/namei.c | down(&inode->i_sem); |
inode | 645 | fs/ext2/namei.c | if (!empty_dir (inode)) |
inode | 647 | fs/ext2/namei.c | else if (de->inode != inode->i_ino) |
inode | 650 | fs/ext2/namei.c | if (inode->i_count > 1) { |
inode | 658 | fs/ext2/namei.c | inode->i_size = 0; |
inode | 663 | fs/ext2/namei.c | up(&inode->i_sem); |
inode | 671 | fs/ext2/namei.c | if (inode->i_nlink != 2) |
inode | 672 | fs/ext2/namei.c | ext2_warning (inode->i_sb, "ext2_rmdir", |
inode | 674 | fs/ext2/namei.c | inode->i_nlink); |
inode | 675 | fs/ext2/namei.c | inode->i_version = ++event; |
inode | 676 | fs/ext2/namei.c | inode->i_nlink = 0; |
inode | 677 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 679 | fs/ext2/namei.c | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
inode | 683 | fs/ext2/namei.c | iput (inode); |
inode | 688 | fs/ext2/namei.c | int ext2_unlink (struct inode * dir, const char * name, int len) |
inode | 691 | fs/ext2/namei.c | struct inode * inode; |
inode | 699 | fs/ext2/namei.c | inode = NULL; |
inode | 703 | fs/ext2/namei.c | if (!(inode = iget (dir->i_sb, de->inode))) |
inode | 706 | fs/ext2/namei.c | if (S_ISDIR(inode->i_mode)) |
inode | 708 | fs/ext2/namei.c | if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) |
inode | 710 | fs/ext2/namei.c | if (de->inode != inode->i_ino) { |
inode | 711 | fs/ext2/namei.c | iput(inode); |
inode | 718 | fs/ext2/namei.c | current->fsuid != inode->i_uid && |
inode | 721 | fs/ext2/namei.c | if (!inode->i_nlink) { |
inode | 722 | fs/ext2/namei.c | ext2_warning (inode->i_sb, "ext2_unlink", |
inode | 724 | fs/ext2/namei.c | inode->i_ino, inode->i_nlink); |
inode | 725 | fs/ext2/namei.c | inode->i_nlink = 1; |
inode | 738 | fs/ext2/namei.c | inode->i_nlink--; |
inode | 739 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 740 | fs/ext2/namei.c | inode->i_ctime = dir->i_ctime; |
inode | 744 | fs/ext2/namei.c | iput (inode); |
inode | 749 | fs/ext2/namei.c | int ext2_symlink (struct inode * dir, const char * name, int len, |
inode | 753 | fs/ext2/namei.c | struct inode * inode = NULL; |
inode | 760 | fs/ext2/namei.c | if (!(inode = ext2_new_inode (dir, S_IFLNK))) { |
inode | 764 | fs/ext2/namei.c | inode->i_mode = S_IFLNK | S_IRWXUGO; |
inode | 765 | fs/ext2/namei.c | inode->i_op = &ext2_symlink_inode_operations; |
inode | 766 | fs/ext2/namei.c | for (l = 0; l < inode->i_sb->s_blocksize - 1 && |
inode | 769 | fs/ext2/namei.c | if (l >= sizeof (inode->u.ext2_i.i_data)) { |
inode | 773 | fs/ext2/namei.c | name_block = ext2_bread (inode, 0, 1, &err); |
inode | 776 | fs/ext2/namei.c | inode->i_nlink--; |
inode | 777 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 778 | fs/ext2/namei.c | iput (inode); |
inode | 783 | fs/ext2/namei.c | link = (char *) inode->u.ext2_i.i_data; |
inode | 789 | fs/ext2/namei.c | while (i < inode->i_sb->s_blocksize - 1 && (c = *(symname++))) |
inode | 796 | fs/ext2/namei.c | inode->i_size = i; |
inode | 797 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 800 | fs/ext2/namei.c | inode->i_nlink--; |
inode | 801 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 802 | fs/ext2/namei.c | iput (inode); |
inode | 809 | fs/ext2/namei.c | inode->i_nlink--; |
inode | 810 | fs/ext2/namei.c | inode->i_dirt = 1; |
inode | 811 | fs/ext2/namei.c | iput (inode); |
inode | 815 | fs/ext2/namei.c | de->inode = inode->i_ino; |
inode | 817 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
inode | 825 | fs/ext2/namei.c | iput (inode); |
inode | 829 | fs/ext2/namei.c | int ext2_link (struct inode * oldinode, struct inode * dir, |
inode | 864 | fs/ext2/namei.c | de->inode = oldinode->i_ino; |
inode | 866 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
inode | 881 | fs/ext2/namei.c | static int subdir (struct inode * new_inode, struct inode * old_inode) |
inode | 907 | fs/ext2/namei.c | ((struct ext2_dir_entry *) buffer)->rec_len))->inode |
inode | 924 | fs/ext2/namei.c | static int do_ext2_rename (struct inode * old_dir, const char * old_name, |
inode | 925 | fs/ext2/namei.c | int old_len, struct inode * new_dir, |
inode | 928 | fs/ext2/namei.c | struct inode * old_inode, * new_inode; |
inode | 954 | fs/ext2/namei.c | old_inode = __iget (old_dir->i_sb, old_de->inode, 0); /* don't cross mnt-points */ |
inode | 966 | fs/ext2/namei.c | new_inode = __iget (new_dir->i_sb, new_de->inode, 0); /* no mntp cross */ |
inode | 1020 | fs/ext2/namei.c | if (new_inode && (new_de->inode != new_inode->i_ino)) |
inode | 1022 | fs/ext2/namei.c | if (new_de->inode && !new_inode) |
inode | 1024 | fs/ext2/namei.c | if (old_de->inode != old_inode->i_ino) |
inode | 1029 | fs/ext2/namei.c | new_de->inode = old_inode->i_ino; |
inode | 1030 | fs/ext2/namei.c | dcache_add(new_dir, new_de->name, new_de->name_len, new_de->inode); |
inode | 1093 | fs/ext2/namei.c | int ext2_rename (struct inode * old_dir, const char * old_name, int old_len, |
inode | 1094 | fs/ext2/namei.c | struct inode * new_dir, const char * new_name, int new_len) |
inode | 26 | fs/ext2/symlink.c | static int ext2_readlink (struct inode *, char *, int); |
inode | 27 | fs/ext2/symlink.c | static int ext2_follow_link (struct inode *, struct inode *, int, int, |
inode | 28 | fs/ext2/symlink.c | struct inode **); |
inode | 52 | fs/ext2/symlink.c | static int ext2_follow_link(struct inode * dir, struct inode * inode, |
inode | 53 | fs/ext2/symlink.c | int flag, int mode, struct inode ** res_inode) |
inode | 64 | fs/ext2/symlink.c | if (!inode) { |
inode | 68 | fs/ext2/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 70 | fs/ext2/symlink.c | *res_inode = inode; |
inode | 75 | fs/ext2/symlink.c | iput (inode); |
inode | 78 | fs/ext2/symlink.c | if (inode->i_blocks) { |
inode | 79 | fs/ext2/symlink.c | if (!(bh = ext2_bread (inode, 0, 0, &error))) { |
inode | 81 | fs/ext2/symlink.c | iput (inode); |
inode | 86 | fs/ext2/symlink.c | link = (char *) inode->u.ext2_i.i_data; |
inode | 90 | fs/ext2/symlink.c | iput (inode); |
inode | 96 | fs/ext2/symlink.c | static int ext2_readlink (struct inode * inode, char * buffer, int buflen) |
inode | 103 | fs/ext2/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 104 | fs/ext2/symlink.c | iput (inode); |
inode | 107 | fs/ext2/symlink.c | if (buflen > inode->i_sb->s_blocksize - 1) |
inode | 108 | fs/ext2/symlink.c | buflen = inode->i_sb->s_blocksize - 1; |
inode | 109 | fs/ext2/symlink.c | if (inode->i_blocks) { |
inode | 110 | fs/ext2/symlink.c | bh = ext2_bread (inode, 0, 0, &err); |
inode | 112 | fs/ext2/symlink.c | iput (inode); |
inode | 118 | fs/ext2/symlink.c | link = (char *) inode->u.ext2_i.i_data; |
inode | 124 | fs/ext2/symlink.c | iput (inode); |
inode | 59 | fs/ext2/truncate.c | static int trunc_direct (struct inode * inode) |
inode | 67 | fs/ext2/truncate.c | int blocks = inode->i_sb->s_blocksize / 512; |
inode | 68 | fs/ext2/truncate.c | #define DIRECT_BLOCK ((inode->i_size + inode->i_sb->s_blocksize - 1) / \ |
inode | 69 | fs/ext2/truncate.c | inode->i_sb->s_blocksize) |
inode | 74 | fs/ext2/truncate.c | p = inode->u.ext2_i.i_data + i; |
inode | 78 | fs/ext2/truncate.c | bh = get_hash_table (inode->i_dev, tmp, |
inode | 79 | fs/ext2/truncate.c | inode->i_sb->s_blocksize); |
inode | 90 | fs/ext2/truncate.c | inode->i_blocks -= blocks; |
inode | 91 | fs/ext2/truncate.c | inode->i_dirt = 1; |
inode | 99 | fs/ext2/truncate.c | ext2_free_blocks (inode->i_sb, block_to_free, free_count); |
inode | 106 | fs/ext2/truncate.c | ext2_free_blocks (inode->i_sb, block_to_free, free_count); |
inode | 110 | fs/ext2/truncate.c | static int trunc_indirect (struct inode * inode, int offset, u32 * p) |
inode | 119 | fs/ext2/truncate.c | int addr_per_block = EXT2_ADDR_PER_BLOCK(inode->i_sb); |
inode | 120 | fs/ext2/truncate.c | int blocks = inode->i_sb->s_blocksize / 512; |
inode | 127 | fs/ext2/truncate.c | ind_bh = bread (inode->i_dev, tmp, inode->i_sb->s_blocksize); |
inode | 146 | fs/ext2/truncate.c | bh = get_hash_table (inode->i_dev, tmp, |
inode | 147 | fs/ext2/truncate.c | inode->i_sb->s_blocksize); |
inode | 166 | fs/ext2/truncate.c | ext2_free_blocks (inode->i_sb, block_to_free, free_count); |
inode | 171 | fs/ext2/truncate.c | inode->i_blocks -= blocks; |
inode | 172 | fs/ext2/truncate.c | inode->i_dirt = 1; |
inode | 175 | fs/ext2/truncate.c | ext2_free_blocks (inode->i_sb, block_to_free, free_count); |
inode | 187 | fs/ext2/truncate.c | inode->i_blocks -= blocks; |
inode | 188 | fs/ext2/truncate.c | inode->i_dirt = 1; |
inode | 189 | fs/ext2/truncate.c | ext2_free_blocks (inode->i_sb, tmp, 1); |
inode | 191 | fs/ext2/truncate.c | if (IS_SYNC(inode) && ind_bh->b_dirt) { |
inode | 199 | fs/ext2/truncate.c | static int trunc_dindirect (struct inode * inode, int offset, |
inode | 206 | fs/ext2/truncate.c | int addr_per_block = EXT2_ADDR_PER_BLOCK(inode->i_sb); |
inode | 207 | fs/ext2/truncate.c | int blocks = inode->i_sb->s_blocksize / 512; |
inode | 214 | fs/ext2/truncate.c | dind_bh = bread (inode->i_dev, tmp, inode->i_sb->s_blocksize); |
inode | 233 | fs/ext2/truncate.c | retry |= trunc_indirect (inode, offset + (i * addr_per_block), |
inode | 248 | fs/ext2/truncate.c | inode->i_blocks -= blocks; |
inode | 249 | fs/ext2/truncate.c | inode->i_dirt = 1; |
inode | 250 | fs/ext2/truncate.c | ext2_free_blocks (inode->i_sb, tmp, 1); |
inode | 252 | fs/ext2/truncate.c | if (IS_SYNC(inode) && dind_bh->b_dirt) { |
inode | 260 | fs/ext2/truncate.c | static int trunc_tindirect (struct inode * inode) |
inode | 266 | fs/ext2/truncate.c | int addr_per_block = EXT2_ADDR_PER_BLOCK(inode->i_sb); |
inode | 267 | fs/ext2/truncate.c | int blocks = inode->i_sb->s_blocksize / 512; |
inode | 273 | fs/ext2/truncate.c | p = inode->u.ext2_i.i_data + EXT2_TIND_BLOCK; |
inode | 276 | fs/ext2/truncate.c | tind_bh = bread (inode->i_dev, tmp, inode->i_sb->s_blocksize); |
inode | 292 | fs/ext2/truncate.c | retry |= trunc_dindirect(inode, EXT2_NDIR_BLOCKS + |
inode | 308 | fs/ext2/truncate.c | inode->i_blocks -= blocks; |
inode | 309 | fs/ext2/truncate.c | inode->i_dirt = 1; |
inode | 310 | fs/ext2/truncate.c | ext2_free_blocks (inode->i_sb, tmp, 1); |
inode | 312 | fs/ext2/truncate.c | if (IS_SYNC(inode) && tind_bh->b_dirt) { |
inode | 320 | fs/ext2/truncate.c | void ext2_truncate (struct inode * inode) |
inode | 327 | fs/ext2/truncate.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 328 | fs/ext2/truncate.c | S_ISLNK(inode->i_mode))) |
inode | 330 | fs/ext2/truncate.c | if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) |
inode | 332 | fs/ext2/truncate.c | ext2_discard_prealloc(inode); |
inode | 334 | fs/ext2/truncate.c | down(&inode->i_sem); |
inode | 335 | fs/ext2/truncate.c | retry = trunc_direct(inode); |
inode | 336 | fs/ext2/truncate.c | retry |= trunc_indirect (inode, EXT2_IND_BLOCK, |
inode | 337 | fs/ext2/truncate.c | (u32 *) &inode->u.ext2_i.i_data[EXT2_IND_BLOCK]); |
inode | 338 | fs/ext2/truncate.c | retry |= trunc_dindirect (inode, EXT2_IND_BLOCK + |
inode | 339 | fs/ext2/truncate.c | EXT2_ADDR_PER_BLOCK(inode->i_sb), |
inode | 340 | fs/ext2/truncate.c | (u32 *) &inode->u.ext2_i.i_data[EXT2_DIND_BLOCK]); |
inode | 341 | fs/ext2/truncate.c | retry |= trunc_tindirect (inode); |
inode | 342 | fs/ext2/truncate.c | up(&inode->i_sem); |
inode | 345 | fs/ext2/truncate.c | if (IS_SYNC(inode) && inode->i_dirt) |
inode | 346 | fs/ext2/truncate.c | ext2_sync_inode (inode); |
inode | 356 | fs/ext2/truncate.c | offset = inode->i_size & (inode->i_sb->s_blocksize - 1); |
inode | 358 | fs/ext2/truncate.c | bh = ext2_bread (inode, |
inode | 359 | fs/ext2/truncate.c | inode->i_size >> EXT2_BLOCK_SIZE_BITS(inode->i_sb), |
inode | 363 | fs/ext2/truncate.c | inode->i_sb->s_blocksize - offset); |
inode | 368 | fs/ext2/truncate.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 369 | fs/ext2/truncate.c | inode->i_dirt = 1; |
inode | 13 | fs/fifo.c | static int fifo_open(struct inode * inode,struct file * filp) |
inode | 27 | fs/fifo.c | if (!PIPE_READERS(*inode)++) |
inode | 28 | fs/fifo.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 29 | fs/fifo.c | if (!(filp->f_flags & O_NONBLOCK) && !PIPE_WRITERS(*inode)) { |
inode | 30 | fs/fifo.c | PIPE_RD_OPENERS(*inode)++; |
inode | 31 | fs/fifo.c | while (!PIPE_WRITERS(*inode)) { |
inode | 36 | fs/fifo.c | interruptible_sleep_on(&PIPE_WAIT(*inode)); |
inode | 38 | fs/fifo.c | if (!--PIPE_RD_OPENERS(*inode)) |
inode | 39 | fs/fifo.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 41 | fs/fifo.c | while (PIPE_WR_OPENERS(*inode)) |
inode | 42 | fs/fifo.c | interruptible_sleep_on(&PIPE_WAIT(*inode)); |
inode | 43 | fs/fifo.c | if (PIPE_WRITERS(*inode)) |
inode | 45 | fs/fifo.c | if (retval && !--PIPE_READERS(*inode)) |
inode | 46 | fs/fifo.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 55 | fs/fifo.c | if ((filp->f_flags & O_NONBLOCK) && !PIPE_READERS(*inode)) { |
inode | 60 | fs/fifo.c | if (!PIPE_WRITERS(*inode)++) |
inode | 61 | fs/fifo.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 62 | fs/fifo.c | if (!PIPE_READERS(*inode)) { |
inode | 63 | fs/fifo.c | PIPE_WR_OPENERS(*inode)++; |
inode | 64 | fs/fifo.c | while (!PIPE_READERS(*inode)) { |
inode | 69 | fs/fifo.c | interruptible_sleep_on(&PIPE_WAIT(*inode)); |
inode | 71 | fs/fifo.c | if (!--PIPE_WR_OPENERS(*inode)) |
inode | 72 | fs/fifo.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 74 | fs/fifo.c | while (PIPE_RD_OPENERS(*inode)) |
inode | 75 | fs/fifo.c | interruptible_sleep_on(&PIPE_WAIT(*inode)); |
inode | 76 | fs/fifo.c | if (retval && !--PIPE_WRITERS(*inode)) |
inode | 77 | fs/fifo.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 88 | fs/fifo.c | if (!PIPE_READERS(*inode)++) |
inode | 89 | fs/fifo.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 90 | fs/fifo.c | while (PIPE_WR_OPENERS(*inode)) |
inode | 91 | fs/fifo.c | interruptible_sleep_on(&PIPE_WAIT(*inode)); |
inode | 92 | fs/fifo.c | if (!PIPE_WRITERS(*inode)++) |
inode | 93 | fs/fifo.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 94 | fs/fifo.c | while (PIPE_RD_OPENERS(*inode)) |
inode | 95 | fs/fifo.c | interruptible_sleep_on(&PIPE_WAIT(*inode)); |
inode | 101 | fs/fifo.c | if (retval || PIPE_BASE(*inode)) |
inode | 104 | fs/fifo.c | if (PIPE_BASE(*inode)) { |
inode | 110 | fs/fifo.c | PIPE_LOCK(*inode) = 0; |
inode | 111 | fs/fifo.c | PIPE_START(*inode) = PIPE_LEN(*inode) = 0; |
inode | 112 | fs/fifo.c | PIPE_BASE(*inode) = (char *) page; |
inode | 152 | fs/fifo.c | void init_fifo(struct inode * inode) |
inode | 154 | fs/fifo.c | inode->i_op = &fifo_inode_operations; |
inode | 155 | fs/fifo.c | inode->i_pipe = 1; |
inode | 156 | fs/fifo.c | PIPE_LOCK(*inode) = 0; |
inode | 157 | fs/fifo.c | PIPE_BASE(*inode) = NULL; |
inode | 158 | fs/fifo.c | PIPE_START(*inode) = PIPE_LEN(*inode) = 0; |
inode | 159 | fs/fifo.c | PIPE_RD_OPENERS(*inode) = PIPE_WR_OPENERS(*inode) = 0; |
inode | 160 | fs/fifo.c | PIPE_WAIT(*inode) = NULL; |
inode | 161 | fs/fifo.c | PIPE_READERS(*inode) = PIPE_WRITERS(*inode) = 0; |
inode | 128 | fs/hpfs/hpfs_fs.c | static void hpfs_read_inode(struct inode *); |
inode | 147 | fs/hpfs/hpfs_fs.c | static int hpfs_file_read(struct inode *, struct file *, char *, int); |
inode | 148 | fs/hpfs/hpfs_fs.c | static secno hpfs_bmap(struct inode *, unsigned); |
inode | 178 | fs/hpfs/hpfs_fs.c | (int (*)(struct inode *, int)) |
inode | 186 | fs/hpfs/hpfs_fs.c | static int hpfs_dir_read(struct inode *inode, struct file *filp, |
inode | 188 | fs/hpfs/hpfs_fs.c | static int hpfs_readdir(struct inode *inode, struct file *filp, |
inode | 190 | fs/hpfs/hpfs_fs.c | static int hpfs_lookup(struct inode *, const char *, int, struct inode **); |
inode | 239 | fs/hpfs/hpfs_fs.c | static void count_dnodes(struct inode *inode, dnode_secno dno, |
inode | 243 | fs/hpfs/hpfs_fs.c | static secno bplus_lookup(struct inode *inode, struct bplus_header *b, |
inode | 245 | fs/hpfs/hpfs_fs.c | static struct hpfs_dirent *map_dirent(struct inode *inode, dnode_secno dno, |
inode | 248 | fs/hpfs/hpfs_fs.c | static struct hpfs_dirent *map_pos_dirent(struct inode *inode, loff_t *posp, |
inode | 250 | fs/hpfs/hpfs_fs.c | static dnode_secno dir_subdno(struct inode *inode, unsigned pos); |
inode | 625 | fs/hpfs/hpfs_fs.c | static void hpfs_read_inode(struct inode *inode) |
inode | 627 | fs/hpfs/hpfs_fs.c | struct super_block *s = inode->i_sb; |
inode | 631 | fs/hpfs/hpfs_fs.c | inode->i_op = 0; |
inode | 632 | fs/hpfs/hpfs_fs.c | inode->i_mode = 0; |
inode | 634 | fs/hpfs/hpfs_fs.c | if (inode->i_ino == 0 |
inode | 635 | fs/hpfs/hpfs_fs.c | || ino_secno(inode->i_ino) >= inode->i_sb->s_hpfs_fs_size) { |
inode | 644 | fs/hpfs/hpfs_fs.c | inode->i_uid = s->s_hpfs_uid; |
inode | 645 | fs/hpfs/hpfs_fs.c | inode->i_gid = s->s_hpfs_gid; |
inode | 646 | fs/hpfs/hpfs_fs.c | inode->i_mode = s->s_hpfs_mode; |
inode | 647 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_conv = s->s_hpfs_conv; |
inode | 649 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_dno = 0; |
inode | 650 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_n_secs = 0; |
inode | 651 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_file_sec = 0; |
inode | 652 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_disk_sec = 0; |
inode | 653 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_dpos = 0; |
inode | 654 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_dsubdno = 0; |
inode | 660 | fs/hpfs/hpfs_fs.c | if (ino_is_dir(inode->i_ino)) |
inode | 661 | fs/hpfs/hpfs_fs.c | inode->i_mode |= S_IFDIR; |
inode | 663 | fs/hpfs/hpfs_fs.c | inode->i_mode |= S_IFREG; |
inode | 664 | fs/hpfs/hpfs_fs.c | inode->i_mode &= ~0111; |
inode | 673 | fs/hpfs/hpfs_fs.c | inode->i_atime = 0; |
inode | 674 | fs/hpfs/hpfs_fs.c | inode->i_mtime = 0; |
inode | 675 | fs/hpfs/hpfs_fs.c | inode->i_ctime = 0; |
inode | 676 | fs/hpfs/hpfs_fs.c | inode->i_size = 0; |
inode | 682 | fs/hpfs/hpfs_fs.c | if (S_ISREG(inode->i_mode)) { |
inode | 684 | fs/hpfs/hpfs_fs.c | inode->i_op = (struct inode_operations *) &hpfs_file_iops; |
inode | 685 | fs/hpfs/hpfs_fs.c | inode->i_nlink = 1; |
inode | 686 | fs/hpfs/hpfs_fs.c | inode->i_blksize = 512; |
inode | 692 | fs/hpfs/hpfs_fs.c | struct fnode *fnode = map_fnode(inode->i_dev, |
inode | 693 | fs/hpfs/hpfs_fs.c | inode->i_ino, &bh0); |
inode | 697 | fs/hpfs/hpfs_fs.c | inode->i_mode = 0; |
inode | 701 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_parent_dir = dir_ino(fnode->up); |
inode | 702 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_dno = fnode->u.external[0].disk_secno; |
inode | 707 | fs/hpfs/hpfs_fs.c | count_dnodes(inode, inode->i_hpfs_dno, &n_dnodes, &n_subdirs); |
inode | 709 | fs/hpfs/hpfs_fs.c | inode->i_op = (struct inode_operations *) &hpfs_dir_iops; |
inode | 710 | fs/hpfs/hpfs_fs.c | inode->i_blksize = 512; /* 2048 here confuses ls & du & ... */ |
inode | 711 | fs/hpfs/hpfs_fs.c | inode->i_blocks = 4 * n_dnodes; |
inode | 712 | fs/hpfs/hpfs_fs.c | inode->i_size = 512 * inode->i_blocks; |
inode | 713 | fs/hpfs/hpfs_fs.c | inode->i_nlink = 2 + n_subdirs; |
inode | 776 | fs/hpfs/hpfs_fs.c | static void count_dnodes(struct inode *inode, dnode_secno dno, |
inode | 784 | fs/hpfs/hpfs_fs.c | dnode = map_dnode(inode->i_dev, dno, &qbh); |
inode | 794 | fs/hpfs/hpfs_fs.c | count_dnodes(inode, de_down_pointer(de), |
inode | 872 | fs/hpfs/hpfs_fs.c | static int hpfs_file_read(struct inode *inode, struct file *filp, |
inode | 880 | fs/hpfs/hpfs_fs.c | if (inode == 0 || !S_ISREG(inode->i_mode)) |
inode | 886 | fs/hpfs/hpfs_fs.c | if (count > inode->i_size - (off_t) filp->f_pos) |
inode | 887 | fs/hpfs/hpfs_fs.c | count = inode->i_size - filp->f_pos; |
inode | 908 | fs/hpfs/hpfs_fs.c | block = map_sector(inode->i_dev, hpfs_bmap(inode, q), &bh); |
inode | 916 | fs/hpfs/hpfs_fs.c | if (inode->i_hpfs_conv == CONV_AUTO) |
inode | 917 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_conv = choose_conv(block + r, n); |
inode | 919 | fs/hpfs/hpfs_fs.c | if (inode->i_hpfs_conv == CONV_BINARY) { |
inode | 932 | fs/hpfs/hpfs_fs.c | if (count > inode->i_size - (off_t) filp->f_pos - n + n0) |
inode | 933 | fs/hpfs/hpfs_fs.c | count = inode->i_size - filp->f_pos - n + n0; |
inode | 1003 | fs/hpfs/hpfs_fs.c | static secno hpfs_bmap(struct inode *inode, unsigned file_secno) |
inode | 1014 | fs/hpfs/hpfs_fs.c | n = file_secno - inode->i_hpfs_file_sec; |
inode | 1015 | fs/hpfs/hpfs_fs.c | if (n < inode->i_hpfs_n_secs) |
inode | 1016 | fs/hpfs/hpfs_fs.c | return inode->i_hpfs_disk_sec + n; |
inode | 1023 | fs/hpfs/hpfs_fs.c | fnode = map_fnode(inode->i_dev, inode->i_ino, &bh); |
inode | 1026 | fs/hpfs/hpfs_fs.c | disk_secno = bplus_lookup(inode, &fnode->btree, |
inode | 1040 | fs/hpfs/hpfs_fs.c | static secno bplus_lookup(struct inode *inode, struct bplus_header *b, |
inode | 1056 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_file_sec = n[i].file_secno; |
inode | 1057 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_disk_sec = n[i].disk_secno; |
inode | 1058 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_n_secs = n[i].length; |
inode | 1076 | fs/hpfs/hpfs_fs.c | anode = map_anode(inode->i_dev, ano, bhp); |
inode | 1079 | fs/hpfs/hpfs_fs.c | return bplus_lookup(inode, &anode->btree, |
inode | 1110 | fs/hpfs/hpfs_fs.c | static int hpfs_lookup(struct inode *dir, const char *name, int len, |
inode | 1111 | fs/hpfs/hpfs_fs.c | struct inode **result) |
inode | 1115 | fs/hpfs/hpfs_fs.c | struct inode *inode; |
inode | 1160 | fs/hpfs/hpfs_fs.c | if (!(inode = iget(dir->i_sb, ino))) |
inode | 1168 | fs/hpfs/hpfs_fs.c | if (!inode->i_atime) { |
inode | 1169 | fs/hpfs/hpfs_fs.c | inode->i_atime = local_to_gmt(de->read_date); |
inode | 1170 | fs/hpfs/hpfs_fs.c | inode->i_mtime = local_to_gmt(de->write_date); |
inode | 1171 | fs/hpfs/hpfs_fs.c | inode->i_ctime = local_to_gmt(de->creation_date); |
inode | 1173 | fs/hpfs/hpfs_fs.c | inode->i_mode &= ~0222; |
inode | 1175 | fs/hpfs/hpfs_fs.c | inode->i_size = de->file_size; |
inode | 1182 | fs/hpfs/hpfs_fs.c | inode->i_blocks = 1 + ((inode->i_size + 511) >> 9); |
inode | 1192 | fs/hpfs/hpfs_fs.c | *result = inode; |
inode | 1232 | fs/hpfs/hpfs_fs.c | static struct hpfs_dirent *map_dirent(struct inode *inode, dnode_secno dno, |
inode | 1244 | fs/hpfs/hpfs_fs.c | dnode = map_dnode(inode->i_dev, dno, qbh); |
inode | 1285 | fs/hpfs/hpfs_fs.c | return map_dirent(inode, sub_dno, |
inode | 1358 | fs/hpfs/hpfs_fs.c | static int hpfs_readdir(struct inode *inode, struct file *filp, void * dirent, |
inode | 1368 | fs/hpfs/hpfs_fs.c | if (inode == 0 |
inode | 1369 | fs/hpfs/hpfs_fs.c | || inode->i_sb == 0 |
inode | 1370 | fs/hpfs/hpfs_fs.c | || !S_ISDIR(inode->i_mode)) |
inode | 1377 | fs/hpfs/hpfs_fs.c | lc = inode->i_sb->s_hpfs_lowercase; |
inode | 1383 | fs/hpfs/hpfs_fs.c | if (filldir(dirent, ".", 1, filp->f_pos, inode->i_ino) < 0) |
inode | 1389 | fs/hpfs/hpfs_fs.c | if (filldir(dirent, "..", 2, filp->f_pos, inode->i_hpfs_parent_dir) < 0) |
inode | 1397 | fs/hpfs/hpfs_fs.c | de = map_pos_dirent(inode, &filp->f_pos, &qbh); |
inode | 1424 | fs/hpfs/hpfs_fs.c | static struct hpfs_dirent *map_pos_dirent(struct inode *inode, loff_t *posp, |
inode | 1444 | fs/hpfs/hpfs_fs.c | dno = dir_subdno(inode, q); |
inode | 1452 | fs/hpfs/hpfs_fs.c | de = map_nth_dirent(inode->i_dev, dno, r, qbh); |
inode | 1462 | fs/hpfs/hpfs_fs.c | return map_pos_dirent(inode, posp, qbh); |
inode | 1480 | fs/hpfs/hpfs_fs.c | return map_pos_dirent(inode, posp, qbh); |
inode | 1490 | fs/hpfs/hpfs_fs.c | static dnode_secno dir_subdno(struct inode *inode, unsigned pos) |
inode | 1500 | fs/hpfs/hpfs_fs.c | return inode->i_hpfs_dno; |
inode | 1506 | fs/hpfs/hpfs_fs.c | else if (pos == inode->i_hpfs_dpos) |
inode | 1507 | fs/hpfs/hpfs_fs.c | return inode->i_hpfs_dsubdno; |
inode | 1521 | fs/hpfs/hpfs_fs.c | dno = dir_subdno(inode, q); |
inode | 1528 | fs/hpfs/hpfs_fs.c | de = map_nth_dirent(inode->i_dev, dno, r, &qbh); |
inode | 1541 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_dpos = pos; |
inode | 1542 | fs/hpfs/hpfs_fs.c | inode->i_hpfs_dsubdno = dno; |
inode | 1573 | fs/hpfs/hpfs_fs.c | static int hpfs_dir_read(struct inode *inode, struct file *filp, |
inode | 16 | fs/inode.c | struct inode * inode; |
inode | 20 | fs/inode.c | static struct inode * first_inode; |
inode | 34 | fs/inode.c | static inline void insert_inode_free(struct inode *inode) |
inode | 36 | fs/inode.c | inode->i_next = first_inode; |
inode | 37 | fs/inode.c | inode->i_prev = first_inode->i_prev; |
inode | 38 | fs/inode.c | inode->i_next->i_prev = inode; |
inode | 39 | fs/inode.c | inode->i_prev->i_next = inode; |
inode | 40 | fs/inode.c | first_inode = inode; |
inode | 43 | fs/inode.c | static inline void remove_inode_free(struct inode *inode) |
inode | 45 | fs/inode.c | if (first_inode == inode) |
inode | 47 | fs/inode.c | if (inode->i_next) |
inode | 48 | fs/inode.c | inode->i_next->i_prev = inode->i_prev; |
inode | 49 | fs/inode.c | if (inode->i_prev) |
inode | 50 | fs/inode.c | inode->i_prev->i_next = inode->i_next; |
inode | 51 | fs/inode.c | inode->i_next = inode->i_prev = NULL; |
inode | 54 | fs/inode.c | void insert_inode_hash(struct inode *inode) |
inode | 57 | fs/inode.c | h = hash(inode->i_dev, inode->i_ino); |
inode | 59 | fs/inode.c | inode->i_hash_next = h->inode; |
inode | 60 | fs/inode.c | inode->i_hash_prev = NULL; |
inode | 61 | fs/inode.c | if (inode->i_hash_next) |
inode | 62 | fs/inode.c | inode->i_hash_next->i_hash_prev = inode; |
inode | 63 | fs/inode.c | h->inode = inode; |
inode | 66 | fs/inode.c | static inline void remove_inode_hash(struct inode *inode) |
inode | 69 | fs/inode.c | h = hash(inode->i_dev, inode->i_ino); |
inode | 71 | fs/inode.c | if (h->inode == inode) |
inode | 72 | fs/inode.c | h->inode = inode->i_hash_next; |
inode | 73 | fs/inode.c | if (inode->i_hash_next) |
inode | 74 | fs/inode.c | inode->i_hash_next->i_hash_prev = inode->i_hash_prev; |
inode | 75 | fs/inode.c | if (inode->i_hash_prev) |
inode | 76 | fs/inode.c | inode->i_hash_prev->i_hash_next = inode->i_hash_next; |
inode | 77 | fs/inode.c | inode->i_hash_prev = inode->i_hash_next = NULL; |
inode | 80 | fs/inode.c | static inline void put_last_free(struct inode *inode) |
inode | 82 | fs/inode.c | remove_inode_free(inode); |
inode | 83 | fs/inode.c | inode->i_prev = first_inode->i_prev; |
inode | 84 | fs/inode.c | inode->i_prev->i_next = inode; |
inode | 85 | fs/inode.c | inode->i_next = first_inode; |
inode | 86 | fs/inode.c | inode->i_next->i_prev = inode; |
inode | 91 | fs/inode.c | struct inode * inode; |
inode | 94 | fs/inode.c | if (!(inode = (struct inode*) get_free_page(GFP_KERNEL))) |
inode | 97 | fs/inode.c | i=PAGE_SIZE / sizeof(struct inode); |
inode | 102 | fs/inode.c | inode->i_next = inode->i_prev = first_inode = inode++, i--; |
inode | 105 | fs/inode.c | insert_inode_free(inode++); |
inode | 115 | fs/inode.c | static void __wait_on_inode(struct inode *); |
inode | 117 | fs/inode.c | static inline void wait_on_inode(struct inode * inode) |
inode | 119 | fs/inode.c | if (inode->i_lock) |
inode | 120 | fs/inode.c | __wait_on_inode(inode); |
inode | 123 | fs/inode.c | static inline void lock_inode(struct inode * inode) |
inode | 125 | fs/inode.c | wait_on_inode(inode); |
inode | 126 | fs/inode.c | inode->i_lock = 1; |
inode | 129 | fs/inode.c | static inline void unlock_inode(struct inode * inode) |
inode | 131 | fs/inode.c | inode->i_lock = 0; |
inode | 132 | fs/inode.c | wake_up(&inode->i_wait); |
inode | 147 | fs/inode.c | void clear_inode(struct inode * inode) |
inode | 151 | fs/inode.c | wait_on_inode(inode); |
inode | 152 | fs/inode.c | remove_inode_hash(inode); |
inode | 153 | fs/inode.c | remove_inode_free(inode); |
inode | 154 | fs/inode.c | wait = ((volatile struct inode *) inode)->i_wait; |
inode | 155 | fs/inode.c | if (inode->i_count) |
inode | 157 | fs/inode.c | memset(inode,0,sizeof(*inode)); |
inode | 158 | fs/inode.c | ((volatile struct inode *) inode)->i_wait = wait; |
inode | 159 | fs/inode.c | insert_inode_free(inode); |
inode | 164 | fs/inode.c | struct inode * inode, * next; |
inode | 169 | fs/inode.c | inode = next; |
inode | 170 | fs/inode.c | next = inode->i_next; /* clear_inode() changes the queues.. */ |
inode | 171 | fs/inode.c | if (inode->i_dev != dev) |
inode | 173 | fs/inode.c | if (inode->i_count || inode->i_dirt || inode->i_lock) |
inode | 175 | fs/inode.c | clear_inode(inode); |
inode | 180 | fs/inode.c | int fs_may_umount(kdev_t dev, struct inode * mount_root) |
inode | 182 | fs/inode.c | struct inode * inode; |
inode | 185 | fs/inode.c | inode = first_inode; |
inode | 186 | fs/inode.c | for (i=0 ; i < nr_inodes ; i++, inode = inode->i_next) { |
inode | 187 | fs/inode.c | if (inode->i_dev != dev || !inode->i_count) |
inode | 189 | fs/inode.c | if (inode == mount_root && inode->i_count == 1) |
inode | 212 | fs/inode.c | static void write_inode(struct inode * inode) |
inode | 214 | fs/inode.c | if (!inode->i_dirt) |
inode | 216 | fs/inode.c | wait_on_inode(inode); |
inode | 217 | fs/inode.c | if (!inode->i_dirt) |
inode | 219 | fs/inode.c | if (!inode->i_sb || !inode->i_sb->s_op || !inode->i_sb->s_op->write_inode) { |
inode | 220 | fs/inode.c | inode->i_dirt = 0; |
inode | 223 | fs/inode.c | inode->i_lock = 1; |
inode | 224 | fs/inode.c | inode->i_sb->s_op->write_inode(inode); |
inode | 225 | fs/inode.c | unlock_inode(inode); |
inode | 228 | fs/inode.c | static inline void read_inode(struct inode * inode) |
inode | 230 | fs/inode.c | lock_inode(inode); |
inode | 231 | fs/inode.c | if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->read_inode) |
inode | 232 | fs/inode.c | inode->i_sb->s_op->read_inode(inode); |
inode | 233 | fs/inode.c | unlock_inode(inode); |
inode | 237 | fs/inode.c | int inode_change_ok(struct inode *inode, struct iattr *attr) |
inode | 241 | fs/inode.c | (current->fsuid != inode->i_uid || |
inode | 242 | fs/inode.c | attr->ia_uid != inode->i_uid) && !fsuser()) |
inode | 247 | fs/inode.c | (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid) && |
inode | 253 | fs/inode.c | if ((current->fsuid != inode->i_uid) && !fsuser()) |
inode | 257 | fs/inode.c | inode->i_gid)) |
inode | 263 | fs/inode.c | ((current->fsuid != inode->i_uid) && !fsuser())) |
inode | 266 | fs/inode.c | ((current->fsuid != inode->i_uid) && !fsuser())) |
inode | 277 | fs/inode.c | void inode_setattr(struct inode *inode, struct iattr *attr) |
inode | 280 | fs/inode.c | inode->i_uid = attr->ia_uid; |
inode | 282 | fs/inode.c | inode->i_gid = attr->ia_gid; |
inode | 284 | fs/inode.c | inode->i_size = attr->ia_size; |
inode | 286 | fs/inode.c | inode->i_atime = attr->ia_atime; |
inode | 288 | fs/inode.c | inode->i_mtime = attr->ia_mtime; |
inode | 290 | fs/inode.c | inode->i_ctime = attr->ia_ctime; |
inode | 292 | fs/inode.c | inode->i_mode = attr->ia_mode; |
inode | 293 | fs/inode.c | if (!fsuser() && !in_group_p(inode->i_gid)) |
inode | 294 | fs/inode.c | inode->i_mode &= ~S_ISGID; |
inode | 296 | fs/inode.c | inode->i_dirt = 1; |
inode | 307 | fs/inode.c | int notify_change(struct inode * inode, struct iattr *attr) |
inode | 311 | fs/inode.c | if (inode->i_sb && inode->i_sb->s_op && |
inode | 312 | fs/inode.c | inode->i_sb->s_op->notify_change) |
inode | 313 | fs/inode.c | return inode->i_sb->s_op->notify_change(inode, attr); |
inode | 315 | fs/inode.c | if ((retval = inode_change_ok(inode, attr)) != 0) |
inode | 318 | fs/inode.c | inode_setattr(inode, attr); |
inode | 332 | fs/inode.c | int bmap(struct inode * inode, int block) |
inode | 334 | fs/inode.c | if (inode->i_op && inode->i_op->bmap) |
inode | 335 | fs/inode.c | return inode->i_op->bmap(inode,block); |
inode | 341 | fs/inode.c | struct inode * inode, * next; |
inode | 346 | fs/inode.c | inode = next; |
inode | 347 | fs/inode.c | next = inode->i_next; /* clear_inode() changes the queues.. */ |
inode | 348 | fs/inode.c | if (inode->i_dev != dev) |
inode | 350 | fs/inode.c | if (inode->i_count || inode->i_dirt || inode->i_lock) { |
inode | 355 | fs/inode.c | clear_inode(inode); |
inode | 362 | fs/inode.c | struct inode * inode; |
inode | 364 | fs/inode.c | inode = first_inode; |
inode | 365 | fs/inode.c | for(i = 0; i < nr_inodes*2; i++, inode = inode->i_next) { |
inode | 366 | fs/inode.c | if (dev && inode->i_dev != dev) |
inode | 368 | fs/inode.c | wait_on_inode(inode); |
inode | 369 | fs/inode.c | if (inode->i_dirt) |
inode | 370 | fs/inode.c | write_inode(inode); |
inode | 374 | fs/inode.c | void iput(struct inode * inode) |
inode | 376 | fs/inode.c | if (!inode) |
inode | 378 | fs/inode.c | wait_on_inode(inode); |
inode | 379 | fs/inode.c | if (!inode->i_count) { |
inode | 382 | fs/inode.c | kdevname(inode->i_rdev), inode->i_ino, inode->i_mode); |
inode | 385 | fs/inode.c | if (inode->i_pipe) |
inode | 386 | fs/inode.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 388 | fs/inode.c | if (inode->i_count>1) { |
inode | 389 | fs/inode.c | inode->i_count--; |
inode | 393 | fs/inode.c | if (inode->i_pipe) { |
inode | 394 | fs/inode.c | unsigned long page = (unsigned long) PIPE_BASE(*inode); |
inode | 395 | fs/inode.c | PIPE_BASE(*inode) = NULL; |
inode | 398 | fs/inode.c | if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->put_inode) { |
inode | 399 | fs/inode.c | inode->i_sb->s_op->put_inode(inode); |
inode | 400 | fs/inode.c | if (!inode->i_nlink) |
inode | 403 | fs/inode.c | if (inode->i_dirt) { |
inode | 404 | fs/inode.c | write_inode(inode); /* we can sleep - so do again */ |
inode | 405 | fs/inode.c | wait_on_inode(inode); |
inode | 408 | fs/inode.c | inode->i_count--; |
inode | 409 | fs/inode.c | if (inode->i_mmap) { |
inode | 411 | fs/inode.c | inode->i_ino, kdevname(inode->i_dev)); |
inode | 412 | fs/inode.c | inode->i_mmap = NULL; |
inode | 418 | fs/inode.c | struct inode * get_empty_inode(void) |
inode | 421 | fs/inode.c | struct inode * inode, * best; |
inode | 427 | fs/inode.c | inode = first_inode; |
inode | 429 | fs/inode.c | for (i = 0; i<nr_inodes; inode = inode->i_next, i++) { |
inode | 430 | fs/inode.c | if (!inode->i_count) { |
inode | 432 | fs/inode.c | best = inode; |
inode | 433 | fs/inode.c | if (!inode->i_dirt && !inode->i_lock) { |
inode | 434 | fs/inode.c | best = inode; |
inode | 444 | fs/inode.c | inode = best; |
inode | 445 | fs/inode.c | if (!inode) { |
inode | 450 | fs/inode.c | if (inode->i_lock) { |
inode | 451 | fs/inode.c | wait_on_inode(inode); |
inode | 454 | fs/inode.c | if (inode->i_dirt) { |
inode | 455 | fs/inode.c | write_inode(inode); |
inode | 458 | fs/inode.c | if (inode->i_count) |
inode | 460 | fs/inode.c | clear_inode(inode); |
inode | 461 | fs/inode.c | inode->i_count = 1; |
inode | 462 | fs/inode.c | inode->i_nlink = 1; |
inode | 463 | fs/inode.c | inode->i_version = ++event; |
inode | 464 | fs/inode.c | inode->i_sem.count = 1; |
inode | 465 | fs/inode.c | inode->i_ino = ++ino; |
inode | 466 | fs/inode.c | inode->i_dev = 0; |
inode | 472 | fs/inode.c | return inode; |
inode | 475 | fs/inode.c | struct inode * get_pipe_inode(void) |
inode | 477 | fs/inode.c | struct inode * inode; |
inode | 480 | fs/inode.c | if (!(inode = get_empty_inode())) |
inode | 482 | fs/inode.c | if (!(PIPE_BASE(*inode) = (char*) __get_free_page(GFP_USER))) { |
inode | 483 | fs/inode.c | iput(inode); |
inode | 486 | fs/inode.c | inode->i_op = &pipe_inode_operations; |
inode | 487 | fs/inode.c | inode->i_count = 2; /* sum of readers/writers */ |
inode | 488 | fs/inode.c | PIPE_WAIT(*inode) = NULL; |
inode | 489 | fs/inode.c | PIPE_START(*inode) = PIPE_LEN(*inode) = 0; |
inode | 490 | fs/inode.c | PIPE_RD_OPENERS(*inode) = PIPE_WR_OPENERS(*inode) = 0; |
inode | 491 | fs/inode.c | PIPE_READERS(*inode) = PIPE_WRITERS(*inode) = 1; |
inode | 492 | fs/inode.c | PIPE_LOCK(*inode) = 0; |
inode | 493 | fs/inode.c | inode->i_pipe = 1; |
inode | 494 | fs/inode.c | inode->i_mode |= S_IFIFO | S_IRUSR | S_IWUSR; |
inode | 495 | fs/inode.c | inode->i_uid = current->fsuid; |
inode | 496 | fs/inode.c | inode->i_gid = current->fsgid; |
inode | 497 | fs/inode.c | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 498 | fs/inode.c | inode->i_blksize = PAGE_SIZE; |
inode | 499 | fs/inode.c | return inode; |
inode | 502 | fs/inode.c | struct inode * __iget(struct super_block * sb, int nr, int crossmntp) |
inode | 506 | fs/inode.c | struct inode * inode; |
inode | 507 | fs/inode.c | struct inode * empty = NULL; |
inode | 513 | fs/inode.c | for (inode = h->inode; inode ; inode = inode->i_hash_next) |
inode | 514 | fs/inode.c | if (inode->i_dev == sb->s_dev && inode->i_ino == nr) |
inode | 525 | fs/inode.c | inode = empty; |
inode | 526 | fs/inode.c | inode->i_sb = sb; |
inode | 527 | fs/inode.c | inode->i_dev = sb->s_dev; |
inode | 528 | fs/inode.c | inode->i_ino = nr; |
inode | 529 | fs/inode.c | inode->i_flags = sb->s_flags; |
inode | 530 | fs/inode.c | put_last_free(inode); |
inode | 531 | fs/inode.c | insert_inode_hash(inode); |
inode | 532 | fs/inode.c | read_inode(inode); |
inode | 536 | fs/inode.c | if (!inode->i_count) |
inode | 538 | fs/inode.c | inode->i_count++; |
inode | 539 | fs/inode.c | wait_on_inode(inode); |
inode | 540 | fs/inode.c | if (inode->i_dev != sb->s_dev || inode->i_ino != nr) { |
inode | 542 | fs/inode.c | iput(inode); |
inode | 545 | fs/inode.c | if (crossmntp && inode->i_mount) { |
inode | 546 | fs/inode.c | struct inode * tmp = inode->i_mount; |
inode | 548 | fs/inode.c | iput(inode); |
inode | 549 | fs/inode.c | inode = tmp; |
inode | 550 | fs/inode.c | wait_on_inode(inode); |
inode | 558 | fs/inode.c | return inode; |
inode | 567 | fs/inode.c | static void __wait_on_inode(struct inode * inode) |
inode | 571 | fs/inode.c | add_wait_queue(&inode->i_wait, &wait); |
inode | 574 | fs/inode.c | if (inode->i_lock) { |
inode | 578 | fs/inode.c | remove_wait_queue(&inode->i_wait, &wait); |
inode | 24 | fs/isofs/dir.c | static int isofs_readdir(struct inode *, struct file *, void *, filldir_t); |
inode | 61 | fs/isofs/dir.c | static int parent_inode_number(struct inode * inode, struct iso_directory_record * de) |
inode | 63 | fs/isofs/dir.c | int inode_number = inode->i_ino; |
inode | 65 | fs/isofs/dir.c | if ((inode->i_sb->u.isofs_sb.s_firstdatazone) != inode->i_ino) |
inode | 66 | fs/isofs/dir.c | inode_number = inode->u.isofs_i.i_backlink; |
inode | 72 | fs/isofs/dir.c | return isofs_lookup_grandparent(inode, find_rock_ridge_relocation(de, inode)); |
inode | 106 | fs/isofs/dir.c | static int do_isofs_readdir(struct inode *inode, struct file *filp, |
inode | 110 | fs/isofs/dir.c | unsigned long bufsize = ISOFS_BUFFER_SIZE(inode); |
inode | 111 | fs/isofs/dir.c | unsigned char bufbits = ISOFS_BUFFER_BITS(inode); |
inode | 121 | fs/isofs/dir.c | block = isofs_bmap(inode, filp->f_pos >> bufbits); |
inode | 126 | fs/isofs/dir.c | if (!(bh = breada(inode->i_dev, block, bufsize, filp->f_pos, inode->i_size))) |
inode | 129 | fs/isofs/dir.c | while (filp->f_pos < inode->i_size) { |
inode | 139 | fs/isofs/dir.c | block = isofs_bmap(inode, (filp->f_pos) >> bufbits); |
inode | 142 | fs/isofs/dir.c | bh = breada(inode->i_dev, block, bufsize, filp->f_pos, inode->i_size); |
inode | 162 | fs/isofs/dir.c | block = isofs_bmap(inode, (filp->f_pos) >> bufbits); |
inode | 165 | fs/isofs/dir.c | bh = breada(inode->i_dev, block, bufsize, filp->f_pos, inode->i_size); |
inode | 179 | fs/isofs/dir.c | block = isofs_bmap(inode, (filp->f_pos + de_len) >> bufbits); |
inode | 182 | fs/isofs/dir.c | bh = breada(inode->i_dev, block, bufsize, filp->f_pos+de_len, inode->i_size); |
inode | 192 | fs/isofs/dir.c | if (filldir(dirent, ".", 1, filp->f_pos, inode->i_ino) < 0) |
inode | 200 | fs/isofs/dir.c | inode_number = parent_inode_number(inode, de); |
inode | 212 | fs/isofs/dir.c | if (inode->i_sb->u.isofs_sb.s_unhide == 'n') { |
inode | 214 | fs/isofs/dir.c | high_sierra = inode->i_sb->u.isofs_sb.s_high_sierra; |
inode | 224 | fs/isofs/dir.c | rrflag = get_rock_ridge_filename(de, &name, &len, inode); |
inode | 229 | fs/isofs/dir.c | dcache_add(inode, name, len, inode_number); |
inode | 238 | fs/isofs/dir.c | if (inode->i_sb->u.isofs_sb.s_mapping == 'n') { |
inode | 242 | fs/isofs/dir.c | dcache_add(inode, tmpname, len, inode_number); |
inode | 250 | fs/isofs/dir.c | dcache_add(inode, name, len, inode_number); |
inode | 263 | fs/isofs/dir.c | static int isofs_readdir(struct inode *inode, struct file *filp, |
inode | 270 | fs/isofs/dir.c | if (!inode || !S_ISDIR(inode->i_mode)) |
inode | 278 | fs/isofs/dir.c | result = do_isofs_readdir(inode, filp, dirent, filldir, tmpname, tmpde); |
inode | 30 | fs/isofs/file.c | static int isofs_file_read(struct inode *, struct file *, char *, int); |
inode | 92 | fs/isofs/file.c | static void isofs_determine_filetype(struct inode * inode) |
inode | 99 | fs/isofs/file.c | block = isofs_bmap(inode,0); |
inode | 100 | fs/isofs/file.c | if (block && (bh = bread(inode->i_dev,block, ISOFS_BUFFER_SIZE(inode)))) { |
inode | 103 | fs/isofs/file.c | for(i=0;i<(inode->i_size < ISOFS_BUFFER_SIZE(inode) ? inode->i_size : ISOFS_BUFFER_SIZE(inode)); |
inode | 113 | fs/isofs/file.c | inode->u.isofs_i.i_file_format = result; |
inode | 117 | fs/isofs/file.c | static int isofs_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 127 | fs/isofs/file.c | if (!inode) { |
inode | 131 | fs/isofs/file.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) { |
inode | 132 | fs/isofs/file.c | printk("isofs_file_read: mode = %07o\n",inode->i_mode); |
inode | 135 | fs/isofs/file.c | if (inode->u.isofs_i.i_file_format == ISOFS_FILE_UNKNOWN) |
inode | 136 | fs/isofs/file.c | isofs_determine_filetype(inode); |
inode | 137 | fs/isofs/file.c | if (filp->f_pos > inode->i_size) |
inode | 140 | fs/isofs/file.c | left = inode->i_size - filp->f_pos; |
inode | 146 | fs/isofs/file.c | block = filp->f_pos >> ISOFS_BUFFER_BITS(inode); |
inode | 147 | fs/isofs/file.c | offset = (inode->u.isofs_i.i_first_extent + filp->f_pos) |
inode | 148 | fs/isofs/file.c | & (ISOFS_BUFFER_SIZE(inode)-1); |
inode | 149 | fs/isofs/file.c | blocks = (left + offset + ISOFS_BUFFER_SIZE(inode) - 1) / ISOFS_BUFFER_SIZE(inode); |
inode | 152 | fs/isofs/file.c | ra_blocks = read_ahead[MAJOR(inode->i_dev)] / (BLOCK_SIZE >> 9); |
inode | 162 | fs/isofs/file.c | total_blocks = (inode->i_size + (1 << ISOFS_BUFFER_BITS(inode)) - 1) |
inode | 163 | fs/isofs/file.c | >> ISOFS_BUFFER_BITS(inode); |
inode | 167 | fs/isofs/file.c | max_block = (inode->i_size + BLOCK_SIZE - 1)/BLOCK_SIZE; |
inode | 185 | fs/isofs/file.c | *bhb = getblk(inode->i_dev,isofs_bmap(inode, block++), ISOFS_BUFFER_SIZE(inode)); |
inode | 219 | fs/isofs/file.c | if (left < ISOFS_BUFFER_SIZE(inode) - offset) |
inode | 222 | fs/isofs/file.c | chars = ISOFS_BUFFER_SIZE(inode) - offset; |
inode | 227 | fs/isofs/file.c | if (inode->u.isofs_i.i_file_format == ISOFS_FILE_TEXT || |
inode | 228 | fs/isofs/file.c | inode->u.isofs_i.i_file_format == ISOFS_FILE_TEXT_M) |
inode | 230 | fs/isofs/file.c | inode->u.isofs_i.i_file_format); |
inode | 157 | fs/isofs/inode.c | struct inode inode_fake; |
inode | 404 | fs/isofs/inode.c | int isofs_bmap(struct inode * inode,int block) |
inode | 411 | fs/isofs/inode.c | return (inode->u.isofs_i.i_first_extent >> ISOFS_BUFFER_BITS(inode)) + block; |
inode | 414 | fs/isofs/inode.c | void isofs_read_inode(struct inode * inode) |
inode | 416 | fs/isofs/inode.c | unsigned long bufsize = ISOFS_BUFFER_SIZE(inode); |
inode | 426 | fs/isofs/inode.c | block = inode->i_ino >> ISOFS_BUFFER_BITS(inode); |
inode | 427 | fs/isofs/inode.c | if (!(bh=bread(inode->i_dev,block, bufsize))) { |
inode | 433 | fs/isofs/inode.c | + (inode->i_ino & (bufsize - 1))); |
inode | 435 | fs/isofs/inode.c | high_sierra = inode->i_sb->u.isofs_sb.s_high_sierra; |
inode | 437 | fs/isofs/inode.c | if ((inode->i_ino & (bufsize - 1)) + *pnt > bufsize){ |
inode | 440 | fs/isofs/inode.c | offset = (inode->i_ino & (bufsize - 1)); |
inode | 444 | fs/isofs/inode.c | printk(KERN_INFO "NoMem ISO inode %lu\n",inode->i_ino); |
inode | 450 | fs/isofs/inode.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) { |
inode | 462 | fs/isofs/inode.c | inode->i_mode = S_IRUGO | S_IXUGO | S_IFDIR; |
inode | 463 | fs/isofs/inode.c | inode->i_nlink = 1; /* Set to 1. We know there are 2, but |
inode | 469 | fs/isofs/inode.c | inode->i_mode = inode->i_sb->u.isofs_sb.s_mode; /* Everybody gets to read the file. */ |
inode | 470 | fs/isofs/inode.c | inode->i_nlink = 1; |
inode | 471 | fs/isofs/inode.c | inode->i_mode |= S_IFREG; |
inode | 477 | fs/isofs/inode.c | inode->i_mode |= S_IXUGO; /* execute permission */ |
inode | 479 | fs/isofs/inode.c | inode->i_uid = inode->i_sb->u.isofs_sb.s_uid; |
inode | 480 | fs/isofs/inode.c | inode->i_gid = inode->i_sb->u.isofs_sb.s_gid; |
inode | 481 | fs/isofs/inode.c | inode->i_size = isonum_733 (raw_inode->size); |
inode | 485 | fs/isofs/inode.c | if((inode->i_size < 0 || inode->i_size > 700000000) && |
inode | 486 | fs/isofs/inode.c | inode->i_sb->u.isofs_sb.s_cruft == 'n') { |
inode | 488 | fs/isofs/inode.c | inode->i_sb->u.isofs_sb.s_cruft = 'y'; |
inode | 495 | fs/isofs/inode.c | if(inode->i_sb->u.isofs_sb.s_cruft == 'y' && |
inode | 496 | fs/isofs/inode.c | inode->i_size & 0xff000000){ |
inode | 498 | fs/isofs/inode.c | inode->i_size &= 0x00ffffff; |
inode | 503 | fs/isofs/inode.c | inode->i_size = 0; |
inode | 509 | fs/isofs/inode.c | printk("File unit size != 0 for ISO file (%ld).\n",inode->i_ino); |
inode | 517 | fs/isofs/inode.c | inode->i_ino, raw_inode->flags[-high_sierra]); |
inode | 522 | fs/isofs/inode.c | printk("Get inode %d: %d %d: %d\n",inode->i_ino, block, |
inode | 523 | fs/isofs/inode.c | ((int)pnt) & 0x3ff, inode->i_size); |
inode | 526 | fs/isofs/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = |
inode | 529 | fs/isofs/inode.c | inode->u.isofs_i.i_first_extent = (isonum_733 (raw_inode->extent) + |
inode | 531 | fs/isofs/inode.c | << inode -> i_sb -> u.isofs_sb.s_log_zone_size; |
inode | 533 | fs/isofs/inode.c | inode->u.isofs_i.i_backlink = 0xffffffff; /* Will be used for previous directory */ |
inode | 534 | fs/isofs/inode.c | switch (inode->i_sb->u.isofs_sb.s_conversion){ |
inode | 536 | fs/isofs/inode.c | inode->u.isofs_i.i_file_format = ISOFS_FILE_UNKNOWN; /* File type */ |
inode | 539 | fs/isofs/inode.c | inode->u.isofs_i.i_file_format = ISOFS_FILE_BINARY; /* File type */ |
inode | 542 | fs/isofs/inode.c | inode->u.isofs_i.i_file_format = ISOFS_FILE_TEXT; /* File type */ |
inode | 545 | fs/isofs/inode.c | inode->u.isofs_i.i_file_format = ISOFS_FILE_TEXT_M; /* File type */ |
inode | 553 | fs/isofs/inode.c | parse_rock_ridge_inode(raw_inode, inode); |
inode | 556 | fs/isofs/inode.c | printk("Inode: %x extent: %x\n",inode->i_ino, inode->u.isofs_i.i_first_extent); |
inode | 560 | fs/isofs/inode.c | inode->i_op = NULL; |
inode | 571 | fs/isofs/inode.c | if (inode->i_sb->u.isofs_sb.s_cruft == 'n' && |
inode | 574 | fs/isofs/inode.c | inode->i_sb->u.isofs_sb.s_cruft = 'y'; |
inode | 577 | fs/isofs/inode.c | if (inode->i_sb->u.isofs_sb.s_cruft != 'y' && |
inode | 581 | fs/isofs/inode.c | if (S_ISREG(inode->i_mode)) |
inode | 582 | fs/isofs/inode.c | inode->i_op = &isofs_file_inode_operations; |
inode | 583 | fs/isofs/inode.c | else if (S_ISDIR(inode->i_mode)) |
inode | 584 | fs/isofs/inode.c | inode->i_op = &isofs_dir_inode_operations; |
inode | 585 | fs/isofs/inode.c | else if (S_ISLNK(inode->i_mode)) |
inode | 586 | fs/isofs/inode.c | inode->i_op = &isofs_symlink_inode_operations; |
inode | 587 | fs/isofs/inode.c | else if (S_ISCHR(inode->i_mode)) |
inode | 588 | fs/isofs/inode.c | inode->i_op = &chrdev_inode_operations; |
inode | 589 | fs/isofs/inode.c | else if (S_ISBLK(inode->i_mode)) |
inode | 590 | fs/isofs/inode.c | inode->i_op = &blkdev_inode_operations; |
inode | 591 | fs/isofs/inode.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 592 | fs/isofs/inode.c | init_fifo(inode); |
inode | 601 | fs/isofs/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = 0; |
inode | 602 | fs/isofs/inode.c | inode->u.isofs_i.i_first_extent = 0; |
inode | 603 | fs/isofs/inode.c | inode->u.isofs_i.i_backlink = 0xffffffff; |
inode | 604 | fs/isofs/inode.c | inode->i_size = 0; |
inode | 605 | fs/isofs/inode.c | inode->i_nlink = 1; |
inode | 606 | fs/isofs/inode.c | inode->i_uid = inode->i_gid = 0; |
inode | 607 | fs/isofs/inode.c | inode->i_mode = S_IFREG; /*Regular file, no one gets to read*/ |
inode | 608 | fs/isofs/inode.c | inode->i_op = NULL; |
inode | 631 | fs/isofs/inode.c | int isofs_lookup_grandparent(struct inode * parent, int extent) |
inode | 61 | fs/isofs/namei.c | static struct buffer_head * isofs_find_entry(struct inode * dir, |
inode | 218 | fs/isofs/namei.c | int isofs_lookup(struct inode * dir,const char * name, int len, |
inode | 219 | fs/isofs/namei.c | struct inode ** result) |
inode | 98 | fs/isofs/rock.c | struct inode * inode) { |
inode | 113 | fs/isofs/rock.c | if (!inode->i_sb->u.isofs_sb.s_rock) return retval; |
inode | 163 | fs/isofs/rock.c | MAYBE_CONTINUE(repeat, inode); |
inode | 171 | fs/isofs/rock.c | char ** name, int * namlen, struct inode * inode) |
inode | 179 | fs/isofs/rock.c | if (!inode->i_sb->u.isofs_sb.s_rock) return 0; |
inode | 231 | fs/isofs/rock.c | printk("RR: RE (%x)\n", inode->i_ino); |
inode | 241 | fs/isofs/rock.c | MAYBE_CONTINUE(repeat,inode); |
inode | 255 | fs/isofs/rock.c | struct inode * inode){ |
inode | 260 | fs/isofs/rock.c | if (!inode->i_sb->u.isofs_sb.s_rock) return 0; |
inode | 266 | fs/isofs/rock.c | struct inode * reloc; |
inode | 296 | fs/isofs/rock.c | inode->i_mode = isonum_733(rr->u.PX.mode); |
inode | 297 | fs/isofs/rock.c | inode->i_nlink = isonum_733(rr->u.PX.n_links); |
inode | 298 | fs/isofs/rock.c | inode->i_uid = isonum_733(rr->u.PX.uid); |
inode | 299 | fs/isofs/rock.c | inode->i_gid = isonum_733(rr->u.PX.gid); |
inode | 313 | fs/isofs/rock.c | inode->i_rdev = MKDEV(low >> 8, low & 0xff); |
inode | 315 | fs/isofs/rock.c | inode->i_rdev = MKDEV(high, low); |
inode | 324 | fs/isofs/rock.c | inode->i_ctime = iso_date(rr->u.TF.times[cnt++].time, 0); |
inode | 326 | fs/isofs/rock.c | inode->i_mtime = iso_date(rr->u.TF.times[cnt++].time, 0); |
inode | 328 | fs/isofs/rock.c | inode->i_atime = iso_date(rr->u.TF.times[cnt++].time, 0); |
inode | 330 | fs/isofs/rock.c | inode->i_ctime = iso_date(rr->u.TF.times[cnt++].time, 0); |
inode | 337 | fs/isofs/rock.c | inode->i_size = 0; |
inode | 342 | fs/isofs/rock.c | inode->i_size += slp->len; |
inode | 345 | fs/isofs/rock.c | inode->i_size += 1; |
inode | 348 | fs/isofs/rock.c | inode->i_size += 2; |
inode | 352 | fs/isofs/rock.c | inode->i_size += 1; |
inode | 361 | fs/isofs/rock.c | if(!rootflag) inode->i_size += 1; |
inode | 370 | fs/isofs/rock.c | printk("RR CL (%x)\n",inode->i_ino); |
inode | 372 | fs/isofs/rock.c | inode->u.isofs_i.i_first_extent = isonum_733(rr->u.CL.location) << |
inode | 373 | fs/isofs/rock.c | inode -> i_sb -> u.isofs_sb.s_log_zone_size; |
inode | 374 | fs/isofs/rock.c | reloc = iget(inode->i_sb, inode->u.isofs_i.i_first_extent); |
inode | 375 | fs/isofs/rock.c | inode->i_mode = reloc->i_mode; |
inode | 376 | fs/isofs/rock.c | inode->i_nlink = reloc->i_nlink; |
inode | 377 | fs/isofs/rock.c | inode->i_uid = reloc->i_uid; |
inode | 378 | fs/isofs/rock.c | inode->i_gid = reloc->i_gid; |
inode | 379 | fs/isofs/rock.c | inode->i_rdev = reloc->i_rdev; |
inode | 380 | fs/isofs/rock.c | inode->i_size = reloc->i_size; |
inode | 381 | fs/isofs/rock.c | inode->i_atime = reloc->i_atime; |
inode | 382 | fs/isofs/rock.c | inode->i_ctime = reloc->i_ctime; |
inode | 383 | fs/isofs/rock.c | inode->i_mtime = reloc->i_mtime; |
inode | 391 | fs/isofs/rock.c | MAYBE_CONTINUE(repeat,inode); |
inode | 402 | fs/isofs/rock.c | char * get_rock_ridge_symlink(struct inode * inode) |
inode | 404 | fs/isofs/rock.c | unsigned long bufsize = ISOFS_BUFFER_SIZE(inode); |
inode | 405 | fs/isofs/rock.c | unsigned char bufbits = ISOFS_BUFFER_BITS(inode); |
inode | 419 | fs/isofs/rock.c | if (!inode->i_sb->u.isofs_sb.s_rock) |
inode | 424 | fs/isofs/rock.c | block = inode->i_ino >> bufbits; |
inode | 425 | fs/isofs/rock.c | if (!(bh=bread(inode->i_dev,block, bufsize))) { |
inode | 430 | fs/isofs/rock.c | pnt = ((unsigned char *) bh->b_data) + (inode->i_ino & (bufsize - 1)); |
inode | 434 | fs/isofs/rock.c | if ((inode->i_ino & (bufsize - 1)) + *pnt > bufsize){ |
inode | 437 | fs/isofs/rock.c | offset = (inode->i_ino & (bufsize - 1)); |
inode | 443 | fs/isofs/rock.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) { |
inode | 482 | fs/isofs/rock.c | rpnt = (char *) kmalloc (inode->i_size +1, GFP_KERNEL); |
inode | 516 | fs/isofs/rock.c | MAYBE_CONTINUE(repeat,inode); |
inode | 21 | fs/isofs/symlink.c | static int isofs_readlink(struct inode *, char *, int); |
inode | 22 | fs/isofs/symlink.c | static int isofs_follow_link(struct inode *, struct inode *, int, int, struct inode **); |
inode | 45 | fs/isofs/symlink.c | static int isofs_follow_link(struct inode * dir, struct inode * inode, |
inode | 46 | fs/isofs/symlink.c | int flag, int mode, struct inode ** res_inode) |
inode | 55 | fs/isofs/symlink.c | if (!inode) { |
inode | 60 | fs/isofs/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 62 | fs/isofs/symlink.c | *res_inode = inode; |
inode | 66 | fs/isofs/symlink.c | !(pnt = get_rock_ridge_symlink(inode))) { |
inode | 68 | fs/isofs/symlink.c | iput(inode); |
inode | 72 | fs/isofs/symlink.c | iput(inode); |
inode | 80 | fs/isofs/symlink.c | static int isofs_readlink(struct inode * inode, char * buffer, int buflen) |
inode | 86 | fs/isofs/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 87 | fs/isofs/symlink.c | iput(inode); |
inode | 93 | fs/isofs/symlink.c | pnt = get_rock_ridge_symlink(inode); |
inode | 95 | fs/isofs/symlink.c | iput(inode); |
inode | 122 | fs/minix/bitmap.c | void minix_free_inode(struct inode * inode) |
inode | 127 | fs/minix/bitmap.c | if (!inode) |
inode | 129 | fs/minix/bitmap.c | if (!inode->i_dev) { |
inode | 133 | fs/minix/bitmap.c | if (inode->i_count != 1) { |
inode | 134 | fs/minix/bitmap.c | printk("free_inode: inode has count=%d\n",inode->i_count); |
inode | 137 | fs/minix/bitmap.c | if (inode->i_nlink) { |
inode | 138 | fs/minix/bitmap.c | printk("free_inode: inode has nlink=%d\n",inode->i_nlink); |
inode | 141 | fs/minix/bitmap.c | if (!inode->i_sb) { |
inode | 145 | fs/minix/bitmap.c | if (inode->i_ino < 1 || inode->i_ino >= inode->i_sb->u.minix_sb.s_ninodes) { |
inode | 149 | fs/minix/bitmap.c | ino = inode->i_ino; |
inode | 150 | fs/minix/bitmap.c | if (!(bh=inode->i_sb->u.minix_sb.s_imap[ino >> 13])) { |
inode | 154 | fs/minix/bitmap.c | clear_inode(inode); |
inode | 160 | fs/minix/bitmap.c | struct inode * minix_new_inode(const struct inode * dir) |
inode | 163 | fs/minix/bitmap.c | struct inode * inode; |
inode | 167 | fs/minix/bitmap.c | if (!dir || !(inode = get_empty_inode())) |
inode | 170 | fs/minix/bitmap.c | inode->i_sb = sb; |
inode | 171 | fs/minix/bitmap.c | inode->i_flags = inode->i_sb->s_flags; |
inode | 174 | fs/minix/bitmap.c | if ((bh = inode->i_sb->u.minix_sb.s_imap[i]) != NULL) |
inode | 178 | fs/minix/bitmap.c | iput(inode); |
inode | 183 | fs/minix/bitmap.c | iput(inode); |
inode | 188 | fs/minix/bitmap.c | if (!j || j >= inode->i_sb->u.minix_sb.s_ninodes) { |
inode | 189 | fs/minix/bitmap.c | iput(inode); |
inode | 192 | fs/minix/bitmap.c | inode->i_count = 1; |
inode | 193 | fs/minix/bitmap.c | inode->i_nlink = 1; |
inode | 194 | fs/minix/bitmap.c | inode->i_dev = sb->s_dev; |
inode | 195 | fs/minix/bitmap.c | inode->i_uid = current->fsuid; |
inode | 196 | fs/minix/bitmap.c | inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; |
inode | 197 | fs/minix/bitmap.c | inode->i_dirt = 1; |
inode | 198 | fs/minix/bitmap.c | inode->i_ino = j; |
inode | 199 | fs/minix/bitmap.c | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
inode | 200 | fs/minix/bitmap.c | inode->i_op = NULL; |
inode | 201 | fs/minix/bitmap.c | inode->i_blocks = inode->i_blksize = 0; |
inode | 202 | fs/minix/bitmap.c | insert_inode_hash(inode); |
inode | 203 | fs/minix/bitmap.c | return inode; |
inode | 17 | fs/minix/dir.c | static int minix_dir_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 22 | fs/minix/dir.c | static int minix_readdir(struct inode *, struct file *, void *, filldir_t); |
inode | 58 | fs/minix/dir.c | static int minix_readdir(struct inode * inode, struct file * filp, |
inode | 66 | fs/minix/dir.c | if (!inode || !inode->i_sb || !S_ISDIR(inode->i_mode)) |
inode | 68 | fs/minix/dir.c | info = &inode->i_sb->u.minix_sb; |
inode | 71 | fs/minix/dir.c | while (filp->f_pos < inode->i_size) { |
inode | 73 | fs/minix/dir.c | bh = minix_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
inode | 80 | fs/minix/dir.c | if (de->inode) { |
inode | 82 | fs/minix/dir.c | if (filldir(dirent, de->name, size, filp->f_pos, de->inode) < 0) { |
inode | 89 | fs/minix/dir.c | } while (offset < 1024 && filp->f_pos < inode->i_size); |
inode | 28 | fs/minix/file.c | static int minix_file_read(struct inode *, struct file *, char *, int); |
inode | 29 | fs/minix/file.c | static int minix_file_write(struct inode *, struct file *, const char *, int); |
inode | 66 | fs/minix/file.c | static int minix_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 76 | fs/minix/file.c | if (!inode) { |
inode | 80 | fs/minix/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 81 | fs/minix/file.c | printk("minix_file_read: mode = %07o\n",inode->i_mode); |
inode | 85 | fs/minix/file.c | size = inode->i_size; |
inode | 101 | fs/minix/file.c | if(blocks < read_ahead[MAJOR(inode->i_dev)] / (BLOCK_SIZE >> 9)) |
inode | 102 | fs/minix/file.c | blocks = read_ahead[MAJOR(inode->i_dev)] / (BLOCK_SIZE >> 9); |
inode | 122 | fs/minix/file.c | *bhb = minix_getblk(inode, block++, 0); |
inode | 184 | fs/minix/file.c | if (!IS_RDONLY(inode)) |
inode | 185 | fs/minix/file.c | inode->i_atime = CURRENT_TIME; |
inode | 189 | fs/minix/file.c | static int minix_file_write(struct inode * inode, struct file * filp, const char * buf, int count) |
inode | 196 | fs/minix/file.c | if (!inode) { |
inode | 200 | fs/minix/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 201 | fs/minix/file.c | printk("minix_file_write: mode = %07o\n",inode->i_mode); |
inode | 204 | fs/minix/file.c | down(&inode->i_sem); |
inode | 206 | fs/minix/file.c | pos = inode->i_size; |
inode | 211 | fs/minix/file.c | bh = minix_getblk(inode,pos/BLOCK_SIZE,1); |
inode | 239 | fs/minix/file.c | if (pos > inode->i_size) |
inode | 240 | fs/minix/file.c | inode->i_size = pos; |
inode | 241 | fs/minix/file.c | up(&inode->i_sem); |
inode | 242 | fs/minix/file.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 244 | fs/minix/file.c | inode->i_dirt = 1; |
inode | 26 | fs/minix/fsync.c | static int sync_block (struct inode * inode, unsigned short * block, int wait) |
inode | 34 | fs/minix/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
inode | 55 | fs/minix/fsync.c | static int sync_iblock (struct inode * inode, unsigned short * iblock, |
inode | 65 | fs/minix/fsync.c | rc = sync_block (inode, iblock, wait); |
inode | 68 | fs/minix/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
inode | 80 | fs/minix/fsync.c | static int sync_direct(struct inode *inode, int wait) |
inode | 86 | fs/minix/fsync.c | rc = sync_block (inode, inode->u.minix_i.i_data + i, wait); |
inode | 95 | fs/minix/fsync.c | static int sync_indirect(struct inode *inode, unsigned short *iblock, int wait) |
inode | 101 | fs/minix/fsync.c | rc = sync_iblock (inode, iblock, &ind_bh, wait); |
inode | 106 | fs/minix/fsync.c | rc = sync_block (inode, |
inode | 118 | fs/minix/fsync.c | static int sync_dindirect(struct inode *inode, unsigned short *diblock, |
inode | 125 | fs/minix/fsync.c | rc = sync_iblock (inode, diblock, &dind_bh, wait); |
inode | 130 | fs/minix/fsync.c | rc = sync_indirect (inode, |
inode | 142 | fs/minix/fsync.c | int minix_sync_file(struct inode * inode, struct file * file) |
inode | 146 | fs/minix/fsync.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 147 | fs/minix/fsync.c | S_ISLNK(inode->i_mode))) |
inode | 152 | fs/minix/fsync.c | err |= sync_direct(inode, wait); |
inode | 153 | fs/minix/fsync.c | err |= sync_indirect(inode, inode->u.minix_i.i_data+7, wait); |
inode | 154 | fs/minix/fsync.c | err |= sync_dindirect(inode, inode->u.minix_i.i_data+8, wait); |
inode | 156 | fs/minix/fsync.c | err |= minix_sync_inode (inode); |
inode | 21 | fs/minix/inode.c | void minix_put_inode(struct inode *inode) |
inode | 23 | fs/minix/inode.c | if (inode->i_nlink) |
inode | 25 | fs/minix/inode.c | inode->i_size = 0; |
inode | 26 | fs/minix/inode.c | minix_truncate(inode); |
inode | 27 | fs/minix/inode.c | minix_free_inode(inode); |
inode | 238 | fs/minix/inode.c | #define inode_bmap(inode,nr) ((inode)->u.minix_i.i_data[(nr)]) |
inode | 251 | fs/minix/inode.c | int minix_bmap(struct inode * inode,int block) |
inode | 264 | fs/minix/inode.c | return inode_bmap(inode,block); |
inode | 267 | fs/minix/inode.c | i = inode_bmap(inode,7); |
inode | 270 | fs/minix/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block); |
inode | 273 | fs/minix/inode.c | i = inode_bmap(inode,8); |
inode | 276 | fs/minix/inode.c | i = block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block>>9); |
inode | 279 | fs/minix/inode.c | return block_bmap(bread(inode->i_dev,i,BLOCK_SIZE),block & 511); |
inode | 282 | fs/minix/inode.c | static struct buffer_head * inode_getblk(struct inode * inode, int nr, int create) |
inode | 288 | fs/minix/inode.c | p = inode->u.minix_i.i_data + nr; |
inode | 292 | fs/minix/inode.c | result = getblk(inode->i_dev, tmp, BLOCK_SIZE); |
inode | 300 | fs/minix/inode.c | tmp = minix_new_block(inode->i_sb); |
inode | 303 | fs/minix/inode.c | result = getblk(inode->i_dev, tmp, BLOCK_SIZE); |
inode | 305 | fs/minix/inode.c | minix_free_block(inode->i_sb,tmp); |
inode | 310 | fs/minix/inode.c | inode->i_ctime = CURRENT_TIME; |
inode | 311 | fs/minix/inode.c | inode->i_dirt = 1; |
inode | 315 | fs/minix/inode.c | static struct buffer_head * block_getblk(struct inode * inode, |
inode | 348 | fs/minix/inode.c | tmp = minix_new_block(inode->i_sb); |
inode | 355 | fs/minix/inode.c | minix_free_block(inode->i_sb,tmp); |
inode | 365 | fs/minix/inode.c | struct buffer_head * minix_getblk(struct inode * inode, int block, int create) |
inode | 378 | fs/minix/inode.c | return inode_getblk(inode,block,create); |
inode | 381 | fs/minix/inode.c | bh = inode_getblk(inode,7,create); |
inode | 382 | fs/minix/inode.c | return block_getblk(inode, bh, block, create); |
inode | 385 | fs/minix/inode.c | bh = inode_getblk(inode,8,create); |
inode | 386 | fs/minix/inode.c | bh = block_getblk(inode, bh, block>>9, create); |
inode | 387 | fs/minix/inode.c | return block_getblk(inode, bh, block & 511, create); |
inode | 390 | fs/minix/inode.c | struct buffer_head * minix_bread(struct inode * inode, int block, int create) |
inode | 394 | fs/minix/inode.c | bh = minix_getblk(inode,block,create); |
inode | 405 | fs/minix/inode.c | void minix_read_inode(struct inode * inode) |
inode | 411 | fs/minix/inode.c | ino = inode->i_ino; |
inode | 412 | fs/minix/inode.c | inode->i_op = NULL; |
inode | 413 | fs/minix/inode.c | inode->i_mode = 0; |
inode | 414 | fs/minix/inode.c | if (!ino || ino >= inode->i_sb->u.minix_sb.s_ninodes) { |
inode | 417 | fs/minix/inode.c | kdevname(inode->i_dev), ino); |
inode | 420 | fs/minix/inode.c | block = 2 + inode->i_sb->u.minix_sb.s_imap_blocks + |
inode | 421 | fs/minix/inode.c | inode->i_sb->u.minix_sb.s_zmap_blocks + |
inode | 423 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,block, BLOCK_SIZE))) { |
inode | 425 | fs/minix/inode.c | "%s\n", kdevname(inode->i_dev)); |
inode | 430 | fs/minix/inode.c | inode->i_mode = raw_inode->i_mode; |
inode | 431 | fs/minix/inode.c | inode->i_uid = raw_inode->i_uid; |
inode | 432 | fs/minix/inode.c | inode->i_gid = raw_inode->i_gid; |
inode | 433 | fs/minix/inode.c | inode->i_nlink = raw_inode->i_nlinks; |
inode | 434 | fs/minix/inode.c | inode->i_size = raw_inode->i_size; |
inode | 435 | fs/minix/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = raw_inode->i_time; |
inode | 436 | fs/minix/inode.c | inode->i_blocks = inode->i_blksize = 0; |
inode | 437 | fs/minix/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 438 | fs/minix/inode.c | inode->i_rdev = to_kdev_t(raw_inode->i_zone[0]); |
inode | 440 | fs/minix/inode.c | inode->u.minix_i.i_data[block] = raw_inode->i_zone[block]; |
inode | 442 | fs/minix/inode.c | if (S_ISREG(inode->i_mode)) |
inode | 443 | fs/minix/inode.c | inode->i_op = &minix_file_inode_operations; |
inode | 444 | fs/minix/inode.c | else if (S_ISDIR(inode->i_mode)) |
inode | 445 | fs/minix/inode.c | inode->i_op = &minix_dir_inode_operations; |
inode | 446 | fs/minix/inode.c | else if (S_ISLNK(inode->i_mode)) |
inode | 447 | fs/minix/inode.c | inode->i_op = &minix_symlink_inode_operations; |
inode | 448 | fs/minix/inode.c | else if (S_ISCHR(inode->i_mode)) |
inode | 449 | fs/minix/inode.c | inode->i_op = &chrdev_inode_operations; |
inode | 450 | fs/minix/inode.c | else if (S_ISBLK(inode->i_mode)) |
inode | 451 | fs/minix/inode.c | inode->i_op = &blkdev_inode_operations; |
inode | 452 | fs/minix/inode.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 453 | fs/minix/inode.c | init_fifo(inode); |
inode | 456 | fs/minix/inode.c | static struct buffer_head * minix_update_inode(struct inode * inode) |
inode | 462 | fs/minix/inode.c | ino = inode->i_ino; |
inode | 463 | fs/minix/inode.c | if (!ino || ino >= inode->i_sb->u.minix_sb.s_ninodes) { |
inode | 466 | fs/minix/inode.c | kdevname(inode->i_dev), ino); |
inode | 467 | fs/minix/inode.c | inode->i_dirt = 0; |
inode | 470 | 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 | 472 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) { |
inode | 474 | fs/minix/inode.c | inode->i_dirt = 0; |
inode | 479 | fs/minix/inode.c | raw_inode->i_mode = inode->i_mode; |
inode | 480 | fs/minix/inode.c | raw_inode->i_uid = inode->i_uid; |
inode | 481 | fs/minix/inode.c | raw_inode->i_gid = inode->i_gid; |
inode | 482 | fs/minix/inode.c | raw_inode->i_nlinks = inode->i_nlink; |
inode | 483 | fs/minix/inode.c | raw_inode->i_size = inode->i_size; |
inode | 484 | fs/minix/inode.c | raw_inode->i_time = inode->i_mtime; |
inode | 485 | fs/minix/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 486 | fs/minix/inode.c | raw_inode->i_zone[0] = kdev_t_to_nr(inode->i_rdev); |
inode | 488 | fs/minix/inode.c | raw_inode->i_zone[block] = inode->u.minix_i.i_data[block]; |
inode | 489 | fs/minix/inode.c | inode->i_dirt=0; |
inode | 494 | fs/minix/inode.c | void minix_write_inode(struct inode * inode) |
inode | 497 | fs/minix/inode.c | bh = minix_update_inode(inode); |
inode | 501 | fs/minix/inode.c | int minix_sync_inode(struct inode * inode) |
inode | 506 | fs/minix/inode.c | bh = minix_update_inode(inode); |
inode | 515 | fs/minix/inode.c | kdevname(inode->i_dev), inode->i_ino); |
inode | 48 | fs/minix/namei.c | if (!de->inode || len > info->s_namelen) |
inode | 64 | 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 int minix_add_entry(struct inode * dir, |
inode | 181 | fs/minix/namei.c | de->inode = 0; |
inode | 185 | fs/minix/namei.c | if (de->inode) { |
inode | 211 | fs/minix/namei.c | int minix_create(struct inode * dir,const char * name, int len, int mode, |
inode | 212 | fs/minix/namei.c | struct inode ** result) |
inode | 215 | fs/minix/namei.c | struct inode * inode; |
inode | 222 | fs/minix/namei.c | inode = minix_new_inode(dir); |
inode | 223 | fs/minix/namei.c | if (!inode) { |
inode | 227 | fs/minix/namei.c | inode->i_op = &minix_file_inode_operations; |
inode | 228 | fs/minix/namei.c | inode->i_mode = mode; |
inode | 229 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 232 | fs/minix/namei.c | inode->i_nlink--; |
inode | 233 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 234 | fs/minix/namei.c | iput(inode); |
inode | 238 | fs/minix/namei.c | de->inode = inode->i_ino; |
inode | 242 | fs/minix/namei.c | *result = inode; |
inode | 246 | fs/minix/namei.c | int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev) |
inode | 249 | fs/minix/namei.c | struct inode * inode; |
inode | 261 | fs/minix/namei.c | inode = minix_new_inode(dir); |
inode | 262 | fs/minix/namei.c | if (!inode) { |
inode | 266 | fs/minix/namei.c | inode->i_uid = current->fsuid; |
inode | 267 | fs/minix/namei.c | inode->i_mode = mode; |
inode | 268 | fs/minix/namei.c | inode->i_op = NULL; |
inode | 269 | fs/minix/namei.c | if (S_ISREG(inode->i_mode)) |
inode | 270 | fs/minix/namei.c | inode->i_op = &minix_file_inode_operations; |
inode | 271 | fs/minix/namei.c | else if (S_ISDIR(inode->i_mode)) { |
inode | 272 | fs/minix/namei.c | inode->i_op = &minix_dir_inode_operations; |
inode | 274 | fs/minix/namei.c | inode->i_mode |= S_ISGID; |
inode | 276 | fs/minix/namei.c | else if (S_ISLNK(inode->i_mode)) |
inode | 277 | fs/minix/namei.c | inode->i_op = &minix_symlink_inode_operations; |
inode | 278 | fs/minix/namei.c | else if (S_ISCHR(inode->i_mode)) |
inode | 279 | fs/minix/namei.c | inode->i_op = &chrdev_inode_operations; |
inode | 280 | fs/minix/namei.c | else if (S_ISBLK(inode->i_mode)) |
inode | 281 | fs/minix/namei.c | inode->i_op = &blkdev_inode_operations; |
inode | 282 | fs/minix/namei.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 283 | fs/minix/namei.c | init_fifo(inode); |
inode | 285 | fs/minix/namei.c | inode->i_rdev = to_kdev_t(rdev); |
inode | 286 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 289 | fs/minix/namei.c | inode->i_nlink--; |
inode | 290 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 291 | fs/minix/namei.c | iput(inode); |
inode | 295 | fs/minix/namei.c | de->inode = inode->i_ino; |
inode | 299 | fs/minix/namei.c | iput(inode); |
inode | 303 | fs/minix/namei.c | int minix_mkdir(struct inode * dir, const char * name, int len, int mode) |
inode | 306 | fs/minix/namei.c | struct inode * inode; |
inode | 326 | fs/minix/namei.c | inode = minix_new_inode(dir); |
inode | 327 | fs/minix/namei.c | if (!inode) { |
inode | 331 | fs/minix/namei.c | inode->i_op = &minix_dir_inode_operations; |
inode | 332 | fs/minix/namei.c | inode->i_size = 2 * info->s_dirsize; |
inode | 333 | fs/minix/namei.c | dir_block = minix_bread(inode,0,1); |
inode | 336 | fs/minix/namei.c | inode->i_nlink--; |
inode | 337 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 338 | fs/minix/namei.c | iput(inode); |
inode | 342 | fs/minix/namei.c | de->inode=inode->i_ino; |
inode | 345 | fs/minix/namei.c | de->inode = dir->i_ino; |
inode | 347 | fs/minix/namei.c | inode->i_nlink = 2; |
inode | 350 | fs/minix/namei.c | inode->i_mode = S_IFDIR | (mode & 0777 & ~current->fs->umask); |
inode | 352 | fs/minix/namei.c | inode->i_mode |= S_ISGID; |
inode | 353 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 357 | fs/minix/namei.c | inode->i_nlink=0; |
inode | 358 | fs/minix/namei.c | iput(inode); |
inode | 361 | fs/minix/namei.c | de->inode = inode->i_ino; |
inode | 366 | fs/minix/namei.c | iput(inode); |
inode | 374 | fs/minix/namei.c | static int empty_dir(struct inode * inode) |
inode | 381 | fs/minix/namei.c | if (!inode || !inode->i_sb) |
inode | 383 | fs/minix/namei.c | info = &inode->i_sb->u.minix_sb; |
inode | 387 | fs/minix/namei.c | if (inode->i_size & (info->s_dirsize-1)) |
inode | 389 | fs/minix/namei.c | if (inode->i_size < offset) |
inode | 391 | fs/minix/namei.c | bh = minix_bread(inode,0,0); |
inode | 395 | fs/minix/namei.c | if (!de->inode || strcmp(de->name,".")) |
inode | 398 | fs/minix/namei.c | if (!de->inode || strcmp(de->name,"..")) |
inode | 400 | fs/minix/namei.c | while (block*BLOCK_SIZE+offset < inode->i_size) { |
inode | 402 | fs/minix/namei.c | bh = minix_bread(inode,block,0); |
inode | 410 | fs/minix/namei.c | if (de->inode) { |
inode | 426 | fs/minix/namei.c | kdevname(inode->i_dev)); |
inode | 430 | fs/minix/namei.c | int minix_rmdir(struct inode * dir, const char * name, int len) |
inode | 433 | fs/minix/namei.c | struct inode * inode; |
inode | 437 | fs/minix/namei.c | inode = NULL; |
inode | 443 | fs/minix/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
inode | 446 | fs/minix/namei.c | current->fsuid != inode->i_uid && |
inode | 449 | fs/minix/namei.c | if (inode->i_dev != dir->i_dev) |
inode | 451 | fs/minix/namei.c | if (inode == dir) /* we may not delete ".", but "../dir" is ok */ |
inode | 453 | fs/minix/namei.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 457 | fs/minix/namei.c | if (!empty_dir(inode)) { |
inode | 461 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
inode | 465 | fs/minix/namei.c | if (inode->i_count > 1) { |
inode | 469 | fs/minix/namei.c | if (inode->i_nlink != 2) |
inode | 470 | fs/minix/namei.c | printk("empty directory has nlink!=2 (%d)\n",inode->i_nlink); |
inode | 471 | fs/minix/namei.c | de->inode = 0; |
inode | 474 | fs/minix/namei.c | inode->i_nlink=0; |
inode | 475 | fs/minix/namei.c | inode->i_dirt=1; |
inode | 476 | fs/minix/namei.c | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
inode | 482 | fs/minix/namei.c | iput(inode); |
inode | 487 | fs/minix/namei.c | int minix_unlink(struct inode * dir, const char * name, int len) |
inode | 490 | fs/minix/namei.c | struct inode * inode; |
inode | 496 | fs/minix/namei.c | inode = NULL; |
inode | 500 | fs/minix/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
inode | 503 | fs/minix/namei.c | if (S_ISDIR(inode->i_mode)) |
inode | 505 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
inode | 506 | fs/minix/namei.c | iput(inode); |
inode | 513 | fs/minix/namei.c | current->fsuid != inode->i_uid && |
inode | 516 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
inode | 520 | fs/minix/namei.c | if (!inode->i_nlink) { |
inode | 522 | fs/minix/namei.c | kdevname(inode->i_dev), |
inode | 523 | fs/minix/namei.c | inode->i_ino, inode->i_nlink); |
inode | 524 | fs/minix/namei.c | inode->i_nlink=1; |
inode | 526 | fs/minix/namei.c | de->inode = 0; |
inode | 531 | fs/minix/namei.c | inode->i_nlink--; |
inode | 532 | fs/minix/namei.c | inode->i_ctime = dir->i_ctime; |
inode | 533 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 537 | fs/minix/namei.c | iput(inode); |
inode | 542 | fs/minix/namei.c | int minix_symlink(struct inode * dir, const char * name, int len, const char * symname) |
inode | 545 | fs/minix/namei.c | struct inode * inode = NULL; |
inode | 550 | fs/minix/namei.c | if (!(inode = minix_new_inode(dir))) { |
inode | 554 | fs/minix/namei.c | inode->i_mode = S_IFLNK | 0777; |
inode | 555 | fs/minix/namei.c | inode->i_op = &minix_symlink_inode_operations; |
inode | 556 | fs/minix/namei.c | name_block = minix_bread(inode,0,1); |
inode | 559 | fs/minix/namei.c | inode->i_nlink--; |
inode | 560 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 561 | fs/minix/namei.c | iput(inode); |
inode | 570 | fs/minix/namei.c | inode->i_size = i; |
inode | 571 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 574 | fs/minix/namei.c | inode->i_nlink--; |
inode | 575 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 576 | fs/minix/namei.c | iput(inode); |
inode | 583 | fs/minix/namei.c | inode->i_nlink--; |
inode | 584 | fs/minix/namei.c | inode->i_dirt = 1; |
inode | 585 | fs/minix/namei.c | iput(inode); |
inode | 589 | fs/minix/namei.c | de->inode = inode->i_ino; |
inode | 593 | fs/minix/namei.c | iput(inode); |
inode | 597 | fs/minix/namei.c | int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len) |
inode | 626 | fs/minix/namei.c | de->inode = oldinode->i_ino; |
inode | 637 | fs/minix/namei.c | static int subdir(struct inode * new_inode, struct inode * old_inode) |
inode | 662 | fs/minix/namei.c | (((struct minix_dir_entry *) ((buffer)+info->s_dirsize))->inode) |
inode | 674 | fs/minix/namei.c | static int do_minix_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 675 | fs/minix/namei.c | struct inode * new_dir, const char * new_name, int new_len) |
inode | 677 | fs/minix/namei.c | struct inode * old_inode, * new_inode; |
inode | 700 | fs/minix/namei.c | old_inode = __iget(old_dir->i_sb, old_de->inode,0); /* don't cross mnt-points */ |
inode | 710 | fs/minix/namei.c | new_inode = __iget(new_dir->i_sb, new_de->inode, 0); |
inode | 762 | fs/minix/namei.c | if (new_inode && (new_de->inode != new_inode->i_ino)) |
inode | 764 | fs/minix/namei.c | if (new_de->inode && !new_inode) |
inode | 766 | fs/minix/namei.c | if (old_de->inode != old_inode->i_ino) |
inode | 769 | fs/minix/namei.c | old_de->inode = 0; |
inode | 770 | fs/minix/namei.c | new_de->inode = old_inode->i_ino; |
inode | 818 | fs/minix/namei.c | int minix_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 819 | 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 int minix_follow_link(struct inode *, struct inode *, int, int, struct inode **); |
inode | 41 | fs/minix/symlink.c | static int minix_follow_link(struct inode * dir, struct inode * inode, |
inode | 42 | fs/minix/symlink.c | int flag, int mode, struct inode ** res_inode) |
inode | 52 | fs/minix/symlink.c | if (!inode) { |
inode | 56 | fs/minix/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 58 | fs/minix/symlink.c | *res_inode = inode; |
inode | 62 | fs/minix/symlink.c | iput(inode); |
inode | 66 | fs/minix/symlink.c | if (!(bh = minix_bread(inode, 0, 0))) { |
inode | 67 | fs/minix/symlink.c | iput(inode); |
inode | 71 | fs/minix/symlink.c | iput(inode); |
inode | 79 | fs/minix/symlink.c | static int minix_readlink(struct inode * inode, char * buffer, int buflen) |
inode | 85 | fs/minix/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 86 | fs/minix/symlink.c | iput(inode); |
inode | 91 | fs/minix/symlink.c | bh = minix_bread(inode, 0, 0); |
inode | 92 | fs/minix/symlink.c | iput(inode); |
inode | 26 | fs/minix/truncate.c | static int trunc_direct(struct inode * inode) |
inode | 32 | fs/minix/truncate.c | #define DIRECT_BLOCK ((inode->i_size + 1023) >> 10) |
inode | 36 | fs/minix/truncate.c | p = i + inode->u.minix_i.i_data; |
inode | 39 | fs/minix/truncate.c | bh = get_hash_table(inode->i_dev,tmp,BLOCK_SIZE); |
inode | 50 | fs/minix/truncate.c | inode->i_dirt = 1; |
inode | 55 | fs/minix/truncate.c | minix_free_block(inode->i_sb,tmp); |
inode | 60 | fs/minix/truncate.c | static int trunc_indirect(struct inode * inode, int offset, unsigned short * p) |
inode | 72 | fs/minix/truncate.c | ind_bh = bread(inode->i_dev, tmp, BLOCK_SIZE); |
inode | 91 | fs/minix/truncate.c | bh = get_hash_table(inode->i_dev,tmp,BLOCK_SIZE); |
inode | 104 | fs/minix/truncate.c | minix_free_block(inode->i_sb,tmp); |
inode | 116 | fs/minix/truncate.c | minix_free_block(inode->i_sb,tmp); |
inode | 122 | fs/minix/truncate.c | static int trunc_dindirect(struct inode * inode) |
inode | 130 | fs/minix/truncate.c | p = 8 + inode->u.minix_i.i_data; |
inode | 133 | fs/minix/truncate.c | dind_bh = bread(inode->i_dev, tmp, BLOCK_SIZE); |
inode | 149 | fs/minix/truncate.c | retry |= trunc_indirect(inode,7+512+(i<<9),dind); |
inode | 162 | fs/minix/truncate.c | inode->i_dirt = 1; |
inode | 163 | fs/minix/truncate.c | minix_free_block(inode->i_sb,tmp); |
inode | 169 | fs/minix/truncate.c | void minix_truncate(struct inode * inode) |
inode | 173 | fs/minix/truncate.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 174 | fs/minix/truncate.c | S_ISLNK(inode->i_mode))) |
inode | 177 | fs/minix/truncate.c | retry = trunc_direct(inode); |
inode | 178 | fs/minix/truncate.c | retry |= trunc_indirect(inode,7,inode->u.minix_i.i_data+7); |
inode | 179 | fs/minix/truncate.c | retry |= trunc_dindirect(inode); |
inode | 185 | fs/minix/truncate.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 186 | fs/minix/truncate.c | inode->i_dirt = 1; |
inode | 23 | fs/msdos/dir.c | static int msdos_dir_read(struct inode * inode,struct file * filp, char * buf,int count) |
inode | 60 | fs/msdos/dir.c | struct inode *inode, |
inode | 65 | fs/msdos/dir.c | struct super_block *sb = inode->i_sb; |
inode | 72 | fs/msdos/dir.c | if (!inode || !S_ISDIR(inode->i_mode)) |
inode | 75 | fs/msdos/dir.c | if (inode->i_ino == MSDOS_ROOT_INO) { |
inode | 88 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
inode | 120 | fs/msdos/dir.c | ino = inode->i_ino; |
inode | 122 | fs/msdos/dir.c | ino = msdos_parent_ino(inode,0); |
inode | 119 | fs/msdos/fat.c | void cache_lookup(struct inode *inode,int cluster,int *f_clu,int *d_clu) |
inode | 124 | fs/msdos/fat.c | printk("cache lookup: <%s,%d> %d (%d,%d) -> ", kdevname(inode->i_dev), |
inode | 125 | fs/msdos/fat.c | inode->i_ino, cluster, *f_clu, *d_clu); |
inode | 128 | fs/msdos/fat.c | if (inode->i_dev == walk->device |
inode | 129 | fs/msdos/fat.c | && walk->ino == inode->i_ino |
inode | 160 | fs/msdos/fat.c | void cache_add(struct inode *inode,int f_clu,int d_clu) |
inode | 165 | fs/msdos/fat.c | printk("cache add: <%s,%d> %d (%d)\n", kdevname(inode->i_dev), |
inode | 166 | fs/msdos/fat.c | inode->i_ino, f_clu, d_clu); |
inode | 170 | fs/msdos/fat.c | if (inode->i_dev == walk->device |
inode | 171 | fs/msdos/fat.c | && walk->ino == inode->i_ino |
inode | 175 | fs/msdos/fat.c | cache_inval_inode(inode); |
inode | 188 | fs/msdos/fat.c | walk->device = inode->i_dev; |
inode | 189 | fs/msdos/fat.c | walk->ino = inode->i_ino; |
inode | 204 | fs/msdos/fat.c | void cache_inval_inode(struct inode *inode) |
inode | 209 | fs/msdos/fat.c | if (walk->device == inode->i_dev |
inode | 210 | fs/msdos/fat.c | && walk->ino == inode->i_ino) |
inode | 225 | fs/msdos/fat.c | int get_cluster(struct inode *inode,int cluster) |
inode | 229 | fs/msdos/fat.c | if (!(nr = MSDOS_I(inode)->i_start)) return 0; |
inode | 232 | fs/msdos/fat.c | for (cache_lookup(inode,cluster,&count,&nr); count < cluster; |
inode | 234 | fs/msdos/fat.c | if ((nr = fat_access(inode->i_sb,nr,-1)) == -1) return 0; |
inode | 237 | fs/msdos/fat.c | cache_add(inode,cluster,nr); |
inode | 242 | fs/msdos/fat.c | int msdos_smap(struct inode *inode,int sector) |
inode | 247 | fs/msdos/fat.c | sb = MSDOS_SB(inode->i_sb); |
inode | 248 | fs/msdos/fat.c | if (inode->i_ino == MSDOS_ROOT_INO || (S_ISDIR(inode->i_mode) && |
inode | 249 | fs/msdos/fat.c | !MSDOS_I(inode)->i_start)) { |
inode | 255 | fs/msdos/fat.c | if (!(cluster = get_cluster(inode,cluster))) return 0; |
inode | 263 | fs/msdos/fat.c | int fat_free(struct inode *inode,int skip) |
inode | 267 | fs/msdos/fat.c | if (!(nr = MSDOS_I(inode)->i_start)) return 0; |
inode | 271 | fs/msdos/fat.c | if ((nr = fat_access(inode->i_sb,nr,-1)) == -1) return 0; |
inode | 278 | fs/msdos/fat.c | fat_access(inode->i_sb,last,MSDOS_SB(inode->i_sb)->fat_bits == |
inode | 281 | fs/msdos/fat.c | MSDOS_I(inode)->i_start = 0; |
inode | 282 | fs/msdos/fat.c | inode->i_dirt = 1; |
inode | 284 | fs/msdos/fat.c | lock_fat(inode->i_sb); |
inode | 286 | fs/msdos/fat.c | if (!(nr = fat_access(inode->i_sb,nr,0))) { |
inode | 287 | fs/msdos/fat.c | fs_panic(inode->i_sb,"fat_free: deleting beyond EOF"); |
inode | 290 | fs/msdos/fat.c | if (MSDOS_SB(inode->i_sb)->free_clusters != -1) |
inode | 291 | fs/msdos/fat.c | MSDOS_SB(inode->i_sb)->free_clusters++; |
inode | 292 | fs/msdos/fat.c | inode->i_blocks -= MSDOS_SB(inode->i_sb)->cluster_size; |
inode | 294 | fs/msdos/fat.c | unlock_fat(inode->i_sb); |
inode | 295 | fs/msdos/fat.c | cache_inval_inode(inode); |
inode | 119 | fs/msdos/file.c | struct inode *inode, |
inode | 123 | fs/msdos/file.c | struct super_block *sb = inode->i_sb; |
inode | 129 | fs/msdos/file.c | int sector = msdos_smap(inode,pre->file_sector); |
inode | 134 | fs/msdos/file.c | bh = getblk(inode->i_dev,sector,SECTOR_SIZE); |
inode | 150 | fs/msdos/file.c | struct inode *inode, |
inode | 155 | fs/msdos/file.c | struct super_block *sb = inode->i_sb; |
inode | 163 | fs/msdos/file.c | if (!inode) { |
inode | 168 | fs/msdos/file.c | if (!S_ISREG(inode->i_mode) && !S_ISLNK(inode->i_mode)) { |
inode | 169 | fs/msdos/file.c | printk("msdos_file_read: mode = %07o\n",inode->i_mode); |
inode | 172 | fs/msdos/file.c | if (filp->f_pos >= inode->i_size || count <= 0) return 0; |
inode | 182 | fs/msdos/file.c | PRINTK (("#### ino %ld pos %ld size %ld count %d\n",inode->i_ino,filp->f_pos,inode->i_size,count)); |
inode | 193 | fs/msdos/file.c | if (filp->f_reada || !MSDOS_I(inode)->i_binary){ |
inode | 197 | fs/msdos/file.c | int ahead = read_ahead[MAJOR(inode->i_dev)]; |
inode | 204 | fs/msdos/file.c | msdos_prefetch (inode,&pre,to_reada); |
inode | 207 | fs/msdos/file.c | PRINTK (("count %d ahead %d nblist %d\n",count,read_ahead[MAJOR(inode->i_dev)],pre.nblist)); |
inode | 208 | fs/msdos/file.c | while ((left_in_file = inode->i_size - filp->f_pos) > 0 |
inode | 220 | fs/msdos/file.c | msdos_prefetch (inode,&pre,MSDOS_PREFETCH/2); |
inode | 233 | fs/msdos/file.c | if (MSDOS_I(inode)->i_binary) { |
inode | 243 | fs/msdos/file.c | filp->f_pos = inode->i_size; |
inode | 255 | fs/msdos/file.c | if (!IS_RDONLY(inode)) inode->i_atime = CURRENT_TIME; |
inode | 264 | fs/msdos/file.c | struct inode *inode, |
inode | 269 | fs/msdos/file.c | struct super_block *sb = inode->i_sb; |
inode | 275 | fs/msdos/file.c | int binary_mode = MSDOS_I(inode)->i_binary; |
inode | 277 | fs/msdos/file.c | if (!inode) { |
inode | 282 | fs/msdos/file.c | if (!S_ISREG(inode->i_mode) && !S_ISLNK(inode->i_mode)) { |
inode | 283 | fs/msdos/file.c | printk("msdos_file_write: mode = %07o\n",inode->i_mode); |
inode | 287 | fs/msdos/file.c | if (MSDOS_I(inode)->i_attrs & ATTR_SYS) return -EPERM; |
inode | 292 | fs/msdos/file.c | if (filp->f_flags & O_APPEND) filp->f_pos = inode->i_size; |
inode | 296 | fs/msdos/file.c | while (!(sector = msdos_smap(inode,filp->f_pos >> SECTOR_BITS))) |
inode | 297 | fs/msdos/file.c | if ((error = msdos_add_cluster(inode)) < 0) break; |
inode | 299 | fs/msdos/file.c | msdos_truncate(inode); |
inode | 307 | fs/msdos/file.c | || filp->f_pos + size >= inode->i_size)){ |
inode | 311 | fs/msdos/file.c | if (!(bh = getblk(inode->i_dev,sector,SECTOR_SIZE))){ |
inode | 315 | fs/msdos/file.c | }else if (!(bh = bread(inode->i_dev,sector,SECTOR_SIZE))) { |
inode | 345 | fs/msdos/file.c | if (filp->f_pos > inode->i_size) { |
inode | 346 | fs/msdos/file.c | inode->i_size = filp->f_pos; |
inode | 347 | fs/msdos/file.c | inode->i_dirt = 1; |
inode | 355 | fs/msdos/file.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 356 | fs/msdos/file.c | MSDOS_I(inode)->i_attrs |= ATTR_ARCH; |
inode | 357 | fs/msdos/file.c | inode->i_dirt = 1; |
inode | 361 | fs/msdos/file.c | void msdos_truncate(struct inode *inode) |
inode | 367 | fs/msdos/file.c | if (MSDOS_I(inode)->i_attrs & ATTR_SYS) return /* -EPERM */; |
inode | 368 | fs/msdos/file.c | cluster = SECTOR_SIZE*MSDOS_SB(inode->i_sb)->cluster_size; |
inode | 369 | fs/msdos/file.c | (void) fat_free(inode,(inode->i_size+(cluster-1))/cluster); |
inode | 370 | fs/msdos/file.c | MSDOS_I(inode)->i_attrs |= ATTR_ARCH; |
inode | 371 | fs/msdos/file.c | inode->i_dirt = 1; |
inode | 25 | fs/msdos/inode.c | void msdos_put_inode(struct inode *inode) |
inode | 27 | fs/msdos/inode.c | struct inode *depend; |
inode | 30 | fs/msdos/inode.c | if (inode->i_nlink) { |
inode | 31 | fs/msdos/inode.c | if (MSDOS_I(inode)->i_busy) cache_inval_inode(inode); |
inode | 34 | fs/msdos/inode.c | inode->i_size = 0; |
inode | 35 | fs/msdos/inode.c | msdos_truncate(inode); |
inode | 36 | fs/msdos/inode.c | depend = MSDOS_I(inode)->i_depend; |
inode | 37 | fs/msdos/inode.c | sb = inode->i_sb; |
inode | 38 | fs/msdos/inode.c | clear_inode(inode); |
inode | 40 | fs/msdos/inode.c | if (MSDOS_I(depend)->i_old != inode) { |
inode | 42 | fs/msdos/inode.c | depend, inode, MSDOS_I(depend)->i_old); |
inode | 341 | fs/msdos/inode.c | int msdos_bmap(struct inode *inode,int block) |
inode | 346 | fs/msdos/inode.c | sb = MSDOS_SB(inode->i_sb); |
inode | 347 | fs/msdos/inode.c | if (inode->i_ino == MSDOS_ROOT_INO) { |
inode | 352 | fs/msdos/inode.c | if (!(cluster = get_cluster(inode,cluster))) return 0; |
inode | 357 | fs/msdos/inode.c | void msdos_read_inode(struct inode *inode) |
inode | 359 | fs/msdos/inode.c | struct super_block *sb = inode->i_sb; |
inode | 365 | fs/msdos/inode.c | MSDOS_I(inode)->i_busy = 0; |
inode | 366 | fs/msdos/inode.c | MSDOS_I(inode)->i_depend = MSDOS_I(inode)->i_old = NULL; |
inode | 367 | fs/msdos/inode.c | MSDOS_I(inode)->i_binary = 1; |
inode | 368 | fs/msdos/inode.c | inode->i_uid = MSDOS_SB(inode->i_sb)->fs_uid; |
inode | 369 | fs/msdos/inode.c | inode->i_gid = MSDOS_SB(inode->i_sb)->fs_gid; |
inode | 370 | fs/msdos/inode.c | if (inode->i_ino == MSDOS_ROOT_INO) { |
inode | 371 | fs/msdos/inode.c | inode->i_mode = (S_IRWXUGO & ~MSDOS_SB(inode->i_sb)->fs_umask) | |
inode | 373 | fs/msdos/inode.c | inode->i_op = &msdos_dir_inode_operations; |
inode | 374 | fs/msdos/inode.c | inode->i_nlink = msdos_subdirs(inode)+2; |
inode | 376 | fs/msdos/inode.c | inode->i_size = MSDOS_SB(inode->i_sb)->dir_entries* |
inode | 378 | fs/msdos/inode.c | inode->i_blksize = MSDOS_SB(inode->i_sb)->cluster_size* |
inode | 380 | fs/msdos/inode.c | inode->i_blocks = (inode->i_size+inode->i_blksize-1)/ |
inode | 381 | fs/msdos/inode.c | inode->i_blksize*MSDOS_SB(inode->i_sb)->cluster_size; |
inode | 382 | fs/msdos/inode.c | MSDOS_I(inode)->i_start = 0; |
inode | 383 | fs/msdos/inode.c | MSDOS_I(inode)->i_attrs = 0; |
inode | 384 | fs/msdos/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = 0; |
inode | 387 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, |
inode | 390 | fs/msdos/inode.c | kdevname(inode->i_dev), inode->i_ino); |
inode | 394 | fs/msdos/inode.c | [inode->i_ino & (MSDOS_DPB-1)]; |
inode | 396 | fs/msdos/inode.c | inode->i_mode = MSDOS_MKMODE(raw_entry->attr,S_IRWXUGO & |
inode | 397 | fs/msdos/inode.c | ~MSDOS_SB(inode->i_sb)->fs_umask) | S_IFDIR; |
inode | 398 | fs/msdos/inode.c | inode->i_op = &msdos_dir_inode_operations; |
inode | 399 | fs/msdos/inode.c | MSDOS_I(inode)->i_start = CF_LE_W(raw_entry->start); |
inode | 400 | fs/msdos/inode.c | inode->i_nlink = msdos_subdirs(inode); |
inode | 403 | fs/msdos/inode.c | if (!inode->i_nlink) { |
inode | 404 | fs/msdos/inode.c | printk("directory %d: i_nlink == 0\n",inode->i_ino); |
inode | 405 | fs/msdos/inode.c | inode->i_nlink = 1; |
inode | 408 | fs/msdos/inode.c | inode->i_size = 0; |
inode | 411 | fs/msdos/inode.c | inode->i_size += SECTOR_SIZE*MSDOS_SB(inode-> |
inode | 413 | fs/msdos/inode.c | if (!(nr = fat_access(inode->i_sb,nr,-1))) { |
inode | 415 | fs/msdos/inode.c | inode->i_ino); |
inode | 420 | fs/msdos/inode.c | inode->i_mode = MSDOS_MKMODE(raw_entry->attr, |
inode | 421 | fs/msdos/inode.c | (IS_NOEXEC(inode) ? S_IRUGO|S_IWUGO : S_IRWXUGO) |
inode | 422 | fs/msdos/inode.c | & ~MSDOS_SB(inode->i_sb)->fs_umask) | S_IFREG; |
inode | 423 | fs/msdos/inode.c | inode->i_op = sb->s_blocksize == 1024 |
inode | 426 | fs/msdos/inode.c | MSDOS_I(inode)->i_start = CF_LE_W(raw_entry->start); |
inode | 427 | fs/msdos/inode.c | inode->i_nlink = 1; |
inode | 428 | fs/msdos/inode.c | inode->i_size = CF_LE_L(raw_entry->size); |
inode | 430 | fs/msdos/inode.c | MSDOS_I(inode)->i_binary = is_binary(MSDOS_SB(inode->i_sb)->conversion, |
inode | 432 | fs/msdos/inode.c | MSDOS_I(inode)->i_attrs = raw_entry->attr & ATTR_UNUSED; |
inode | 434 | fs/msdos/inode.c | inode->i_blksize = MSDOS_SB(inode->i_sb)->cluster_size*SECTOR_SIZE; |
inode | 435 | fs/msdos/inode.c | inode->i_blocks = (inode->i_size+inode->i_blksize-1)/ |
inode | 436 | fs/msdos/inode.c | inode->i_blksize*MSDOS_SB(inode->i_sb)->cluster_size; |
inode | 437 | fs/msdos/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = |
inode | 443 | fs/msdos/inode.c | void msdos_write_inode(struct inode *inode) |
inode | 445 | fs/msdos/inode.c | struct super_block *sb = inode->i_sb; |
inode | 449 | fs/msdos/inode.c | inode->i_dirt = 0; |
inode | 450 | fs/msdos/inode.c | if (inode->i_ino == MSDOS_ROOT_INO || !inode->i_nlink) return; |
inode | 451 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, |
inode | 454 | fs/msdos/inode.c | kdevname(inode->i_dev), inode->i_ino); |
inode | 458 | fs/msdos/inode.c | [inode->i_ino & (MSDOS_DPB-1)]; |
inode | 459 | fs/msdos/inode.c | if (S_ISDIR(inode->i_mode)) { |
inode | 465 | fs/msdos/inode.c | raw_entry->size = CT_LE_L(inode->i_size); |
inode | 467 | fs/msdos/inode.c | raw_entry->attr |= MSDOS_MKATTR(inode->i_mode) | |
inode | 468 | fs/msdos/inode.c | MSDOS_I(inode)->i_attrs; |
inode | 469 | fs/msdos/inode.c | raw_entry->start = CT_LE_L(MSDOS_I(inode)->i_start); |
inode | 470 | fs/msdos/inode.c | date_unix2dos(inode->i_mtime,&raw_entry->time,&raw_entry->date); |
inode | 478 | fs/msdos/inode.c | int msdos_notify_change(struct inode * inode,struct iattr * attr) |
inode | 482 | fs/msdos/inode.c | error = inode_change_ok(inode, attr); |
inode | 487 | fs/msdos/inode.c | (attr->ia_uid != MSDOS_SB(inode->i_sb)->fs_uid)) || |
inode | 489 | fs/msdos/inode.c | (attr->ia_gid != MSDOS_SB(inode->i_sb)->fs_gid)) || |
inode | 495 | fs/msdos/inode.c | return MSDOS_SB(inode->i_sb)->quiet ? 0 : error; |
inode | 497 | fs/msdos/inode.c | inode_setattr(inode, attr); |
inode | 499 | fs/msdos/inode.c | if (IS_NOEXEC(inode) && !S_ISDIR(inode->i_mode)) |
inode | 500 | fs/msdos/inode.c | inode->i_mode &= S_IFMT | S_IRUGO | S_IWUGO; |
inode | 502 | fs/msdos/inode.c | inode->i_mode |= S_IXUGO; |
inode | 504 | fs/msdos/inode.c | inode->i_mode = ((inode->i_mode & S_IFMT) | ((((inode->i_mode & S_IRWXU |
inode | 505 | fs/msdos/inode.c | & ~MSDOS_SB(inode->i_sb)->fs_umask) | S_IRUSR) >> 6)*S_IXUGO)) & |
inode | 506 | fs/msdos/inode.c | ~MSDOS_SB(inode->i_sb)->fs_umask; |
inode | 116 | fs/msdos/misc.c | int msdos_add_cluster(struct inode *inode) |
inode | 118 | fs/msdos/misc.c | struct super_block *sb = inode->i_sb; |
inode | 121 | fs/msdos/misc.c | int cluster_size = MSDOS_SB(inode->i_sb)->cluster_size; |
inode | 123 | fs/msdos/misc.c | if (inode->i_ino == MSDOS_ROOT_INO) return -ENOSPC; |
inode | 124 | fs/msdos/misc.c | if (!MSDOS_SB(inode->i_sb)->free_clusters) return -ENOSPC; |
inode | 125 | fs/msdos/misc.c | lock_fat(inode->i_sb); |
inode | 126 | fs/msdos/misc.c | limit = MSDOS_SB(inode->i_sb)->clusters; |
inode | 129 | fs/msdos/misc.c | nr = ((count+MSDOS_SB(inode->i_sb)->prev_free) % limit)+2; |
inode | 130 | fs/msdos/misc.c | if (fat_access(inode->i_sb,nr,-1) == 0) break; |
inode | 136 | fs/msdos/misc.c | MSDOS_SB(inode->i_sb)->prev_free = (count+MSDOS_SB(inode->i_sb)-> |
inode | 139 | fs/msdos/misc.c | MSDOS_SB(inode->i_sb)->free_clusters = 0; |
inode | 140 | fs/msdos/misc.c | unlock_fat(inode->i_sb); |
inode | 143 | fs/msdos/misc.c | fat_access(inode->i_sb,nr,MSDOS_SB(inode->i_sb)->fat_bits == 12 ? |
inode | 145 | fs/msdos/misc.c | if (MSDOS_SB(inode->i_sb)->free_clusters != -1) |
inode | 146 | fs/msdos/misc.c | MSDOS_SB(inode->i_sb)->free_clusters--; |
inode | 147 | fs/msdos/misc.c | unlock_fat(inode->i_sb); |
inode | 149 | fs/msdos/misc.c | printk("set to %x\n",fat_access(inode->i_sb,nr,-1)); |
inode | 163 | fs/msdos/misc.c | if ((curr = MSDOS_I(inode)->i_start) != 0) { |
inode | 164 | fs/msdos/misc.c | cache_lookup(inode,INT_MAX,&last,&curr); |
inode | 169 | fs/msdos/misc.c | if (!(curr = fat_access(inode->i_sb, |
inode | 171 | fs/msdos/misc.c | fs_panic(inode->i_sb,"File without EOF"); |
inode | 180 | fs/msdos/misc.c | if (last) fat_access(inode->i_sb,last,nr); |
inode | 182 | fs/msdos/misc.c | MSDOS_I(inode)->i_start = nr; |
inode | 183 | fs/msdos/misc.c | inode->i_dirt = 1; |
inode | 186 | fs/msdos/misc.c | if (last) printk("next set to %d\n",fat_access(inode->i_sb,last,-1)); |
inode | 188 | fs/msdos/misc.c | sector = MSDOS_SB(inode->i_sb)->data_start+(nr-2)*cluster_size; |
inode | 194 | fs/msdos/misc.c | if (!(bh = getblk(inode->i_dev,sector,SECTOR_SIZE))) |
inode | 203 | fs/msdos/misc.c | if (file_cluster != inode->i_blocks/cluster_size){ |
inode | 205 | fs/msdos/misc.c | ,file_cluster,inode->i_blocks/cluster_size); |
inode | 207 | fs/msdos/misc.c | cache_add(inode,file_cluster,nr); |
inode | 209 | fs/msdos/misc.c | inode->i_blocks += cluster_size; |
inode | 210 | fs/msdos/misc.c | if (S_ISDIR(inode->i_mode)) { |
inode | 211 | fs/msdos/misc.c | if (inode->i_size & (SECTOR_SIZE-1)) { |
inode | 212 | fs/msdos/misc.c | fs_panic(inode->i_sb,"Odd directory size"); |
inode | 213 | fs/msdos/misc.c | inode->i_size = (inode->i_size+SECTOR_SIZE) & |
inode | 216 | fs/msdos/misc.c | inode->i_size += SECTOR_SIZE*cluster_size; |
inode | 218 | fs/msdos/misc.c | printk("size is %d now (%x)\n",inode->i_size,inode); |
inode | 220 | fs/msdos/misc.c | inode->i_dirt = 1; |
inode | 283 | fs/msdos/misc.c | int msdos_get_entry(struct inode *dir, loff_t *pos,struct buffer_head **bh, |
inode | 350 | fs/msdos/misc.c | inode = iget(sb,sector*MSDOS_DPS+entry); \ |
inode | 351 | fs/msdos/misc.c | if (inode) { \ |
inode | 353 | fs/msdos/misc.c | done = !MSDOS_I(inode)->i_busy; \ |
inode | 354 | fs/msdos/misc.c | iput(inode); \ |
inode | 372 | fs/msdos/misc.c | struct inode *inode; |
inode | 485 | fs/msdos/misc.c | int msdos_parent_ino(struct inode *dir,int locked) |
inode | 521 | fs/msdos/misc.c | int msdos_subdirs(struct inode *dir) |
inode | 542 | fs/msdos/misc.c | int msdos_scan(struct inode *dir,const char *name,struct buffer_head **res_bh, |
inode | 33 | fs/msdos/mmap.c | struct inode * inode = area->vm_inode; |
inode | 42 | fs/msdos/mmap.c | gap = inode->i_size - pos; |
inode | 59 | fs/msdos/mmap.c | cur_read = msdos_file_read (inode,&filp,(char*)page |
inode | 91 | fs/msdos/mmap.c | int msdos_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
inode | 95 | fs/msdos/mmap.c | if (vma->vm_offset & (inode->i_sb->s_blocksize - 1)) |
inode | 97 | fs/msdos/mmap.c | if (!inode->i_sb || !S_ISREG(inode->i_mode)) |
inode | 99 | fs/msdos/mmap.c | if (!IS_RDONLY(inode)) { |
inode | 100 | fs/msdos/mmap.c | inode->i_atime = CURRENT_TIME; |
inode | 101 | fs/msdos/mmap.c | inode->i_dirt = 1; |
inode | 104 | fs/msdos/mmap.c | vma->vm_inode = inode; |
inode | 105 | fs/msdos/mmap.c | inode->i_count++; |
inode | 110 | fs/msdos/namei.c | static int msdos_find(struct inode *dir,const char *name,int len, |
inode | 137 | fs/msdos/namei.c | int msdos_lookup(struct inode *dir,const char *name,int len, |
inode | 138 | fs/msdos/namei.c | struct inode **result) |
inode | 144 | fs/msdos/namei.c | struct inode *next; |
inode | 203 | fs/msdos/namei.c | static int msdos_create_entry(struct inode *dir, const char *name, |
inode | 204 | fs/msdos/namei.c | int is_dir, int is_hid, struct inode **result) |
inode | 241 | fs/msdos/namei.c | int msdos_create(struct inode *dir,const char *name,int len,int mode, |
inode | 242 | fs/msdos/namei.c | struct inode **result) |
inode | 301 | fs/msdos/namei.c | int msdos_mkdir(struct inode *dir,const char *name,int len,int mode) |
inode | 306 | fs/msdos/namei.c | struct inode *inode,*dot; |
inode | 323 | fs/msdos/namei.c | if ((res = msdos_create_entry(dir,msdos_name,1,is_hid,&inode)) < 0) { |
inode | 329 | fs/msdos/namei.c | inode->i_nlink = 2; /* no need to mark them dirty */ |
inode | 330 | fs/msdos/namei.c | MSDOS_I(inode)->i_busy = 1; /* prevent lookups */ |
inode | 331 | fs/msdos/namei.c | if ((res = msdos_add_cluster(inode)) < 0) goto mkdir_error; |
inode | 332 | fs/msdos/namei.c | if ((res = msdos_create_entry(inode,MSDOS_DOT,1,0,&dot)) < 0) |
inode | 334 | fs/msdos/namei.c | dot->i_size = inode->i_size; /* doesn't grow in the 2nd create_entry */ |
inode | 335 | fs/msdos/namei.c | MSDOS_I(dot)->i_start = MSDOS_I(inode)->i_start; |
inode | 336 | fs/msdos/namei.c | dot->i_nlink = inode->i_nlink; |
inode | 339 | fs/msdos/namei.c | if ((res = msdos_create_entry(inode,MSDOS_DOTDOT,1,0,&dot)) < 0) |
inode | 346 | fs/msdos/namei.c | MSDOS_I(inode)->i_busy = 0; |
inode | 348 | fs/msdos/namei.c | iput(inode); |
inode | 352 | fs/msdos/namei.c | iput(inode); |
inode | 360 | fs/msdos/namei.c | static int msdos_empty(struct inode *dir) |
inode | 386 | fs/msdos/namei.c | int msdos_rmdir(struct inode *dir,const char *name,int len) |
inode | 392 | fs/msdos/namei.c | struct inode *inode; |
inode | 395 | fs/msdos/namei.c | inode = NULL; |
inode | 401 | fs/msdos/namei.c | if (!(inode = iget(dir->i_sb,ino))) goto rmdir_done; |
inode | 403 | fs/msdos/namei.c | if (!S_ISDIR(inode->i_mode)) goto rmdir_done; |
inode | 405 | fs/msdos/namei.c | if (dir->i_dev != inode->i_dev || dir == inode) |
inode | 407 | fs/msdos/namei.c | res = msdos_empty(inode); |
inode | 410 | fs/msdos/namei.c | inode->i_nlink = 0; |
inode | 411 | fs/msdos/namei.c | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
inode | 413 | fs/msdos/namei.c | inode->i_dirt = dir->i_dirt = 1; |
inode | 420 | fs/msdos/namei.c | iput(inode); |
inode | 426 | fs/msdos/namei.c | struct inode *dir, |
inode | 435 | fs/msdos/namei.c | struct inode *inode; |
inode | 438 | fs/msdos/namei.c | inode = NULL; |
inode | 441 | fs/msdos/namei.c | if (!(inode = iget(dir->i_sb,ino))) { |
inode | 445 | fs/msdos/namei.c | if (!S_ISREG(inode->i_mode) && nospc){ |
inode | 449 | fs/msdos/namei.c | if (MSDOS_I(inode)->i_attrs & ATTR_SYS){ |
inode | 453 | fs/msdos/namei.c | inode->i_nlink = 0; |
inode | 454 | fs/msdos/namei.c | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
inode | 455 | fs/msdos/namei.c | MSDOS_I(inode)->i_busy = 1; |
inode | 456 | fs/msdos/namei.c | inode->i_dirt = dir->i_dirt = 1; |
inode | 461 | fs/msdos/namei.c | iput(inode); |
inode | 467 | fs/msdos/namei.c | int msdos_unlink(struct inode *dir,const char *name,int len) |
inode | 473 | fs/msdos/namei.c | int msdos_unlink_umsdos(struct inode *dir,const char *name,int len) |
inode | 479 | fs/msdos/namei.c | static int rename_same_dir(struct inode *old_dir,char *old_name, |
inode | 480 | fs/msdos/namei.c | struct inode *new_dir,char *new_name,struct buffer_head *old_bh, |
inode | 486 | fs/msdos/namei.c | struct inode *new_inode,*old_inode; |
inode | 543 | fs/msdos/namei.c | static int rename_diff_dir(struct inode *old_dir,char *old_name, |
inode | 544 | fs/msdos/namei.c | struct inode *new_dir,char *new_name,struct buffer_head *old_bh, |
inode | 550 | fs/msdos/namei.c | struct inode *old_inode,*new_inode,*free_inode,*dotdot_inode,*walk; |
inode | 673 | fs/msdos/namei.c | int msdos_rename(struct inode *old_dir,const char *old_name,int old_len, |
inode | 674 | fs/msdos/namei.c | struct inode *new_dir,const char *new_name,int new_len) |
inode | 99 | fs/namei.c | int permission(struct inode * inode,int mask) |
inode | 101 | fs/namei.c | int mode = inode->i_mode; |
inode | 103 | fs/namei.c | if (inode->i_op && inode->i_op->permission) |
inode | 104 | fs/namei.c | return inode->i_op->permission(inode, mask); |
inode | 105 | fs/namei.c | else if ((mask & S_IWOTH) && IS_IMMUTABLE(inode)) |
inode | 107 | fs/namei.c | else if (current->fsuid == inode->i_uid) |
inode | 109 | fs/namei.c | else if (in_group_p(inode->i_gid)) |
inode | 123 | fs/namei.c | int get_write_access(struct inode * inode) |
inode | 127 | fs/namei.c | if ((inode->i_count > 1) && S_ISREG(inode->i_mode)) /* shortcut */ |
inode | 133 | fs/namei.c | if (inode != mpnt->vm_inode) |
inode | 139 | fs/namei.c | inode->i_wcount++; |
inode | 143 | fs/namei.c | void put_write_access(struct inode * inode) |
inode | 145 | fs/namei.c | inode->i_wcount--; |
inode | 153 | fs/namei.c | int lookup(struct inode * dir,const char * name, int len, |
inode | 154 | fs/namei.c | struct inode ** result) |
inode | 191 | fs/namei.c | int follow_link(struct inode * dir, struct inode * inode, |
inode | 192 | fs/namei.c | int flag, int mode, struct inode ** res_inode) |
inode | 194 | fs/namei.c | if (!dir || !inode) { |
inode | 196 | fs/namei.c | iput(inode); |
inode | 200 | fs/namei.c | if (!inode->i_op || !inode->i_op->follow_link) { |
inode | 202 | fs/namei.c | *res_inode = inode; |
inode | 205 | fs/namei.c | return inode->i_op->follow_link(dir,inode,flag,mode,res_inode); |
inode | 215 | fs/namei.c | struct inode * base, struct inode ** res_inode) |
inode | 220 | fs/namei.c | struct inode * inode; |
inode | 240 | fs/namei.c | error = lookup(base,thisname,len,&inode); |
inode | 245 | fs/namei.c | error = follow_link(base,inode,0,0,&base); |
inode | 259 | fs/namei.c | static int _namei(const char * pathname, struct inode * base, |
inode | 260 | fs/namei.c | int follow_links, struct inode ** res_inode) |
inode | 264 | fs/namei.c | struct inode * inode; |
inode | 271 | fs/namei.c | error = lookup(base,basename,namelen,&inode); |
inode | 277 | fs/namei.c | error = follow_link(base,inode,0,0,&inode); |
inode | 282 | fs/namei.c | *res_inode = inode; |
inode | 286 | fs/namei.c | int lnamei(const char * pathname, struct inode ** res_inode) |
inode | 306 | fs/namei.c | int namei(const char * pathname, struct inode ** res_inode) |
inode | 333 | fs/namei.c | struct inode ** res_inode, struct inode * base) |
inode | 337 | fs/namei.c | struct inode * dir, *inode; |
inode | 360 | fs/namei.c | error = lookup(dir,basename,namelen,&inode); |
inode | 363 | fs/namei.c | iput(inode); |
inode | 381 | fs/namei.c | error = lookup(dir,basename,namelen,&inode); |
inode | 386 | fs/namei.c | error = follow_link(dir,inode,flag,mode,&inode); |
inode | 389 | fs/namei.c | if (S_ISDIR(inode->i_mode) && (flag & 2)) { |
inode | 390 | fs/namei.c | iput(inode); |
inode | 393 | fs/namei.c | if ((error = permission(inode,ACC_MODE(flag))) != 0) { |
inode | 394 | fs/namei.c | iput(inode); |
inode | 397 | fs/namei.c | if (S_ISBLK(inode->i_mode) || S_ISCHR(inode->i_mode)) { |
inode | 398 | fs/namei.c | if (IS_NODEV(inode)) { |
inode | 399 | fs/namei.c | iput(inode); |
inode | 404 | fs/namei.c | if (IS_RDONLY(inode) && (flag & 2)) { |
inode | 405 | fs/namei.c | iput(inode); |
inode | 412 | fs/namei.c | if (IS_APPEND(inode) && ((flag & 2) && !(flag & O_APPEND))) { |
inode | 413 | fs/namei.c | iput(inode); |
inode | 419 | fs/namei.c | if ((error = get_write_access(inode))) { |
inode | 420 | fs/namei.c | iput(inode); |
inode | 425 | fs/namei.c | if ((error = notify_change(inode, &newattrs))) { |
inode | 426 | fs/namei.c | put_write_access(inode); |
inode | 427 | fs/namei.c | iput(inode); |
inode | 430 | fs/namei.c | inode->i_size = 0; |
inode | 431 | fs/namei.c | if (inode->i_op && inode->i_op->truncate) |
inode | 432 | fs/namei.c | inode->i_op->truncate(inode); |
inode | 433 | fs/namei.c | inode->i_dirt = 1; |
inode | 434 | fs/namei.c | put_write_access(inode); |
inode | 436 | fs/namei.c | *res_inode = inode; |
inode | 444 | fs/namei.c | struct inode * dir; |
inode | 502 | fs/namei.c | struct inode * dir; |
inode | 548 | fs/namei.c | struct inode * dir; |
inode | 596 | fs/namei.c | struct inode * dir; |
inode | 642 | fs/namei.c | struct inode * dir; |
inode | 690 | fs/namei.c | static int do_link(struct inode * oldinode, const char * newname) |
inode | 692 | fs/namei.c | struct inode * dir; |
inode | 746 | fs/namei.c | struct inode * oldinode; |
inode | 763 | fs/namei.c | struct inode * old_dir, * new_dir; |
inode | 29 | fs/nfs/cache.c | nfs_cache *nfs_cache_find(struct inode *inode, off_t pos) |
inode | 37 | fs/nfs/cache.c | if(nh->inode_num==inode->i_no && !nh->dead&&!nh->free&&nh->file_pos==pos) |
inode | 45 | fs/nfs/cache.c | if(nfs_proc_getattr(NFS_SERVER(inode), NFS_FH(inode), &fattr)) |
inode | 55 | fs/nfs/cache.c | nfs_refresh_inode(inode, fattr); |
inode | 21 | fs/nfs/dir.c | static int nfs_dir_read(struct inode *, struct file *filp, char *buf, |
inode | 23 | fs/nfs/dir.c | static int nfs_readdir(struct inode *, struct file *, void *, filldir_t); |
inode | 24 | fs/nfs/dir.c | static int nfs_lookup(struct inode *dir, const char *name, int len, |
inode | 25 | fs/nfs/dir.c | struct inode **result); |
inode | 26 | fs/nfs/dir.c | static int nfs_create(struct inode *dir, const char *name, int len, int mode, |
inode | 27 | fs/nfs/dir.c | struct inode **result); |
inode | 28 | fs/nfs/dir.c | static int nfs_mkdir(struct inode *dir, const char *name, int len, int mode); |
inode | 29 | fs/nfs/dir.c | static int nfs_rmdir(struct inode *dir, const char *name, int len); |
inode | 30 | fs/nfs/dir.c | static int nfs_unlink(struct inode *dir, const char *name, int len); |
inode | 31 | fs/nfs/dir.c | static int nfs_symlink(struct inode *inode, const char *name, int len, |
inode | 33 | fs/nfs/dir.c | static int nfs_link(struct inode *oldinode, struct inode *dir, |
inode | 35 | fs/nfs/dir.c | static int nfs_mknod(struct inode *dir, const char *name, int len, int mode, |
inode | 37 | fs/nfs/dir.c | static int nfs_rename(struct inode *old_dir, const char *old_name, |
inode | 38 | fs/nfs/dir.c | int old_len, struct inode *new_dir, const char *new_name, |
inode | 72 | fs/nfs/dir.c | static int nfs_dir_read(struct inode *inode, struct file *filp, char *buf, |
inode | 88 | fs/nfs/dir.c | static int nfs_readdir(struct inode *inode, struct file *filp, |
inode | 99 | fs/nfs/dir.c | if (!inode || !S_ISDIR(inode->i_mode)) { |
inode | 130 | fs/nfs/dir.c | if (inode->i_dev == c_dev && inode->i_ino == c_ino) { |
inode | 147 | fs/nfs/dir.c | result = nfs_proc_readdir(NFS_SERVER(inode), NFS_FH(inode), |
inode | 154 | fs/nfs/dir.c | c_dev = inode->i_dev; |
inode | 155 | fs/nfs/dir.c | c_ino = inode->i_ino; |
inode | 170 | fs/nfs/dir.c | if (inode->i_dev != c_dev) |
inode | 172 | fs/nfs/dir.c | if (inode->i_ino != c_ino) |
inode | 215 | fs/nfs/dir.c | int inode; |
inode | 222 | fs/nfs/dir.c | static struct nfs_lookup_cache_entry *nfs_lookup_cache_index(struct inode *dir, |
inode | 231 | fs/nfs/dir.c | && entry->inode == dir->i_ino |
inode | 238 | fs/nfs/dir.c | static int nfs_lookup_cache_lookup(struct inode *dir, const char *filename, |
inode | 262 | fs/nfs/dir.c | static void nfs_lookup_cache_add(struct inode *dir, const char *filename, |
inode | 279 | fs/nfs/dir.c | entry->inode = dir->i_ino; |
inode | 287 | fs/nfs/dir.c | static void nfs_lookup_cache_remove(struct inode *dir, struct inode *inode, |
inode | 295 | fs/nfs/dir.c | if (inode) { |
inode | 296 | fs/nfs/dir.c | dev = inode->i_dev; |
inode | 297 | fs/nfs/dir.c | fileid = inode->i_ino; |
inode | 312 | fs/nfs/dir.c | static void nfs_lookup_cache_refresh(struct inode *file, |
inode | 327 | fs/nfs/dir.c | static int nfs_lookup(struct inode *dir, const char *__name, int len, |
inode | 328 | fs/nfs/dir.c | struct inode **result) |
inode | 368 | fs/nfs/dir.c | static int nfs_create(struct inode *dir, const char *name, int len, int mode, |
inode | 369 | fs/nfs/dir.c | struct inode **result) |
inode | 403 | fs/nfs/dir.c | static int nfs_mknod(struct inode *dir, const char *name, int len, |
inode | 435 | fs/nfs/dir.c | static int nfs_mkdir(struct inode *dir, const char *name, int len, int mode) |
inode | 462 | fs/nfs/dir.c | static int nfs_rmdir(struct inode *dir, const char *name, int len) |
inode | 482 | fs/nfs/dir.c | static int nfs_unlink(struct inode *dir, const char *name, int len) |
inode | 502 | fs/nfs/dir.c | static int nfs_symlink(struct inode *dir, const char *name, int len, |
inode | 530 | fs/nfs/dir.c | static int nfs_link(struct inode *oldinode, struct inode *dir, |
inode | 561 | fs/nfs/dir.c | static int nfs_rename(struct inode *old_dir, const char *old_name, int old_len, |
inode | 562 | fs/nfs/dir.c | struct inode *new_dir, const char *new_name, int new_len) |
inode | 601 | fs/nfs/dir.c | void nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr) |
inode | 605 | fs/nfs/dir.c | if (!inode || !fattr) { |
inode | 609 | fs/nfs/dir.c | if (inode->i_ino != fattr->fileid) { |
inode | 613 | fs/nfs/dir.c | was_empty = inode->i_mode == 0; |
inode | 614 | fs/nfs/dir.c | inode->i_mode = fattr->mode; |
inode | 615 | fs/nfs/dir.c | inode->i_nlink = fattr->nlink; |
inode | 616 | fs/nfs/dir.c | inode->i_uid = fattr->uid; |
inode | 617 | fs/nfs/dir.c | inode->i_gid = fattr->gid; |
inode | 618 | fs/nfs/dir.c | inode->i_size = fattr->size; |
inode | 619 | fs/nfs/dir.c | inode->i_blksize = fattr->blocksize; |
inode | 620 | fs/nfs/dir.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 621 | fs/nfs/dir.c | inode->i_rdev = to_kdev_t(fattr->rdev); |
inode | 623 | fs/nfs/dir.c | inode->i_rdev = 0; |
inode | 624 | fs/nfs/dir.c | inode->i_blocks = fattr->blocks; |
inode | 625 | fs/nfs/dir.c | inode->i_atime = fattr->atime.seconds; |
inode | 626 | fs/nfs/dir.c | inode->i_mtime = fattr->mtime.seconds; |
inode | 627 | fs/nfs/dir.c | inode->i_ctime = fattr->ctime.seconds; |
inode | 629 | fs/nfs/dir.c | if (S_ISREG(inode->i_mode)) |
inode | 630 | fs/nfs/dir.c | inode->i_op = &nfs_file_inode_operations; |
inode | 631 | fs/nfs/dir.c | else if (S_ISDIR(inode->i_mode)) |
inode | 632 | fs/nfs/dir.c | inode->i_op = &nfs_dir_inode_operations; |
inode | 633 | fs/nfs/dir.c | else if (S_ISLNK(inode->i_mode)) |
inode | 634 | fs/nfs/dir.c | inode->i_op = &nfs_symlink_inode_operations; |
inode | 635 | fs/nfs/dir.c | else if (S_ISCHR(inode->i_mode)) |
inode | 636 | fs/nfs/dir.c | inode->i_op = &chrdev_inode_operations; |
inode | 637 | fs/nfs/dir.c | else if (S_ISBLK(inode->i_mode)) |
inode | 638 | fs/nfs/dir.c | inode->i_op = &blkdev_inode_operations; |
inode | 639 | fs/nfs/dir.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 640 | fs/nfs/dir.c | init_fifo(inode); |
inode | 642 | fs/nfs/dir.c | inode->i_op = NULL; |
inode | 644 | fs/nfs/dir.c | nfs_lookup_cache_refresh(inode, fattr); |
inode | 29 | fs/nfs/file.c | static int nfs_file_read(struct inode *, struct file *, char *, int); |
inode | 30 | fs/nfs/file.c | static int nfs_file_write(struct inode *, struct file *, const char *, int); |
inode | 31 | fs/nfs/file.c | static int nfs_fsync(struct inode *, struct file *); |
inode | 89 | fs/nfs/file.c | static int nfs_fsync(struct inode *inode, struct file *file) |
inode | 94 | fs/nfs/file.c | static int nfs_file_read(struct inode *inode, struct file *file, char *buf, |
inode | 102 | fs/nfs/file.c | if (!inode) { |
inode | 106 | fs/nfs/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 108 | fs/nfs/file.c | inode->i_mode); |
inode | 112 | fs/nfs/file.c | if (pos + count > inode->i_size) |
inode | 113 | fs/nfs/file.c | count = inode->i_size - pos; |
inode | 119 | fs/nfs/file.c | if ((cache[i].inode_num == inode->i_ino) |
inode | 134 | fs/nfs/file.c | n = NFS_SERVER(inode)->rsize; |
inode | 136 | fs/nfs/file.c | result = nfs_proc_read(NFS_SERVER(inode), NFS_FH(inode), |
inode | 144 | fs/nfs/file.c | nfs_refresh_inode(inode, &fattr); |
inode | 153 | fs/nfs/file.c | result = nfs_proc_read(NFS_SERVER(inode), NFS_FH(inode), |
inode | 165 | fs/nfs/file.c | nfs_refresh_inode(inode, &fattr); |
inode | 170 | fs/nfs/file.c | nfs_refresh_inode(inode, &fattr); |
inode | 177 | fs/nfs/file.c | cache[tail].inode_num = inode->i_ino; |
inode | 189 | fs/nfs/file.c | static int nfs_file_write(struct inode *inode, struct file *file, const char *buf, |
inode | 195 | fs/nfs/file.c | if (!inode) { |
inode | 199 | fs/nfs/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 201 | fs/nfs/file.c | inode->i_mode); |
inode | 210 | fs/nfs/file.c | if(cache[i].inode_num == inode->i_ino) |
inode | 216 | fs/nfs/file.c | pos = inode->i_size; |
inode | 217 | fs/nfs/file.c | n = NFS_SERVER(inode)->wsize; |
inode | 222 | fs/nfs/file.c | result = nfs_proc_write(NFS_SERVER(inode), NFS_FH(inode), |
inode | 234 | fs/nfs/file.c | nfs_refresh_inode(inode, &fattr); |
inode | 32 | fs/nfs/inode.c | static int nfs_notify_change(struct inode *, struct iattr *); |
inode | 33 | fs/nfs/inode.c | static void nfs_put_inode(struct inode *); |
inode | 48 | fs/nfs/inode.c | static void nfs_put_inode(struct inode * inode) |
inode | 50 | fs/nfs/inode.c | clear_inode(inode); |
inode | 210 | fs/nfs/inode.c | struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle, |
inode | 215 | fs/nfs/inode.c | struct inode *inode; |
inode | 230 | fs/nfs/inode.c | if (!(inode = iget(sb, fattr->fileid))) { |
inode | 234 | fs/nfs/inode.c | if (inode->i_dev == sb->s_dev) { |
inode | 235 | fs/nfs/inode.c | if (inode->i_ino != fattr->fileid) { |
inode | 237 | fs/nfs/inode.c | return inode; |
inode | 239 | fs/nfs/inode.c | *NFS_FH(inode) = *fhandle; |
inode | 240 | fs/nfs/inode.c | nfs_refresh_inode(inode, fattr); |
inode | 242 | fs/nfs/inode.c | return inode; |
inode | 245 | fs/nfs/inode.c | int nfs_notify_change(struct inode *inode, struct iattr *attr) |
inode | 267 | fs/nfs/inode.c | sattr.size = S_ISREG(inode->i_mode) ? attr->ia_size : -1; |
inode | 283 | fs/nfs/inode.c | error = nfs_proc_setattr(NFS_SERVER(inode), NFS_FH(inode), |
inode | 286 | fs/nfs/inode.c | nfs_refresh_inode(inode, &fattr); |
inode | 287 | fs/nfs/inode.c | inode->i_dirt = 0; |
inode | 33 | fs/nfs/mmap.c | struct inode * inode = area->vm_inode; |
inode | 49 | fs/nfs/mmap.c | n = NFS_SERVER(inode)->rsize; /* what we can read in one go */ |
inode | 57 | fs/nfs/mmap.c | result = nfs_proc_read(NFS_SERVER(inode), NFS_FH(inode), |
inode | 69 | fs/nfs/mmap.c | nfs_refresh_inode(inode, &fattr); |
inode | 95 | fs/nfs/mmap.c | int nfs_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
inode | 99 | fs/nfs/mmap.c | if (!inode->i_sb || !S_ISREG(inode->i_mode)) |
inode | 101 | fs/nfs/mmap.c | if (!IS_RDONLY(inode)) { |
inode | 102 | fs/nfs/mmap.c | inode->i_atime = CURRENT_TIME; |
inode | 103 | fs/nfs/mmap.c | inode->i_dirt = 1; |
inode | 106 | fs/nfs/mmap.c | vma->vm_inode = inode; |
inode | 107 | fs/nfs/mmap.c | inode->i_count++; |
inode | 532 | fs/nfs/nfsroot.c | static struct inode nfs_inode; /* Inode containing socket */ |
inode | 536 | fs/nfs/nfsroot.c | extern struct socket *socki_lookup(struct inode *inode); |
inode | 564 | fs/nfs/nfsroot.c | memcpy(&nfs_inode, nfs_file.f_inode, sizeof(struct inode)); |
inode | 569 | fs/nfs/nfsroot.c | nfs_inode.u.socket_i.inode = &nfs_inode; |
inode | 594 | fs/nfs/nfsroot.c | nfs_inode.u.socket_i.inode = NULL; /* The inode is already cleared */ |
inode | 21 | fs/nfs/symlink.c | static int nfs_readlink(struct inode *, char *, int); |
inode | 22 | fs/nfs/symlink.c | static int nfs_follow_link(struct inode *, struct inode *, int, int, |
inode | 23 | fs/nfs/symlink.c | struct inode **); |
inode | 46 | fs/nfs/symlink.c | static int nfs_follow_link(struct inode *dir, struct inode *inode, |
inode | 47 | fs/nfs/symlink.c | int flag, int mode, struct inode **res_inode) |
inode | 58 | fs/nfs/symlink.c | if (!inode) { |
inode | 62 | fs/nfs/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 64 | fs/nfs/symlink.c | *res_inode = inode; |
inode | 68 | fs/nfs/symlink.c | iput(inode); |
inode | 72 | fs/nfs/symlink.c | error = nfs_proc_readlink(NFS_SERVER(inode), NFS_FH(inode), &mem, |
inode | 75 | fs/nfs/symlink.c | iput(inode); |
inode | 86 | fs/nfs/symlink.c | iput(inode); |
inode | 94 | fs/nfs/symlink.c | static int nfs_readlink(struct inode *inode, char *buffer, int buflen) |
inode | 100 | fs/nfs/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 101 | fs/nfs/symlink.c | iput(inode); |
inode | 106 | fs/nfs/symlink.c | error = nfs_proc_readlink(NFS_SERVER(inode), NFS_FH(inode), &mem, |
inode | 108 | fs/nfs/symlink.c | iput(inode); |
inode | 27 | fs/open.c | struct inode * inode; |
inode | 33 | fs/open.c | error = namei(path,&inode); |
inode | 36 | fs/open.c | if (!inode->i_sb->s_op->statfs) { |
inode | 37 | fs/open.c | iput(inode); |
inode | 40 | fs/open.c | inode->i_sb->s_op->statfs(inode->i_sb, buf, sizeof(struct statfs)); |
inode | 41 | fs/open.c | iput(inode); |
inode | 47 | fs/open.c | struct inode * inode; |
inode | 56 | fs/open.c | if (!(inode = file->f_inode)) |
inode | 58 | fs/open.c | if (!inode->i_sb->s_op->statfs) |
inode | 60 | fs/open.c | inode->i_sb->s_op->statfs(inode->i_sb, buf, sizeof(struct statfs)); |
inode | 64 | fs/open.c | static int do_truncate(struct inode *inode, unsigned long length) |
inode | 69 | fs/open.c | vmtruncate(inode, length); |
inode | 70 | fs/open.c | inode->i_size = newattrs.ia_size = length; |
inode | 71 | fs/open.c | if (inode->i_op && inode->i_op->truncate) |
inode | 72 | fs/open.c | inode->i_op->truncate(inode); |
inode | 75 | fs/open.c | inode->i_dirt = 1; |
inode | 76 | fs/open.c | return notify_change(inode, &newattrs); |
inode | 81 | fs/open.c | struct inode * inode; |
inode | 84 | fs/open.c | error = namei(path,&inode); |
inode | 87 | fs/open.c | if (S_ISDIR(inode->i_mode)) { |
inode | 88 | fs/open.c | iput(inode); |
inode | 91 | fs/open.c | if ((error = permission(inode,MAY_WRITE)) != 0) { |
inode | 92 | fs/open.c | iput(inode); |
inode | 95 | fs/open.c | if (IS_RDONLY(inode)) { |
inode | 96 | fs/open.c | iput(inode); |
inode | 99 | fs/open.c | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) { |
inode | 100 | fs/open.c | iput(inode); |
inode | 103 | fs/open.c | error = get_write_access(inode); |
inode | 105 | fs/open.c | iput(inode); |
inode | 108 | fs/open.c | error = do_truncate(inode, length); |
inode | 109 | fs/open.c | put_write_access(inode); |
inode | 110 | fs/open.c | iput(inode); |
inode | 116 | fs/open.c | struct inode * inode; |
inode | 121 | fs/open.c | if (!(inode = file->f_inode)) |
inode | 123 | fs/open.c | if (S_ISDIR(inode->i_mode) || !(file->f_mode & 2)) |
inode | 125 | fs/open.c | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) |
inode | 127 | fs/open.c | return do_truncate(inode, length); |
inode | 136 | fs/open.c | struct inode * inode; |
inode | 142 | fs/open.c | error = namei(filename,&inode); |
inode | 145 | fs/open.c | if (IS_RDONLY(inode)) { |
inode | 146 | fs/open.c | iput(inode); |
inode | 153 | fs/open.c | iput(inode); |
inode | 161 | fs/open.c | if ((error = permission(inode,MAY_WRITE)) != 0) { |
inode | 162 | fs/open.c | iput(inode); |
inode | 170 | fs/open.c | inode->i_dirt = 1; |
inode | 171 | fs/open.c | error = notify_change(inode, &newattrs); |
inode | 172 | fs/open.c | iput(inode); |
inode | 182 | fs/open.c | struct inode * inode; |
inode | 188 | fs/open.c | error = namei(filename,&inode); |
inode | 191 | fs/open.c | if (IS_RDONLY(inode)) { |
inode | 192 | fs/open.c | iput(inode); |
inode | 200 | fs/open.c | iput(inode); |
inode | 209 | fs/open.c | if ((error = permission(inode,MAY_WRITE)) != 0) { |
inode | 210 | fs/open.c | iput(inode); |
inode | 218 | fs/open.c | inode->i_dirt = 1; |
inode | 219 | fs/open.c | error = notify_change(inode, &newattrs); |
inode | 220 | fs/open.c | iput(inode); |
inode | 230 | fs/open.c | struct inode * inode; |
inode | 240 | fs/open.c | res = namei(filename,&inode); |
inode | 242 | fs/open.c | res = permission(inode, mode); |
inode | 243 | fs/open.c | iput(inode); |
inode | 252 | fs/open.c | struct inode * inode; |
inode | 255 | fs/open.c | error = namei(filename,&inode); |
inode | 258 | fs/open.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 259 | fs/open.c | iput(inode); |
inode | 262 | fs/open.c | if ((error = permission(inode,MAY_EXEC)) != 0) { |
inode | 263 | fs/open.c | iput(inode); |
inode | 267 | fs/open.c | current->fs->pwd = inode; |
inode | 273 | fs/open.c | struct inode * inode; |
inode | 279 | fs/open.c | if (!(inode = file->f_inode)) |
inode | 281 | fs/open.c | if (!S_ISDIR(inode->i_mode)) |
inode | 283 | fs/open.c | if ((error = permission(inode,MAY_EXEC)) != 0) |
inode | 286 | fs/open.c | current->fs->pwd = inode; |
inode | 287 | fs/open.c | inode->i_count++; |
inode | 293 | fs/open.c | struct inode * inode; |
inode | 296 | fs/open.c | error = namei(filename,&inode); |
inode | 299 | fs/open.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 300 | fs/open.c | iput(inode); |
inode | 304 | fs/open.c | iput(inode); |
inode | 308 | fs/open.c | current->fs->root = inode; |
inode | 314 | fs/open.c | struct inode * inode; |
inode | 320 | fs/open.c | if (!(inode = file->f_inode)) |
inode | 322 | fs/open.c | if (IS_RDONLY(inode)) |
inode | 324 | fs/open.c | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) |
inode | 327 | fs/open.c | mode = inode->i_mode; |
inode | 328 | fs/open.c | newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); |
inode | 331 | fs/open.c | inode->i_dirt = 1; |
inode | 332 | fs/open.c | return notify_change(inode, &newattrs); |
inode | 337 | fs/open.c | struct inode * inode; |
inode | 341 | fs/open.c | error = namei(filename,&inode); |
inode | 344 | fs/open.c | if (IS_RDONLY(inode)) { |
inode | 345 | fs/open.c | iput(inode); |
inode | 348 | fs/open.c | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) { |
inode | 349 | fs/open.c | iput(inode); |
inode | 353 | fs/open.c | mode = inode->i_mode; |
inode | 354 | fs/open.c | newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); |
inode | 357 | fs/open.c | inode->i_dirt = 1; |
inode | 358 | fs/open.c | error = notify_change(inode, &newattrs); |
inode | 359 | fs/open.c | iput(inode); |
inode | 365 | fs/open.c | struct inode * inode; |
inode | 371 | fs/open.c | if (!(inode = file->f_inode)) |
inode | 373 | fs/open.c | if (IS_RDONLY(inode)) |
inode | 375 | fs/open.c | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) |
inode | 378 | fs/open.c | user = inode->i_uid; |
inode | 380 | fs/open.c | group = inode->i_gid; |
inode | 381 | fs/open.c | newattrs.ia_mode = inode->i_mode; |
inode | 389 | fs/open.c | if (user != inode->i_uid && (inode->i_mode & S_ISUID)) { |
inode | 396 | fs/open.c | if (group != inode->i_gid && (inode->i_mode & S_ISGID)) { |
inode | 400 | fs/open.c | inode->i_dirt = 1; |
inode | 401 | fs/open.c | return notify_change(inode, &newattrs); |
inode | 406 | fs/open.c | struct inode * inode; |
inode | 410 | fs/open.c | error = lnamei(filename,&inode); |
inode | 413 | fs/open.c | if (IS_RDONLY(inode)) { |
inode | 414 | fs/open.c | iput(inode); |
inode | 417 | fs/open.c | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) { |
inode | 418 | fs/open.c | iput(inode); |
inode | 422 | fs/open.c | user = inode->i_uid; |
inode | 424 | fs/open.c | group = inode->i_gid; |
inode | 425 | fs/open.c | newattrs.ia_mode = inode->i_mode; |
inode | 433 | fs/open.c | if (user != inode->i_uid && (inode->i_mode & S_ISUID)) { |
inode | 440 | fs/open.c | if (group != inode->i_gid && (inode->i_mode & S_ISGID)) { |
inode | 444 | fs/open.c | inode->i_dirt = 1; |
inode | 445 | fs/open.c | error = notify_change(inode, &newattrs); |
inode | 446 | fs/open.c | iput(inode); |
inode | 466 | fs/open.c | struct inode * inode; |
inode | 479 | fs/open.c | error = open_namei(filename,flag,mode,&inode,NULL); |
inode | 483 | fs/open.c | error = get_write_access(inode); |
inode | 488 | fs/open.c | f->f_inode = inode; |
inode | 492 | fs/open.c | if (inode->i_op) |
inode | 493 | fs/open.c | f->f_op = inode->i_op->default_file_ops; |
inode | 495 | fs/open.c | error = f->f_op->open(inode,f); |
inode | 515 | fs/open.c | f->f_op->release(inode,f); |
inode | 518 | fs/open.c | put_write_access(inode); |
inode | 520 | fs/open.c | iput(inode); |
inode | 546 | fs/open.c | struct inode *inode; |
inode | 552 | fs/open.c | inode = filp->f_inode; |
inode | 553 | fs/open.c | if (inode) |
inode | 560 | fs/open.c | filp->f_op->release(inode,filp); |
inode | 563 | fs/open.c | if (filp->f_mode & 2) put_write_access(inode); |
inode | 564 | fs/open.c | iput(inode); |
inode | 25 | fs/pipe.c | static int pipe_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 31 | fs/pipe.c | if (PIPE_LOCK(*inode)) |
inode | 33 | fs/pipe.c | if (PIPE_EMPTY(*inode)) |
inode | 34 | fs/pipe.c | if (PIPE_WRITERS(*inode)) |
inode | 38 | fs/pipe.c | } else while (PIPE_EMPTY(*inode) || PIPE_LOCK(*inode)) { |
inode | 39 | fs/pipe.c | if (PIPE_EMPTY(*inode)) { |
inode | 40 | fs/pipe.c | if (!PIPE_WRITERS(*inode)) |
inode | 45 | fs/pipe.c | interruptible_sleep_on(&PIPE_WAIT(*inode)); |
inode | 47 | fs/pipe.c | PIPE_LOCK(*inode)++; |
inode | 48 | fs/pipe.c | while (count>0 && (size = PIPE_SIZE(*inode))) { |
inode | 49 | fs/pipe.c | chars = PIPE_MAX_RCHUNK(*inode); |
inode | 55 | fs/pipe.c | pipebuf = PIPE_BASE(*inode)+PIPE_START(*inode); |
inode | 56 | fs/pipe.c | PIPE_START(*inode) += chars; |
inode | 57 | fs/pipe.c | PIPE_START(*inode) &= (PIPE_BUF-1); |
inode | 58 | fs/pipe.c | PIPE_LEN(*inode) -= chars; |
inode | 63 | fs/pipe.c | PIPE_LOCK(*inode)--; |
inode | 64 | fs/pipe.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 67 | fs/pipe.c | if (PIPE_WRITERS(*inode)) |
inode | 72 | fs/pipe.c | static int pipe_write(struct inode * inode, struct file * filp, const char * buf, int count) |
inode | 77 | fs/pipe.c | if (!PIPE_READERS(*inode)) { /* no readers */ |
inode | 87 | fs/pipe.c | while ((PIPE_FREE(*inode) < free) || PIPE_LOCK(*inode)) { |
inode | 88 | fs/pipe.c | if (!PIPE_READERS(*inode)) { /* no readers */ |
inode | 96 | fs/pipe.c | interruptible_sleep_on(&PIPE_WAIT(*inode)); |
inode | 98 | fs/pipe.c | PIPE_LOCK(*inode)++; |
inode | 99 | fs/pipe.c | while (count>0 && (free = PIPE_FREE(*inode))) { |
inode | 100 | fs/pipe.c | chars = PIPE_MAX_WCHUNK(*inode); |
inode | 105 | fs/pipe.c | pipebuf = PIPE_BASE(*inode)+PIPE_END(*inode); |
inode | 107 | fs/pipe.c | PIPE_LEN(*inode) += chars; |
inode | 112 | fs/pipe.c | PIPE_LOCK(*inode)--; |
inode | 113 | fs/pipe.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 119 | fs/pipe.c | static int pipe_lseek(struct inode * inode, struct file * file, off_t offset, int orig) |
inode | 124 | fs/pipe.c | static int bad_pipe_r(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 129 | fs/pipe.c | static int bad_pipe_w(struct inode * inode, struct file * filp, const char * buf, int count) |
inode | 134 | fs/pipe.c | static int pipe_ioctl(struct inode *pino, struct file * filp, |
inode | 150 | fs/pipe.c | static int pipe_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
inode | 154 | fs/pipe.c | if (!PIPE_EMPTY(*inode) || !PIPE_WRITERS(*inode)) |
inode | 156 | fs/pipe.c | select_wait(&PIPE_WAIT(*inode), wait); |
inode | 159 | fs/pipe.c | if (!PIPE_FULL(*inode) || !PIPE_READERS(*inode)) |
inode | 161 | fs/pipe.c | select_wait(&PIPE_WAIT(*inode), wait); |
inode | 164 | fs/pipe.c | if (!PIPE_READERS(*inode) || !PIPE_WRITERS(*inode)) |
inode | 166 | fs/pipe.c | select_wait(&inode->i_wait,wait); |
inode | 176 | fs/pipe.c | static int fifo_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
inode | 180 | fs/pipe.c | if (!PIPE_EMPTY(*inode)) |
inode | 182 | fs/pipe.c | select_wait(&PIPE_WAIT(*inode), wait); |
inode | 185 | fs/pipe.c | if (!PIPE_FULL(*inode) || !PIPE_READERS(*inode)) |
inode | 187 | fs/pipe.c | select_wait(&PIPE_WAIT(*inode), wait); |
inode | 190 | fs/pipe.c | if (!PIPE_READERS(*inode) || !PIPE_WRITERS(*inode)) |
inode | 192 | fs/pipe.c | select_wait(&inode->i_wait,wait); |
inode | 203 | fs/pipe.c | static int connect_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 205 | fs/pipe.c | while (!PIPE_SIZE(*inode)) { |
inode | 206 | fs/pipe.c | if (PIPE_WRITERS(*inode)) |
inode | 210 | fs/pipe.c | wake_up_interruptible(& PIPE_WAIT(*inode)); |
inode | 213 | fs/pipe.c | interruptible_sleep_on(& PIPE_WAIT(*inode)); |
inode | 216 | fs/pipe.c | return pipe_read(inode,filp,buf,count); |
inode | 219 | fs/pipe.c | static int connect_select(struct inode * inode, struct file * filp, int sel_type, select_table * wait) |
inode | 223 | fs/pipe.c | if (!PIPE_EMPTY(*inode)) { |
inode | 227 | fs/pipe.c | select_wait(&PIPE_WAIT(*inode), wait); |
inode | 230 | fs/pipe.c | if (!PIPE_FULL(*inode)) |
inode | 232 | fs/pipe.c | select_wait(&PIPE_WAIT(*inode), wait); |
inode | 235 | fs/pipe.c | if (!PIPE_READERS(*inode) || !PIPE_WRITERS(*inode)) |
inode | 237 | fs/pipe.c | select_wait(&inode->i_wait,wait); |
inode | 247 | fs/pipe.c | static void pipe_read_release(struct inode * inode, struct file * filp) |
inode | 249 | fs/pipe.c | PIPE_READERS(*inode)--; |
inode | 250 | fs/pipe.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 253 | fs/pipe.c | static void pipe_write_release(struct inode * inode, struct file * filp) |
inode | 255 | fs/pipe.c | PIPE_WRITERS(*inode)--; |
inode | 256 | fs/pipe.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 259 | fs/pipe.c | static void pipe_rdwr_release(struct inode * inode, struct file * filp) |
inode | 261 | fs/pipe.c | PIPE_READERS(*inode)--; |
inode | 262 | fs/pipe.c | PIPE_WRITERS(*inode)--; |
inode | 263 | fs/pipe.c | wake_up_interruptible(&PIPE_WAIT(*inode)); |
inode | 381 | fs/pipe.c | struct inode * inode; |
inode | 385 | fs/pipe.c | inode = get_pipe_inode(); |
inode | 386 | fs/pipe.c | if (!inode) |
inode | 393 | fs/pipe.c | iput(inode); |
inode | 405 | fs/pipe.c | iput(inode); |
inode | 412 | fs/pipe.c | f[0]->f_inode = f[1]->f_inode = inode; |
inode | 57 | fs/proc/array.c | static int read_core(struct inode * inode, struct file * file,char * buf, int count) |
inode | 130 | fs/proc/array.c | static int read_profile(struct inode *inode, struct file *file, char *buf, int count) |
inode | 157 | fs/proc/array.c | static int write_profile(struct inode * inode, struct file * file, const char * buf, int count) |
inode | 852 | fs/proc/array.c | static int array_read(struct inode * inode, struct file * file,char * buf, int count) |
inode | 866 | fs/proc/array.c | type = inode->i_ino; |
inode | 928 | fs/proc/array.c | static int arraylong_read (struct inode * inode, struct file * file, char * buf, int count) |
inode | 930 | fs/proc/array.c | unsigned int pid = inode->i_ino >> 16; |
inode | 931 | fs/proc/array.c | unsigned int type = inode->i_ino & 0x0000ffff; |
inode | 50 | fs/proc/base.c | static void proc_pid_fill_inode(struct inode * inode) |
inode | 53 | fs/proc/base.c | int pid = inode->i_ino >> 16; |
inode | 54 | fs/proc/base.c | int ino = inode->i_ino & 0xffff; |
inode | 59 | fs/proc/base.c | inode->i_uid = p->euid; |
inode | 60 | fs/proc/base.c | inode->i_gid = p->gid; |
inode | 16 | fs/proc/fd.c | static int proc_readfd(struct inode *, struct file *, void *, filldir_t); |
inode | 17 | fs/proc/fd.c | static int proc_lookupfd(struct inode *,const char *,int,struct inode **); |
inode | 53 | fs/proc/fd.c | static int proc_lookupfd(struct inode * dir,const char * name, int len, |
inode | 54 | fs/proc/fd.c | struct inode ** result) |
inode | 119 | fs/proc/fd.c | static int proc_readfd(struct inode * inode, struct file * filp, |
inode | 128 | fs/proc/fd.c | if (!inode || !S_ISDIR(inode->i_mode)) |
inode | 130 | fs/proc/fd.c | ino = inode->i_ino; |
inode | 137 | fs/proc/fd.c | unsigned long ino = inode->i_ino; |
inode | 19 | fs/proc/inode.c | static void proc_put_inode(struct inode *inode) |
inode | 21 | fs/proc/inode.c | if (inode->i_nlink) |
inode | 23 | fs/proc/inode.c | inode->i_size = 0; |
inode | 74 | fs/proc/inode.c | struct inode * proc_get_inode(struct super_block * s, int ino, struct proc_dir_entry * de) |
inode | 76 | fs/proc/inode.c | struct inode * inode = iget(s, ino); |
inode | 77 | fs/proc/inode.c | if (inode) { |
inode | 78 | fs/proc/inode.c | inode->u.generic_ip = (void *) de; |
inode | 81 | fs/proc/inode.c | inode->i_mode = de->mode; |
inode | 82 | fs/proc/inode.c | inode->i_uid = de->uid; |
inode | 83 | fs/proc/inode.c | inode->i_gid = de->gid; |
inode | 86 | fs/proc/inode.c | inode->i_size = de->size; |
inode | 88 | fs/proc/inode.c | inode->i_op = de->ops; |
inode | 90 | fs/proc/inode.c | inode->i_nlink = de->nlink; |
inode | 92 | fs/proc/inode.c | de->fill_inode(inode); |
inode | 95 | fs/proc/inode.c | return inode; |
inode | 132 | fs/proc/inode.c | void proc_read_inode(struct inode * inode) |
inode | 138 | fs/proc/inode.c | inode->i_op = NULL; |
inode | 139 | fs/proc/inode.c | inode->i_mode = 0; |
inode | 140 | fs/proc/inode.c | inode->i_uid = 0; |
inode | 141 | fs/proc/inode.c | inode->i_gid = 0; |
inode | 142 | fs/proc/inode.c | inode->i_nlink = 1; |
inode | 143 | fs/proc/inode.c | inode->i_size = 0; |
inode | 144 | fs/proc/inode.c | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
inode | 145 | fs/proc/inode.c | inode->i_blocks = 0; |
inode | 146 | fs/proc/inode.c | inode->i_blksize = 1024; |
inode | 147 | fs/proc/inode.c | ino = inode->i_ino; |
inode | 156 | fs/proc/inode.c | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO; |
inode | 157 | fs/proc/inode.c | inode->i_nlink = 2; |
inode | 160 | fs/proc/inode.c | inode->i_nlink++; |
inode | 167 | fs/proc/inode.c | inode->i_mode = S_IFREG | S_IRUSR; |
inode | 168 | fs/proc/inode.c | inode->i_op = &proc_kmsg_inode_operations; |
inode | 171 | fs/proc/inode.c | inode->i_nlink = 2; |
inode | 174 | fs/proc/inode.c | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO; |
inode | 175 | fs/proc/inode.c | inode->i_nlink = 2; |
inode | 176 | fs/proc/inode.c | inode->i_op = &proc_scsi_inode_operations; |
inode | 179 | fs/proc/inode.c | inode->i_mode = S_IFREG | S_IRUSR; |
inode | 180 | fs/proc/inode.c | inode->i_op = &proc_kcore_inode_operations; |
inode | 181 | fs/proc/inode.c | inode->i_size = (MAP_NR(high_memory) << PAGE_SHIFT) + PAGE_SIZE; |
inode | 184 | fs/proc/inode.c | inode->i_mode = S_IFREG | S_IRUGO | S_IWUSR; |
inode | 185 | fs/proc/inode.c | inode->i_op = &proc_profile_inode_operations; |
inode | 186 | fs/proc/inode.c | inode->i_size = (1+prof_len) * sizeof(unsigned long); |
inode | 189 | fs/proc/inode.c | inode->i_mode = S_IFREG | S_IRUGO; |
inode | 190 | fs/proc/inode.c | inode->i_op = &proc_array_inode_operations; |
inode | 197 | fs/proc/inode.c | inode->i_uid = p->euid; |
inode | 198 | fs/proc/inode.c | inode->i_gid = p->egid; |
inode | 202 | fs/proc/inode.c | inode->i_nlink = 4; |
inode | 205 | fs/proc/inode.c | inode->i_op = &proc_mem_inode_operations; |
inode | 206 | fs/proc/inode.c | inode->i_mode = S_IFREG | S_IRUSR | S_IWUSR; |
inode | 211 | fs/proc/inode.c | inode->i_op = &proc_link_inode_operations; |
inode | 212 | fs/proc/inode.c | inode->i_size = 64; |
inode | 213 | fs/proc/inode.c | inode->i_mode = S_IFLNK | S_IRWXU; |
inode | 216 | fs/proc/inode.c | inode->i_mode = S_IFDIR | S_IRUSR | S_IXUSR; |
inode | 217 | fs/proc/inode.c | inode->i_op = &proc_fd_inode_operations; |
inode | 218 | fs/proc/inode.c | inode->i_nlink = 2; |
inode | 221 | fs/proc/inode.c | inode->i_mode = S_IFREG | S_IRUSR; |
inode | 222 | fs/proc/inode.c | inode->i_op = &proc_array_inode_operations; |
inode | 227 | fs/proc/inode.c | inode->i_mode = S_IFREG | S_IRUGO; |
inode | 228 | fs/proc/inode.c | inode->i_op = &proc_array_inode_operations; |
inode | 231 | fs/proc/inode.c | inode->i_mode = S_IFIFO | S_IRUGO; |
inode | 232 | fs/proc/inode.c | inode->i_op = &proc_arraylong_inode_operations; |
inode | 240 | fs/proc/inode.c | inode->i_op = &proc_link_inode_operations; |
inode | 241 | fs/proc/inode.c | inode->i_size = 64; |
inode | 242 | fs/proc/inode.c | inode->i_mode = S_IFLNK; |
inode | 244 | fs/proc/inode.c | inode->i_mode |= S_IRUSR | S_IXUSR; |
inode | 246 | fs/proc/inode.c | inode->i_mode |= S_IWUSR | S_IXUSR; |
inode | 252 | fs/proc/inode.c | void proc_write_inode(struct inode * inode) |
inode | 254 | fs/proc/inode.c | inode->i_dirt=0; |
inode | 21 | fs/proc/kmsg.c | static int kmsg_open(struct inode * inode, struct file * file) |
inode | 26 | fs/proc/kmsg.c | static void kmsg_release(struct inode * inode, struct file * file) |
inode | 31 | fs/proc/kmsg.c | static int kmsg_read(struct inode * inode, struct file * file,char * buf, int count) |
inode | 36 | fs/proc/kmsg.c | static int kmsg_select(struct inode *inode, struct file *file, int sel_type, select_table * wait) |
inode | 18 | fs/proc/link.c | static int proc_readlink(struct inode *, char *, int); |
inode | 19 | fs/proc/link.c | static int proc_follow_link(struct inode *, struct inode *, int, int, |
inode | 20 | fs/proc/link.c | struct inode **); |
inode | 63 | fs/proc/link.c | static int proc_follow_link(struct inode * dir, struct inode * inode, |
inode | 64 | fs/proc/link.c | int flag, int mode, struct inode ** res_inode) |
inode | 68 | fs/proc/link.c | struct inode * new_inode; |
inode | 74 | fs/proc/link.c | if (!inode) |
inode | 76 | fs/proc/link.c | if ((error = permission(inode, MAY_EXEC)) != 0){ |
inode | 77 | fs/proc/link.c | iput(inode); |
inode | 80 | fs/proc/link.c | ino = inode->i_ino; |
inode | 87 | fs/proc/link.c | iput(inode); |
inode | 128 | fs/proc/link.c | iput(inode); |
inode | 136 | fs/proc/link.c | static int proc_readlink(struct inode * inode, char * buffer, int buflen) |
inode | 142 | fs/proc/link.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 143 | fs/proc/link.c | iput(inode); |
inode | 146 | fs/proc/link.c | i = proc_follow_link(NULL, inode, 0, 0, &inode); |
inode | 149 | fs/proc/link.c | if (!inode) |
inode | 151 | fs/proc/link.c | dev = kdev_t_to_nr(inode->i_dev); |
inode | 152 | fs/proc/link.c | ino = inode->i_ino; |
inode | 153 | fs/proc/link.c | iput(inode); |
inode | 53 | fs/proc/mem.c | static int mem_read(struct inode * inode, struct file * file,char * buf, int count) |
inode | 66 | fs/proc/mem.c | pid = inode->i_ino; |
inode | 118 | fs/proc/mem.c | static int mem_write(struct inode * inode, struct file * file,char * buf, int count) |
inode | 132 | fs/proc/mem.c | pid = inode->i_ino; |
inode | 186 | fs/proc/mem.c | static int mem_lseek(struct inode * inode, struct file * file, off_t offset, int orig) |
inode | 203 | fs/proc/mem.c | int mem_mmap(struct inode * inode, struct file * file, |
inode | 218 | fs/proc/mem.c | if (task[i] && task[i]->pid == (inode->i_ino >> 16)) { |
inode | 40 | fs/proc/net.c | static int proc_readnet(struct inode * inode, struct file * file, |
inode | 51 | fs/proc/net.c | dp = (struct proc_dir_entry *) inode->u.generic_ip; |
inode | 22 | fs/proc/root.c | static int proc_root_readdir(struct inode *, struct file *, void *, filldir_t); |
inode | 23 | fs/proc/root.c | static int proc_root_lookup(struct inode *,const char *,int,struct inode **); |
inode | 165 | fs/proc/root.c | static int proc_self_followlink(struct inode * dir, struct inode * inode, |
inode | 166 | fs/proc/root.c | int flag, int mode, struct inode ** res_inode) |
inode | 169 | fs/proc/root.c | *res_inode = proc_get_inode(inode->i_sb, (current->pid << 16) + PROC_PID_INO, &proc_pid); |
inode | 170 | fs/proc/root.c | iput(inode); |
inode | 176 | fs/proc/root.c | static int proc_self_readlink(struct inode * inode, char * buffer, int buflen) |
inode | 181 | fs/proc/root.c | iput(inode); |
inode | 318 | fs/proc/root.c | int proc_lookup(struct inode * dir,const char * name, int len, |
inode | 319 | fs/proc/root.c | struct inode ** result) |
inode | 344 | fs/proc/root.c | struct inode * inode; |
inode | 345 | fs/proc/root.c | inode = proc_get_inode(dir->i_sb, de->parent->low_ino, de->parent); |
inode | 347 | fs/proc/root.c | if (!inode) |
inode | 349 | fs/proc/root.c | *result = inode; |
inode | 374 | fs/proc/root.c | static int proc_root_lookup(struct inode * dir,const char * name, int len, |
inode | 375 | fs/proc/root.c | struct inode ** result) |
inode | 427 | fs/proc/root.c | int proc_readdir(struct inode * inode, struct file * filp, |
inode | 434 | fs/proc/root.c | if (!inode || !S_ISDIR(inode->i_mode)) |
inode | 436 | fs/proc/root.c | ino = inode->i_ino; |
inode | 437 | fs/proc/root.c | de = (struct proc_dir_entry *) inode->u.generic_ip; |
inode | 479 | fs/proc/root.c | static int proc_root_readdir(struct inode * inode, struct file * filp, |
inode | 488 | fs/proc/root.c | int error = proc_readdir(inode, filp, dirent, filldir); |
inode | 32 | fs/proc/scsi.c | static int proc_readscsi(struct inode * inode, struct file * file, |
inode | 34 | fs/proc/scsi.c | static int proc_writescsi(struct inode * inode, struct file * file, |
inode | 36 | fs/proc/scsi.c | static int proc_scsilseek(struct inode *, struct file *, off_t, int); |
inode | 102 | fs/proc/scsi.c | static int proc_readscsi(struct inode * inode, struct file * file, |
inode | 125 | fs/proc/scsi.c | length = dispatch_scsi_info_ptr(inode->i_ino, page, &start, |
inode | 161 | fs/proc/scsi.c | static int proc_writescsi(struct inode * inode, struct file * file, |
inode | 175 | fs/proc/scsi.c | ret = dispatch_scsi_info_ptr(inode->i_ino, page, 0, 0, count, 1); |
inode | 184 | fs/proc/scsi.c | static int proc_scsilseek(struct inode * inode, struct file * file, |
inode | 197 | fs/proc/scsi.c | proc_readscsi(inode, file, 0, -1); /* seek in it */ |
inode | 107 | fs/read_write.c | struct inode * inode; |
inode | 109 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->files->fd[fd]) || !(inode=file->f_inode)) |
inode | 120 | fs/read_write.c | return file->f_op->read(inode,file,buf,count); |
inode | 127 | fs/read_write.c | struct inode * inode; |
inode | 130 | fs/read_write.c | if (fd>=NR_OPEN || !(file=current->files->fd[fd]) || !(inode=file->f_inode)) |
inode | 141 | fs/read_write.c | written = file->f_op->write(inode,file,buf,count); |
inode | 146 | fs/read_write.c | if (written > 0 && !suser() && (inode->i_mode & (S_ISUID | S_ISGID))) { |
inode | 148 | fs/read_write.c | newattrs.ia_mode = inode->i_mode & ~(S_ISUID | S_ISGID); |
inode | 150 | fs/read_write.c | notify_change(inode, &newattrs); |
inode | 155 | fs/read_write.c | static int sock_readv_writev(int type, struct inode * inode, struct file * file, |
inode | 161 | fs/read_write.c | sock = &inode->u.socket_i; |
inode | 183 | fs/read_write.c | typedef int (*IO_fn_t)(struct inode *, struct file *, char *, int); |
inode | 185 | fs/read_write.c | static int do_readv_writev(int type, struct inode * inode, struct file * file, |
inode | 218 | fs/read_write.c | if (inode->i_sock) |
inode | 219 | fs/read_write.c | return sock_readv_writev(type, inode, file, iov, count, tot_len); |
inode | 236 | fs/read_write.c | nr = fn(inode, file, base, len); |
inode | 253 | fs/read_write.c | struct inode * inode; |
inode | 255 | fs/read_write.c | if (fd >= NR_OPEN || !(file = current->files->fd[fd]) || !(inode = file->f_inode)) |
inode | 259 | fs/read_write.c | return do_readv_writev(VERIFY_WRITE, inode, file, vector, count); |
inode | 265 | fs/read_write.c | struct inode * inode; |
inode | 267 | fs/read_write.c | if (fd >= NR_OPEN || !(file = current->files->fd[fd]) || !(inode = file->f_inode)) |
inode | 271 | fs/read_write.c | return do_readv_writev(VERIFY_READ, inode, file, vector, count); |
inode | 72 | fs/select.c | struct inode * inode; |
inode | 74 | fs/select.c | int (*select) (struct inode *, struct file *, int, select_table *); |
inode | 76 | fs/select.c | inode = file->f_inode; |
inode | 78 | fs/select.c | return select(inode, file, flag, wait) |
inode | 79 | fs/select.c | || (wait && select(inode, file, flag, NULL)); |
inode | 22 | fs/smbfs/dir.c | smb_dir_read(struct inode *inode, struct file *filp, char *buf, int count); |
inode | 25 | fs/smbfs/dir.c | smb_readdir(struct inode *inode, struct file *filp, |
inode | 29 | fs/smbfs/dir.c | get_pname(struct inode *dir, const char *name, int len, |
inode | 33 | fs/smbfs/dir.c | get_pname_static(struct inode *dir, const char *name, int len, |
inode | 36 | fs/smbfs/dir.c | static struct inode * |
inode | 37 | fs/smbfs/dir.c | smb_iget(struct inode *dir, char *path, struct smb_dirent *finfo); |
inode | 46 | fs/smbfs/dir.c | smb_lookup(struct inode *dir, const char *__name, |
inode | 47 | fs/smbfs/dir.c | int len, struct inode **result); |
inode | 50 | fs/smbfs/dir.c | smb_create(struct inode *dir, const char *name, int len, int mode, |
inode | 51 | fs/smbfs/dir.c | struct inode **result); |
inode | 54 | fs/smbfs/dir.c | smb_mkdir(struct inode *dir, const char *name, int len, int mode); |
inode | 57 | fs/smbfs/dir.c | smb_rmdir(struct inode *dir, const char *name, int len); |
inode | 60 | fs/smbfs/dir.c | smb_unlink(struct inode *dir, const char *name, int len); |
inode | 63 | fs/smbfs/dir.c | smb_rename(struct inode *old_dir, const char *old_name, int old_len, |
inode | 64 | fs/smbfs/dir.c | struct inode *new_dir, const char *new_name, int new_len); |
inode | 119 | fs/smbfs/dir.c | smb_dir_read(struct inode *inode, struct file *filp, char *buf, int count) |
inode | 156 | fs/smbfs/dir.c | smb_readdir(struct inode *inode, struct file *filp, |
inode | 162 | fs/smbfs/dir.c | struct smb_server *server = SMB_SERVER(inode); |
inode | 166 | fs/smbfs/dir.c | inode->i_ino, c_ino); |
inode | 168 | fs/smbfs/dir.c | if (!inode || !S_ISDIR(inode->i_mode)) { |
inode | 197 | fs/smbfs/dir.c | smb_invalid_dir_cache(inode->i_ino); |
inode | 200 | fs/smbfs/dir.c | if (inode->i_ino == c_ino) { |
inode | 215 | fs/smbfs/dir.c | result = smb_proc_readdir(server, inode, |
inode | 226 | fs/smbfs/dir.c | c_ino = inode->i_ino; |
inode | 264 | fs/smbfs/dir.c | if ((result = get_pname_static(inode, entry->path, len, |
inode | 286 | fs/smbfs/dir.c | if ( (inode->i_ino != c_ino) |
inode | 341 | fs/smbfs/dir.c | get_pname_static(struct inode *dir, const char *name, int len, |
inode | 430 | fs/smbfs/dir.c | get_pname(struct inode *dir, const char *name, int len, |
inode | 461 | fs/smbfs/dir.c | static struct inode * |
inode | 462 | fs/smbfs/dir.c | smb_iget(struct inode *dir, char *path, struct smb_dirent *finfo) |
inode | 465 | fs/smbfs/dir.c | struct inode *inode; |
inode | 524 | fs/smbfs/dir.c | if (!(inode = iget(dir->i_sb, (int)new_inode_info))) { |
inode | 529 | fs/smbfs/dir.c | return inode; |
inode | 656 | fs/smbfs/dir.c | smb_lookup(struct inode *dir, const char *__name, int len, |
inode | 657 | fs/smbfs/dir.c | struct inode **result) |
inode | 760 | fs/smbfs/dir.c | smb_create(struct inode *dir, const char *name, int len, int mode, |
inode | 761 | fs/smbfs/dir.c | struct inode **result) |
inode | 806 | fs/smbfs/dir.c | smb_mkdir(struct inode *dir, const char *name, int len, int mode) |
inode | 832 | fs/smbfs/dir.c | smb_rmdir(struct inode *dir, const char *name, int len) |
inode | 857 | fs/smbfs/dir.c | smb_unlink(struct inode *dir, const char *name, int len) |
inode | 883 | fs/smbfs/dir.c | smb_rename(struct inode *old_dir, const char *old_name, int old_len, |
inode | 884 | fs/smbfs/dir.c | struct inode *new_dir, const char *new_name, int new_len) |
inode | 21 | fs/smbfs/file.c | smb_fsync(struct inode *inode, struct file *file) |
inode | 27 | fs/smbfs/file.c | smb_make_open(struct inode *i, int right) |
inode | 63 | fs/smbfs/file.c | smb_file_read(struct inode *inode, struct file *file, char *buf, int count) |
inode | 69 | fs/smbfs/file.c | DPRINTK("smb_file_read: enter %s\n", SMB_FINFO(inode)->path); |
inode | 71 | fs/smbfs/file.c | if (!inode) { |
inode | 76 | fs/smbfs/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 78 | fs/smbfs/file.c | inode->i_mode); |
inode | 82 | fs/smbfs/file.c | if ((errno = smb_make_open(inode, O_RDONLY)) != 0) |
inode | 87 | fs/smbfs/file.c | if (pos + count > inode->i_size) |
inode | 88 | fs/smbfs/file.c | count = inode->i_size - pos; |
inode | 92 | fs/smbfs/file.c | bufsize = SMB_SERVER(inode)->max_xmit - SMB_HEADER_LEN - 5 * 2 - 5; |
inode | 102 | fs/smbfs/file.c | if ((SMB_SERVER(inode)->blkmode & 1) != 0) { |
inode | 105 | fs/smbfs/file.c | result = smb_proc_read_raw(SMB_SERVER(inode), |
inode | 106 | fs/smbfs/file.c | SMB_FINFO(inode), |
inode | 113 | fs/smbfs/file.c | result = smb_proc_read(SMB_SERVER(inode), |
inode | 114 | fs/smbfs/file.c | SMB_FINFO(inode), |
inode | 131 | fs/smbfs/file.c | if (!IS_RDONLY(inode)) inode->i_atime = CURRENT_TIME; |
inode | 132 | fs/smbfs/file.c | inode->i_dirt = 1; |
inode | 134 | fs/smbfs/file.c | DPRINTK("smb_file_read: exit %s\n", SMB_FINFO(inode)->path); |
inode | 140 | fs/smbfs/file.c | smb_file_write(struct inode *inode, struct file *file, const char *buf, int count) |
inode | 146 | fs/smbfs/file.c | if (!inode) { |
inode | 151 | fs/smbfs/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 153 | fs/smbfs/file.c | inode->i_mode); |
inode | 157 | fs/smbfs/file.c | DPRINTK("smb_file_write: enter %s\n", SMB_FINFO(inode)->path); |
inode | 162 | fs/smbfs/file.c | if ((errno = smb_make_open(inode, O_RDWR)) != 0) |
inode | 168 | fs/smbfs/file.c | pos = inode->i_size; |
inode | 170 | fs/smbfs/file.c | bufsize = SMB_SERVER(inode)->max_xmit - SMB_HEADER_LEN - 5 * 2 - 5; |
inode | 175 | fs/smbfs/file.c | SMB_SERVER(inode)->blkmode, |
inode | 176 | fs/smbfs/file.c | SMB_SERVER(inode)->blkmode & 2); |
inode | 183 | fs/smbfs/file.c | if ((SMB_SERVER(inode)->blkmode & 2) != 0) { |
inode | 186 | fs/smbfs/file.c | result = smb_proc_write_raw(SMB_SERVER(inode), |
inode | 187 | fs/smbfs/file.c | SMB_FINFO(inode), |
inode | 194 | fs/smbfs/file.c | result = smb_proc_write(SMB_SERVER(inode), |
inode | 195 | fs/smbfs/file.c | SMB_FINFO(inode), |
inode | 211 | fs/smbfs/file.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 212 | fs/smbfs/file.c | inode->i_dirt = 1; |
inode | 216 | fs/smbfs/file.c | if (pos > inode->i_size) { |
inode | 217 | fs/smbfs/file.c | inode->i_size = pos; |
inode | 220 | fs/smbfs/file.c | DPRINTK("smb_file_write: exit %s\n", SMB_FINFO(inode)->path); |
inode | 27 | fs/smbfs/inode.c | static void smb_put_inode(struct inode *); |
inode | 28 | fs/smbfs/inode.c | static void smb_read_inode(struct inode *); |
inode | 48 | fs/smbfs/inode.c | smb_read_inode(struct inode *inode) |
inode | 57 | fs/smbfs/inode.c | = (struct smb_inode_info *)(inode->i_ino); |
inode | 60 | fs/smbfs/inode.c | struct smb_inode_info *root = &(SMB_SERVER(inode)->root); |
inode | 87 | fs/smbfs/inode.c | SMB_INOP(inode) = inode_info; |
inode | 89 | fs/smbfs/inode.c | if (SMB_INOP(inode)->finfo.attr & aDIR) |
inode | 90 | fs/smbfs/inode.c | inode->i_mode = SMB_SERVER(inode)->m.dir_mode; |
inode | 92 | fs/smbfs/inode.c | inode->i_mode = SMB_SERVER(inode)->m.file_mode; |
inode | 94 | fs/smbfs/inode.c | DDPRINTK("smb_read_inode: inode->i_mode = %u\n", inode->i_mode); |
inode | 96 | fs/smbfs/inode.c | inode->i_nlink = 1; |
inode | 97 | fs/smbfs/inode.c | inode->i_uid = SMB_SERVER(inode)->m.uid; |
inode | 98 | fs/smbfs/inode.c | inode->i_gid = SMB_SERVER(inode)->m.gid; |
inode | 99 | fs/smbfs/inode.c | inode->i_size = SMB_INOP(inode)->finfo.size; |
inode | 100 | fs/smbfs/inode.c | inode->i_blksize = 1024; |
inode | 101 | fs/smbfs/inode.c | inode->i_rdev = 0; |
inode | 102 | fs/smbfs/inode.c | if ((inode->i_blksize != 0) && (inode->i_size != 0)) |
inode | 103 | fs/smbfs/inode.c | inode->i_blocks = |
inode | 104 | fs/smbfs/inode.c | (inode->i_size - 1) / inode->i_blksize + 1; |
inode | 106 | fs/smbfs/inode.c | inode->i_blocks = 0; |
inode | 108 | fs/smbfs/inode.c | inode->i_mtime = SMB_INOP(inode)->finfo.mtime; |
inode | 109 | fs/smbfs/inode.c | inode->i_ctime = SMB_INOP(inode)->finfo.ctime; |
inode | 110 | fs/smbfs/inode.c | inode->i_atime = SMB_INOP(inode)->finfo.atime; |
inode | 112 | fs/smbfs/inode.c | if (S_ISREG(inode->i_mode)) |
inode | 113 | fs/smbfs/inode.c | inode->i_op = &smb_file_inode_operations; |
inode | 114 | fs/smbfs/inode.c | else if (S_ISDIR(inode->i_mode)) |
inode | 115 | fs/smbfs/inode.c | inode->i_op = &smb_dir_inode_operations; |
inode | 117 | fs/smbfs/inode.c | inode->i_op = NULL; |
inode | 122 | fs/smbfs/inode.c | smb_put_inode(struct inode *inode) |
inode | 124 | fs/smbfs/inode.c | struct smb_dirent *finfo = SMB_FINFO(inode); |
inode | 129 | fs/smbfs/inode.c | finfo->mtime = inode->i_mtime; |
inode | 131 | fs/smbfs/inode.c | if (smb_proc_close(SMB_SERVER(inode), finfo)) { |
inode | 137 | fs/smbfs/inode.c | smb_free_inode_info(SMB_INOP(inode)); |
inode | 139 | fs/smbfs/inode.c | if (S_ISDIR(inode->i_mode)) { |
inode | 141 | fs/smbfs/inode.c | inode->i_ino); |
inode | 142 | fs/smbfs/inode.c | smb_invalid_dir_cache(inode->i_ino); |
inode | 145 | fs/smbfs/inode.c | clear_inode(inode); |
inode | 334 | fs/smbfs/inode.c | smb_notify_change(struct inode *inode, struct iattr *attr) |
inode | 338 | fs/smbfs/inode.c | if ((error = inode_change_ok(inode, attr)) < 0) |
inode | 342 | fs/smbfs/inode.c | (attr->ia_uid != SMB_SERVER(inode)->m.uid))) |
inode | 346 | fs/smbfs/inode.c | (attr->ia_uid != SMB_SERVER(inode)->m.gid))) |
inode | 355 | fs/smbfs/inode.c | if ((error = smb_make_open(inode, O_WRONLY)) < 0) |
inode | 358 | fs/smbfs/inode.c | if ((error = smb_proc_trunc(SMB_SERVER(inode), |
inode | 359 | fs/smbfs/inode.c | SMB_FINFO(inode)->fileid, |
inode | 374 | fs/smbfs/inode.c | finfo.ctime = inode->i_ctime; |
inode | 379 | fs/smbfs/inode.c | finfo.mtime = inode->i_mtime; |
inode | 384 | fs/smbfs/inode.c | finfo.atime = inode->i_atime; |
inode | 386 | fs/smbfs/inode.c | if ((error = smb_proc_setattr(SMB_SERVER(inode), |
inode | 387 | fs/smbfs/inode.c | inode, &finfo)) >= 0) { |
inode | 388 | fs/smbfs/inode.c | inode->i_ctime = finfo.ctime; |
inode | 389 | fs/smbfs/inode.c | inode->i_mtime = finfo.mtime; |
inode | 390 | fs/smbfs/inode.c | inode->i_atime = finfo.atime; |
inode | 395 | fs/smbfs/inode.c | smb_invalid_dir_cache((unsigned long)(SMB_INOP(inode)->dir)); |
inode | 17 | fs/smbfs/ioctl.c | smb_ioctl (struct inode * inode, struct file * filp, |
inode | 28 | fs/smbfs/ioctl.c | put_fs_word(SMB_SERVER(inode)->m.mounted_uid, (uid_t*) arg); |
inode | 30 | fs/smbfs/mmap.c | struct inode * inode = area->vm_inode; |
inode | 46 | fs/smbfs/mmap.c | n = SMB_SERVER(inode)->max_xmit - SMB_HEADER_LEN - 5 * 2 - 3 - 10; |
inode | 48 | fs/smbfs/mmap.c | if (smb_make_open(inode, O_RDONLY) < 0) { |
inode | 63 | fs/smbfs/mmap.c | result = smb_proc_read(SMB_SERVER(inode), |
inode | 64 | fs/smbfs/mmap.c | SMB_FINFO(inode), pos, hunk, |
inode | 100 | fs/smbfs/mmap.c | smb_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
inode | 107 | fs/smbfs/mmap.c | if (!inode->i_sb || !S_ISREG(inode->i_mode)) |
inode | 109 | fs/smbfs/mmap.c | if (!IS_RDONLY(inode)) { |
inode | 110 | fs/smbfs/mmap.c | inode->i_atime = CURRENT_TIME; |
inode | 111 | fs/smbfs/mmap.c | inode->i_dirt = 1; |
inode | 114 | fs/smbfs/mmap.c | vma->vm_inode = inode; |
inode | 115 | fs/smbfs/mmap.c | inode->i_count++; |
inode | 935 | fs/smbfs/proc.c | smb_proc_readdir_short(struct smb_server *server, struct inode *dir, int fpos, |
inode | 1139 | fs/smbfs/proc.c | smb_proc_readdir_long(struct smb_server *server, struct inode *dir, int fpos, |
inode | 1366 | fs/smbfs/proc.c | smb_proc_readdir(struct smb_server *server, struct inode *dir, int fpos, |
inode | 1529 | fs/smbfs/proc.c | smb_proc_setattr(struct smb_server *server, struct inode *inode, |
inode | 1532 | fs/smbfs/proc.c | struct smb_dirent *finfo = SMB_FINFO(inode); |
inode | 1536 | fs/smbfs/proc.c | if ((result = smb_make_open(inode, O_RDWR)) < 0) |
inode | 110 | fs/smbfs/sock.c | struct inode *inode; |
inode | 116 | fs/smbfs/sock.c | || ((inode = file->f_inode) == NULL) |
inode | 117 | fs/smbfs/sock.c | || (!S_ISSOCK(inode->i_mode))) { |
inode | 124 | fs/smbfs/sock.c | sock = &(inode->u.socket_i); |
inode | 158 | fs/smbfs/sock.c | struct inode *inode; |
inode | 164 | fs/smbfs/sock.c | || ((inode = file->f_inode) == NULL) |
inode | 165 | fs/smbfs/sock.c | || (!S_ISSOCK(inode->i_mode))) { |
inode | 172 | fs/smbfs/sock.c | sock = &(inode->u.socket_i); |
inode | 437 | fs/smbfs/sock.c | struct inode *inode; |
inode | 443 | fs/smbfs/sock.c | if ((inode = file->f_inode) == NULL) |
inode | 445 | fs/smbfs/sock.c | return &(inode->u.socket_i); |
inode | 17 | fs/stat.c | static void cp_old_stat(struct inode * inode, struct old_stat * statbuf) |
inode | 23 | fs/stat.c | tmp.st_dev = kdev_t_to_nr(inode->i_dev); |
inode | 24 | fs/stat.c | tmp.st_ino = inode->i_ino; |
inode | 25 | fs/stat.c | tmp.st_mode = inode->i_mode; |
inode | 26 | fs/stat.c | tmp.st_nlink = inode->i_nlink; |
inode | 27 | fs/stat.c | tmp.st_uid = inode->i_uid; |
inode | 28 | fs/stat.c | tmp.st_gid = inode->i_gid; |
inode | 29 | fs/stat.c | tmp.st_rdev = kdev_t_to_nr(inode->i_rdev); |
inode | 30 | fs/stat.c | tmp.st_size = inode->i_size; |
inode | 31 | fs/stat.c | if (inode->i_pipe) |
inode | 32 | fs/stat.c | tmp.st_size = PIPE_SIZE(*inode); |
inode | 33 | fs/stat.c | tmp.st_atime = inode->i_atime; |
inode | 34 | fs/stat.c | tmp.st_mtime = inode->i_mtime; |
inode | 35 | fs/stat.c | tmp.st_ctime = inode->i_ctime; |
inode | 39 | fs/stat.c | static void cp_new_stat(struct inode * inode, struct new_stat * statbuf) |
inode | 45 | fs/stat.c | tmp.st_dev = kdev_t_to_nr(inode->i_dev); |
inode | 46 | fs/stat.c | tmp.st_ino = inode->i_ino; |
inode | 47 | fs/stat.c | tmp.st_mode = inode->i_mode; |
inode | 48 | fs/stat.c | tmp.st_nlink = inode->i_nlink; |
inode | 49 | fs/stat.c | tmp.st_uid = inode->i_uid; |
inode | 50 | fs/stat.c | tmp.st_gid = inode->i_gid; |
inode | 51 | fs/stat.c | tmp.st_rdev = kdev_t_to_nr(inode->i_rdev); |
inode | 52 | fs/stat.c | tmp.st_size = inode->i_size; |
inode | 53 | fs/stat.c | if (inode->i_pipe) |
inode | 54 | fs/stat.c | tmp.st_size = PIPE_SIZE(*inode); |
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 | 76 | fs/stat.c | if (!inode->i_blksize) { |
inode | 91 | fs/stat.c | tmp.st_blocks = inode->i_blocks; |
inode | 92 | fs/stat.c | tmp.st_blksize = inode->i_blksize; |
inode | 99 | fs/stat.c | struct inode * inode; |
inode | 105 | fs/stat.c | error = namei(filename,&inode); |
inode | 108 | fs/stat.c | cp_old_stat(inode,statbuf); |
inode | 109 | fs/stat.c | iput(inode); |
inode | 115 | fs/stat.c | struct inode * inode; |
inode | 121 | fs/stat.c | error = namei(filename,&inode); |
inode | 124 | fs/stat.c | cp_new_stat(inode,statbuf); |
inode | 125 | fs/stat.c | iput(inode); |
inode | 131 | fs/stat.c | struct inode * inode; |
inode | 137 | fs/stat.c | error = lnamei(filename,&inode); |
inode | 140 | fs/stat.c | cp_old_stat(inode,statbuf); |
inode | 141 | fs/stat.c | iput(inode); |
inode | 147 | fs/stat.c | struct inode * inode; |
inode | 153 | fs/stat.c | error = lnamei(filename,&inode); |
inode | 156 | fs/stat.c | cp_new_stat(inode,statbuf); |
inode | 157 | fs/stat.c | iput(inode); |
inode | 164 | fs/stat.c | struct inode * inode; |
inode | 170 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->files->fd[fd]) || !(inode=f->f_inode)) |
inode | 172 | fs/stat.c | cp_old_stat(inode,statbuf); |
inode | 179 | fs/stat.c | struct inode * inode; |
inode | 185 | fs/stat.c | if (fd >= NR_OPEN || !(f=current->files->fd[fd]) || !(inode=f->f_inode)) |
inode | 187 | fs/stat.c | cp_new_stat(inode,statbuf); |
inode | 193 | fs/stat.c | struct inode * inode; |
inode | 201 | fs/stat.c | error = lnamei(path,&inode); |
inode | 204 | fs/stat.c | if (!inode->i_op || !inode->i_op->readlink) { |
inode | 205 | fs/stat.c | iput(inode); |
inode | 208 | fs/stat.c | return inode->i_op->readlink(inode,buf,bufsiz); |
inode | 410 | fs/super.c | struct inode * inode; |
inode | 413 | fs/super.c | struct inode dummy_inode; |
inode | 418 | fs/super.c | retval = namei(name,&inode); |
inode | 420 | fs/super.c | retval = lnamei(name,&inode); |
inode | 424 | fs/super.c | if (S_ISBLK(inode->i_mode)) { |
inode | 425 | fs/super.c | dev = inode->i_rdev; |
inode | 426 | fs/super.c | if (IS_NODEV(inode)) { |
inode | 427 | fs/super.c | iput(inode); |
inode | 431 | fs/super.c | if (!inode->i_sb || inode != inode->i_sb->s_mounted) { |
inode | 432 | fs/super.c | iput(inode); |
inode | 435 | fs/super.c | dev = inode->i_sb->s_dev; |
inode | 436 | fs/super.c | iput(inode); |
inode | 439 | fs/super.c | inode = &dummy_inode; |
inode | 442 | fs/super.c | iput(inode); |
inode | 448 | fs/super.c | fops->release(inode,NULL); |
inode | 452 | fs/super.c | if (inode != &dummy_inode) |
inode | 453 | fs/super.c | iput(inode); |
inode | 471 | fs/super.c | struct inode * dir_i; |
inode | 534 | fs/super.c | struct inode *dir_i; |
inode | 591 | fs/super.c | struct inode * inode; |
inode | 622 | fs/super.c | retval = namei(dev_name,&inode); |
inode | 625 | fs/super.c | if (!S_ISBLK(inode->i_mode)) { |
inode | 626 | fs/super.c | iput(inode); |
inode | 629 | fs/super.c | if (IS_NODEV(inode)) { |
inode | 630 | fs/super.c | iput(inode); |
inode | 633 | fs/super.c | dev = inode->i_rdev; |
inode | 635 | fs/super.c | iput(inode); |
inode | 640 | fs/super.c | iput(inode); |
inode | 646 | fs/super.c | dummy.f_inode = inode; |
inode | 648 | fs/super.c | retval = fops->open(inode, &dummy); |
inode | 650 | fs/super.c | iput(inode); |
inode | 658 | fs/super.c | inode = NULL; |
inode | 665 | fs/super.c | iput(inode); |
inode | 672 | fs/super.c | fops->release(inode, NULL); |
inode | 673 | fs/super.c | iput(inode); |
inode | 681 | fs/super.c | struct inode * inode, d_inode; |
inode | 694 | fs/super.c | inode = sb->s_mounted; |
inode | 695 | fs/super.c | inode->i_count += 3 ; |
inode | 696 | fs/super.c | sb->s_covered = inode; |
inode | 700 | fs/super.c | current->fs->pwd = inode; |
inode | 701 | fs/super.c | current->fs->root = inode; |
inode | 744 | fs/super.c | inode = sb->s_mounted; |
inode | 745 | fs/super.c | inode->i_count += 3 ; /* NOTE! it is logically used 4 times, not 1 */ |
inode | 746 | fs/super.c | sb->s_covered = inode; |
inode | 748 | fs/super.c | current->fs->pwd = inode; |
inode | 749 | fs/super.c | current->fs->root = inode; |
inode | 24 | fs/sysv/dir.c | static int sysv_dir_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 29 | fs/sysv/dir.c | static int sysv_readdir(struct inode *, struct file *, void *, filldir_t); |
inode | 65 | fs/sysv/dir.c | static int sysv_readdir(struct inode * inode, struct file * filp, |
inode | 74 | fs/sysv/dir.c | if (!inode || !(sb = inode->i_sb) || !S_ISDIR(inode->i_mode)) |
inode | 78 | fs/sysv/dir.c | while (filp->f_pos < inode->i_size) { |
inode | 80 | fs/sysv/dir.c | bh = sysv_file_bread(inode, filp->f_pos >> sb->sv_block_size_bits, 0); |
inode | 86 | fs/sysv/dir.c | while (offset < sb->sv_block_size && filp->f_pos < inode->i_size) { |
inode | 88 | fs/sysv/dir.c | if (de->inode) { |
inode | 94 | fs/sysv/dir.c | if (sde.inode > inode->i_sb->sv_ninodes) |
inode | 97 | fs/sysv/dir.c | kdevname(inode->i_dev), |
inode | 98 | fs/sysv/dir.c | inode->i_ino, (off_t) filp->f_pos, sde.inode); |
inode | 101 | fs/sysv/dir.c | if (filldir(dirent, sde.name, i, filp->f_pos, sde.inode) < 0) { |
inode | 35 | fs/sysv/file.c | static int sysv_file_write(struct inode *, struct file *, const char *, int); |
inode | 72 | fs/sysv/file.c | int sysv_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 74 | fs/sysv/file.c | struct super_block * sb = inode->i_sb; |
inode | 84 | fs/sysv/file.c | if (!inode) { |
inode | 88 | fs/sysv/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 89 | fs/sysv/file.c | printk("sysv_file_read: mode = %07o\n",inode->i_mode); |
inode | 93 | fs/sysv/file.c | size = inode->i_size; |
inode | 109 | fs/sysv/file.c | blocks += read_ahead[MAJOR(inode->i_dev)] >> (sb->sv_block_size_bits - 9); |
inode | 130 | fs/sysv/file.c | *bhb = sysv_getblk(inode, block++, 0); |
inode | 192 | fs/sysv/file.c | if (!IS_RDONLY(inode)) { |
inode | 193 | fs/sysv/file.c | inode->i_atime = CURRENT_TIME; |
inode | 194 | fs/sysv/file.c | inode->i_dirt = 1; |
inode | 199 | fs/sysv/file.c | static int sysv_file_write(struct inode * inode, struct file * filp, const char * buf, int count) |
inode | 201 | fs/sysv/file.c | struct super_block * sb = inode->i_sb; |
inode | 207 | fs/sysv/file.c | if (!inode) { |
inode | 211 | fs/sysv/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 212 | fs/sysv/file.c | printk("sysv_file_write: mode = %07o\n",inode->i_mode); |
inode | 223 | fs/sysv/file.c | pos = inode->i_size; |
inode | 228 | fs/sysv/file.c | bh = sysv_getblk (inode, pos >> sb->sv_block_size_bits, 1); |
inode | 250 | fs/sysv/file.c | if (pos > inode->i_size) { |
inode | 251 | fs/sysv/file.c | inode->i_size = pos; |
inode | 252 | fs/sysv/file.c | inode->i_dirt = 1; |
inode | 261 | fs/sysv/file.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 263 | fs/sysv/file.c | inode->i_dirt = 1; |
inode | 29 | fs/sysv/fsync.c | static int sync_block (struct inode * inode, unsigned long * blockp, int convert, int wait) |
inode | 40 | fs/sysv/fsync.c | sb = inode->i_sb; |
inode | 41 | fs/sysv/fsync.c | bh = sv_get_hash_table(sb, inode->i_dev, block); |
inode | 62 | fs/sysv/fsync.c | static int sync_iblock (struct inode * inode, unsigned long * iblockp, int convert, |
inode | 74 | fs/sysv/fsync.c | rc = sync_block (inode, iblockp, convert, wait); |
inode | 77 | fs/sysv/fsync.c | *bh = sv_bread(inode->i_sb, inode->i_dev, block); |
inode | 89 | fs/sysv/fsync.c | static int sync_direct(struct inode *inode, int wait) |
inode | 95 | fs/sysv/fsync.c | rc = sync_block (inode, inode->u.sysv_i.i_data + i, 0, wait); |
inode | 104 | fs/sysv/fsync.c | static int sync_indirect(struct inode *inode, unsigned long *iblockp, int convert, int wait) |
inode | 111 | fs/sysv/fsync.c | rc = sync_iblock (inode, iblockp, convert, &ind_bh, wait); |
inode | 115 | fs/sysv/fsync.c | sb = inode->i_sb; |
inode | 117 | fs/sysv/fsync.c | rc = sync_block (inode, |
inode | 129 | fs/sysv/fsync.c | static int sync_dindirect(struct inode *inode, unsigned long *diblockp, int convert, |
inode | 137 | fs/sysv/fsync.c | rc = sync_iblock (inode, diblockp, convert, &dind_bh, wait); |
inode | 141 | fs/sysv/fsync.c | sb = inode->i_sb; |
inode | 143 | fs/sysv/fsync.c | rc = sync_indirect (inode, |
inode | 155 | fs/sysv/fsync.c | static int sync_tindirect(struct inode *inode, unsigned long *tiblockp, int convert, |
inode | 163 | fs/sysv/fsync.c | rc = sync_iblock (inode, tiblockp, convert, &tind_bh, wait); |
inode | 167 | fs/sysv/fsync.c | sb = inode->i_sb; |
inode | 169 | fs/sysv/fsync.c | rc = sync_dindirect (inode, |
inode | 181 | fs/sysv/fsync.c | int sysv_sync_file(struct inode * inode, struct file * file) |
inode | 185 | fs/sysv/fsync.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 186 | fs/sysv/fsync.c | S_ISLNK(inode->i_mode))) |
inode | 190 | fs/sysv/fsync.c | err |= sync_direct(inode, wait); |
inode | 191 | fs/sysv/fsync.c | err |= sync_indirect(inode, inode->u.sysv_i.i_data+10, 0, wait); |
inode | 192 | fs/sysv/fsync.c | err |= sync_dindirect(inode, inode->u.sysv_i.i_data+11, 0, wait); |
inode | 193 | fs/sysv/fsync.c | err |= sync_tindirect(inode, inode->u.sysv_i.i_data+12, 0, wait); |
inode | 195 | fs/sysv/fsync.c | err |= sysv_sync_inode (inode); |
inode | 52 | fs/sysv/ialloc.c | void sysv_free_inode(struct inode * inode) |
inode | 59 | fs/sysv/ialloc.c | if (!inode) |
inode | 61 | fs/sysv/ialloc.c | if (!inode->i_dev) { |
inode | 65 | fs/sysv/ialloc.c | if (inode->i_count != 1) { |
inode | 66 | fs/sysv/ialloc.c | printk("sysv_free_inode: inode has count=%d\n", inode->i_count); |
inode | 69 | fs/sysv/ialloc.c | if (inode->i_nlink) { |
inode | 70 | fs/sysv/ialloc.c | printk("sysv_free_inode: inode has nlink=%d\n", inode->i_nlink); |
inode | 73 | fs/sysv/ialloc.c | if (!(sb = inode->i_sb)) { |
inode | 77 | fs/sysv/ialloc.c | ino = inode->i_ino; |
inode | 82 | fs/sysv/ialloc.c | if (!(bh = sv_bread(sb, inode->i_dev, sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits)))) { |
inode | 84 | fs/sysv/ialloc.c | "%s\n", kdevname(inode->i_dev)); |
inode | 85 | fs/sysv/ialloc.c | clear_inode(inode); |
inode | 100 | fs/sysv/ialloc.c | clear_inode(inode); |
inode | 103 | fs/sysv/ialloc.c | struct inode * sysv_new_inode(const struct inode * dir) |
inode | 105 | fs/sysv/ialloc.c | struct inode * inode; |
inode | 111 | fs/sysv/ialloc.c | if (!dir || !(inode = get_empty_inode())) |
inode | 114 | fs/sysv/ialloc.c | inode->i_sb = sb; |
inode | 115 | fs/sysv/ialloc.c | inode->i_flags = inode->i_sb->s_flags; |
inode | 141 | fs/sysv/ialloc.c | iput(inode); |
inode | 152 | fs/sysv/ialloc.c | inode->i_count = 1; |
inode | 153 | fs/sysv/ialloc.c | inode->i_nlink = 1; |
inode | 154 | fs/sysv/ialloc.c | inode->i_dev = sb->s_dev; |
inode | 155 | fs/sysv/ialloc.c | inode->i_uid = current->fsuid; |
inode | 156 | fs/sysv/ialloc.c | inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; |
inode | 157 | fs/sysv/ialloc.c | inode->i_dirt = 1; |
inode | 158 | fs/sysv/ialloc.c | inode->i_ino = ino; |
inode | 159 | fs/sysv/ialloc.c | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
inode | 160 | fs/sysv/ialloc.c | inode->i_op = NULL; |
inode | 161 | fs/sysv/ialloc.c | inode->i_blocks = inode->i_blksize = 0; |
inode | 162 | fs/sysv/ialloc.c | insert_inode_hash(inode); |
inode | 164 | fs/sysv/ialloc.c | inode->i_mode = 0; /* for sysv_write_inode() */ |
inode | 165 | fs/sysv/ialloc.c | inode->i_size = 0; /* ditto */ |
inode | 166 | fs/sysv/ialloc.c | sysv_write_inode(inode); /* ensure inode not allocated again */ |
inode | 168 | fs/sysv/ialloc.c | inode->i_dirt = 1; /* cleared by sysv_write_inode() */ |
inode | 174 | fs/sysv/ialloc.c | return inode; |
inode | 35 | fs/sysv/inode.c | void sysv_put_inode(struct inode *inode) |
inode | 37 | fs/sysv/inode.c | if (inode->i_nlink) |
inode | 39 | fs/sysv/inode.c | inode->i_size = 0; |
inode | 40 | fs/sysv/inode.c | sysv_truncate(inode); |
inode | 41 | fs/sysv/inode.c | sysv_free_inode(inode); |
inode | 553 | fs/sysv/inode.c | static inline int inode_bmap(struct super_block * sb, struct inode * inode, int nr) |
inode | 555 | fs/sysv/inode.c | int tmp = inode->u.sysv_i.i_data[nr]; |
inode | 576 | fs/sysv/inode.c | int sysv_bmap(struct inode * inode,int block_nr) |
inode | 579 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
inode | 585 | fs/sysv/inode.c | return inode_bmap(sb,inode,block); |
inode | 589 | fs/sysv/inode.c | i = inode_bmap(sb,inode,10); |
inode | 592 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
inode | 597 | fs/sysv/inode.c | i = inode_bmap(sb,inode,11); |
inode | 600 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
inode | 604 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
inode | 609 | fs/sysv/inode.c | i = inode_bmap(sb,inode,12); |
inode | 612 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
inode | 616 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
inode | 620 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
inode | 636 | fs/sysv/inode.c | static struct buffer_head * inode_getblk(struct inode * inode, int nr, int create) |
inode | 643 | fs/sysv/inode.c | sb = inode->i_sb; |
inode | 644 | fs/sysv/inode.c | p = inode->u.sysv_i.i_data + nr; |
inode | 648 | fs/sysv/inode.c | result = sv_getblk(sb, inode->i_dev, tmp); |
inode | 659 | fs/sysv/inode.c | result = sv_getblk(sb, inode->i_dev, tmp); |
inode | 666 | fs/sysv/inode.c | inode->i_ctime = CURRENT_TIME; |
inode | 667 | fs/sysv/inode.c | inode->i_dirt = 1; |
inode | 671 | fs/sysv/inode.c | static struct buffer_head * block_getblk(struct inode * inode, |
inode | 689 | fs/sysv/inode.c | sb = inode->i_sb; |
inode | 725 | fs/sysv/inode.c | struct buffer_head * sysv_getblk(struct inode * inode, unsigned int block, int create) |
inode | 727 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
inode | 731 | fs/sysv/inode.c | return inode_getblk(inode,block,create); |
inode | 734 | fs/sysv/inode.c | bh = inode_getblk(inode,10,create); |
inode | 735 | fs/sysv/inode.c | return block_getblk(inode, bh, block, create); |
inode | 739 | fs/sysv/inode.c | bh = inode_getblk(inode,11,create); |
inode | 740 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_bits, create); |
inode | 741 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create); |
inode | 745 | fs/sysv/inode.c | bh = inode_getblk(inode,12,create); |
inode | 746 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_2_bits, create); |
inode | 747 | fs/sysv/inode.c | bh = block_getblk(inode, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1, create); |
inode | 748 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create); |
inode | 758 | fs/sysv/inode.c | struct buffer_head * sysv_file_bread(struct inode * inode, int block, int create) |
inode | 762 | fs/sysv/inode.c | bh = sysv_getblk(inode,block,create); |
inode | 798 | fs/sysv/inode.c | void sysv_read_inode(struct inode * inode) |
inode | 800 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
inode | 806 | fs/sysv/inode.c | ino = inode->i_ino; |
inode | 807 | fs/sysv/inode.c | inode->i_op = NULL; |
inode | 808 | fs/sysv/inode.c | inode->i_mode = 0; |
inode | 812 | fs/sysv/inode.c | kdevname(inode->i_dev), ino); |
inode | 816 | fs/sysv/inode.c | if (!(bh = sv_bread(sb,inode->i_dev,block))) { |
inode | 819 | fs/sysv/inode.c | kdevname(inode->i_dev)); |
inode | 827 | fs/sysv/inode.c | inode->i_mode = mode; |
inode | 828 | fs/sysv/inode.c | inode->i_uid = raw_inode->i_uid; |
inode | 829 | fs/sysv/inode.c | inode->i_gid = raw_inode->i_gid; |
inode | 830 | fs/sysv/inode.c | inode->i_nlink = raw_inode->i_nlink; |
inode | 832 | fs/sysv/inode.c | inode->i_size = from_coh_ulong(raw_inode->i_size); |
inode | 833 | fs/sysv/inode.c | inode->i_atime = from_coh_ulong(raw_inode->i_atime); |
inode | 834 | fs/sysv/inode.c | inode->i_mtime = from_coh_ulong(raw_inode->i_mtime); |
inode | 835 | fs/sysv/inode.c | inode->i_ctime = from_coh_ulong(raw_inode->i_ctime); |
inode | 837 | fs/sysv/inode.c | inode->i_size = raw_inode->i_size; |
inode | 838 | fs/sysv/inode.c | inode->i_atime = raw_inode->i_atime; |
inode | 839 | fs/sysv/inode.c | inode->i_mtime = raw_inode->i_mtime; |
inode | 840 | fs/sysv/inode.c | inode->i_ctime = raw_inode->i_ctime; |
inode | 842 | fs/sysv/inode.c | inode->i_blocks = inode->i_blksize = 0; |
inode | 843 | fs/sysv/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 844 | fs/sysv/inode.c | inode->i_rdev = to_kdev_t(raw_inode->i_a.i_rdev); |
inode | 848 | fs/sysv/inode.c | inode->u.sysv_i.i_data[block] = |
inode | 852 | fs/sysv/inode.c | inode->u.sysv_i.i_data[block] = |
inode | 855 | fs/sysv/inode.c | if (S_ISREG(inode->i_mode)) |
inode | 856 | fs/sysv/inode.c | inode->i_op = &sysv_file_inode_operations; |
inode | 857 | fs/sysv/inode.c | else if (S_ISDIR(inode->i_mode)) |
inode | 858 | fs/sysv/inode.c | inode->i_op = &sysv_dir_inode_operations; |
inode | 859 | fs/sysv/inode.c | else if (S_ISLNK(inode->i_mode)) |
inode | 860 | fs/sysv/inode.c | inode->i_op = &sysv_symlink_inode_operations; |
inode | 861 | fs/sysv/inode.c | else if (S_ISCHR(inode->i_mode)) |
inode | 862 | fs/sysv/inode.c | inode->i_op = &chrdev_inode_operations; |
inode | 863 | fs/sysv/inode.c | else if (S_ISBLK(inode->i_mode)) |
inode | 864 | fs/sysv/inode.c | inode->i_op = &blkdev_inode_operations; |
inode | 865 | fs/sysv/inode.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 866 | fs/sysv/inode.c | init_fifo(inode); |
inode | 870 | fs/sysv/inode.c | extern int sysv_notify_change(struct inode *inode, struct iattr *attr) |
inode | 874 | fs/sysv/inode.c | if ((error = inode_change_ok(inode, attr)) != 0) |
inode | 878 | fs/sysv/inode.c | if (inode->i_sb->sv_kludge_symlinks) |
inode | 882 | fs/sysv/inode.c | inode_setattr(inode, attr); |
inode | 887 | fs/sysv/inode.c | static struct buffer_head * sysv_update_inode(struct inode * inode) |
inode | 889 | fs/sysv/inode.c | struct super_block * sb = inode->i_sb; |
inode | 895 | fs/sysv/inode.c | ino = inode->i_ino; |
inode | 899 | fs/sysv/inode.c | kdevname(inode->i_dev), ino); |
inode | 900 | fs/sysv/inode.c | inode->i_dirt = 0; |
inode | 904 | fs/sysv/inode.c | if (!(bh = sv_bread(sb,inode->i_dev,block))) { |
inode | 906 | fs/sysv/inode.c | inode->i_dirt = 0; |
inode | 910 | fs/sysv/inode.c | mode = inode->i_mode; |
inode | 914 | fs/sysv/inode.c | raw_inode->i_uid = inode->i_uid; |
inode | 915 | fs/sysv/inode.c | raw_inode->i_gid = inode->i_gid; |
inode | 916 | fs/sysv/inode.c | raw_inode->i_nlink = inode->i_nlink; |
inode | 918 | fs/sysv/inode.c | raw_inode->i_size = to_coh_ulong(inode->i_size); |
inode | 919 | fs/sysv/inode.c | raw_inode->i_atime = to_coh_ulong(inode->i_atime); |
inode | 920 | fs/sysv/inode.c | raw_inode->i_mtime = to_coh_ulong(inode->i_mtime); |
inode | 921 | fs/sysv/inode.c | raw_inode->i_ctime = to_coh_ulong(inode->i_ctime); |
inode | 923 | fs/sysv/inode.c | raw_inode->i_size = inode->i_size; |
inode | 924 | fs/sysv/inode.c | raw_inode->i_atime = inode->i_atime; |
inode | 925 | fs/sysv/inode.c | raw_inode->i_mtime = inode->i_mtime; |
inode | 926 | fs/sysv/inode.c | raw_inode->i_ctime = inode->i_ctime; |
inode | 928 | fs/sysv/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 929 | fs/sysv/inode.c | raw_inode->i_a.i_rdev = kdev_t_to_nr(inode->i_rdev); /* write 2 or 3 bytes ?? */ |
inode | 933 | fs/sysv/inode.c | coh_write3byte(&raw_inode->i_a.i_addb[3*block],inode->u.sysv_i.i_data[block]); |
inode | 936 | fs/sysv/inode.c | write3byte(&raw_inode->i_a.i_addb[3*block],inode->u.sysv_i.i_data[block]); |
inode | 937 | fs/sysv/inode.c | inode->i_dirt=0; |
inode | 942 | fs/sysv/inode.c | void sysv_write_inode(struct inode * inode) |
inode | 945 | fs/sysv/inode.c | bh = sysv_update_inode(inode); |
inode | 949 | fs/sysv/inode.c | int sysv_sync_inode(struct inode * inode) |
inode | 954 | fs/sysv/inode.c | bh = sysv_update_inode(inode); |
inode | 962 | fs/sysv/inode.c | kdevname(inode->i_dev), inode->i_ino); |
inode | 44 | fs/sysv/namei.c | if (!de->inode || len > SYSV_NAMELEN) |
inode | 60 | fs/sysv/namei.c | static struct buffer_head * sysv_find_entry(struct inode * dir, |
inode | 103 | fs/sysv/namei.c | int sysv_lookup(struct inode * dir,const char * name, int len, |
inode | 104 | fs/sysv/namei.c | struct inode ** result) |
inode | 121 | fs/sysv/namei.c | ino = de->inode; |
inode | 141 | fs/sysv/namei.c | static int sysv_add_entry(struct inode * dir, |
inode | 176 | fs/sysv/namei.c | de->inode = 0; |
inode | 180 | fs/sysv/namei.c | if (de->inode) { |
inode | 204 | fs/sysv/namei.c | int sysv_create(struct inode * dir,const char * name, int len, int mode, |
inode | 205 | fs/sysv/namei.c | struct inode ** result) |
inode | 208 | fs/sysv/namei.c | struct inode * inode; |
inode | 215 | fs/sysv/namei.c | inode = sysv_new_inode(dir); |
inode | 216 | fs/sysv/namei.c | if (!inode) { |
inode | 220 | fs/sysv/namei.c | inode->i_op = &sysv_file_inode_operations; |
inode | 221 | fs/sysv/namei.c | inode->i_mode = mode; |
inode | 222 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 225 | fs/sysv/namei.c | inode->i_nlink--; |
inode | 226 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 227 | fs/sysv/namei.c | iput(inode); |
inode | 231 | fs/sysv/namei.c | de->inode = inode->i_ino; |
inode | 235 | fs/sysv/namei.c | *result = inode; |
inode | 239 | fs/sysv/namei.c | int sysv_mknod(struct inode * dir, const char * name, int len, int mode, int rdev) |
inode | 242 | fs/sysv/namei.c | struct inode * inode; |
inode | 254 | fs/sysv/namei.c | inode = sysv_new_inode(dir); |
inode | 255 | fs/sysv/namei.c | if (!inode) { |
inode | 259 | fs/sysv/namei.c | inode->i_uid = current->fsuid; |
inode | 260 | fs/sysv/namei.c | inode->i_mode = mode; |
inode | 261 | fs/sysv/namei.c | inode->i_op = NULL; |
inode | 262 | fs/sysv/namei.c | if (S_ISREG(inode->i_mode)) |
inode | 263 | fs/sysv/namei.c | inode->i_op = &sysv_file_inode_operations; |
inode | 264 | fs/sysv/namei.c | else if (S_ISDIR(inode->i_mode)) { |
inode | 265 | fs/sysv/namei.c | inode->i_op = &sysv_dir_inode_operations; |
inode | 267 | fs/sysv/namei.c | inode->i_mode |= S_ISGID; |
inode | 269 | fs/sysv/namei.c | else if (S_ISLNK(inode->i_mode)) |
inode | 270 | fs/sysv/namei.c | inode->i_op = &sysv_symlink_inode_operations; |
inode | 271 | fs/sysv/namei.c | else if (S_ISCHR(inode->i_mode)) |
inode | 272 | fs/sysv/namei.c | inode->i_op = &chrdev_inode_operations; |
inode | 273 | fs/sysv/namei.c | else if (S_ISBLK(inode->i_mode)) |
inode | 274 | fs/sysv/namei.c | inode->i_op = &blkdev_inode_operations; |
inode | 275 | fs/sysv/namei.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 276 | fs/sysv/namei.c | init_fifo(inode); |
inode | 278 | fs/sysv/namei.c | inode->i_rdev = to_kdev_t(rdev); |
inode | 279 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 282 | fs/sysv/namei.c | inode->i_nlink--; |
inode | 283 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 284 | fs/sysv/namei.c | iput(inode); |
inode | 288 | fs/sysv/namei.c | de->inode = inode->i_ino; |
inode | 292 | fs/sysv/namei.c | iput(inode); |
inode | 296 | fs/sysv/namei.c | int sysv_mkdir(struct inode * dir, const char * name, int len, int mode) |
inode | 299 | fs/sysv/namei.c | struct inode * inode; |
inode | 317 | fs/sysv/namei.c | inode = sysv_new_inode(dir); |
inode | 318 | fs/sysv/namei.c | if (!inode) { |
inode | 322 | fs/sysv/namei.c | inode->i_op = &sysv_dir_inode_operations; |
inode | 323 | fs/sysv/namei.c | inode->i_size = 2 * SYSV_DIRSIZE; |
inode | 324 | fs/sysv/namei.c | dir_block = sysv_file_bread(inode,0,1); |
inode | 327 | fs/sysv/namei.c | inode->i_nlink--; |
inode | 328 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 329 | fs/sysv/namei.c | iput(inode); |
inode | 333 | fs/sysv/namei.c | de->inode = inode->i_ino; |
inode | 336 | fs/sysv/namei.c | de->inode = dir->i_ino; |
inode | 338 | fs/sysv/namei.c | inode->i_nlink = 2; |
inode | 341 | fs/sysv/namei.c | inode->i_mode = S_IFDIR | (mode & 0777 & ~current->fs->umask); |
inode | 343 | fs/sysv/namei.c | inode->i_mode |= S_ISGID; |
inode | 344 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 348 | fs/sysv/namei.c | inode->i_nlink=0; |
inode | 349 | fs/sysv/namei.c | iput(inode); |
inode | 352 | fs/sysv/namei.c | de->inode = inode->i_ino; |
inode | 357 | fs/sysv/namei.c | iput(inode); |
inode | 365 | fs/sysv/namei.c | static int empty_dir(struct inode * inode) |
inode | 372 | fs/sysv/namei.c | if (!inode) |
inode | 377 | fs/sysv/namei.c | if (inode->i_size % SYSV_DIRSIZE) |
inode | 379 | fs/sysv/namei.c | if (inode->i_size < pos) |
inode | 381 | fs/sysv/namei.c | bh = sysv_file_bread(inode,0,0); |
inode | 385 | fs/sysv/namei.c | if (!de->inode || strcmp(de->name,".")) |
inode | 388 | fs/sysv/namei.c | if (!de->inode || strcmp(de->name,"..")) |
inode | 390 | fs/sysv/namei.c | sb = inode->i_sb; |
inode | 391 | fs/sysv/namei.c | while (pos < inode->i_size) { |
inode | 393 | fs/sysv/namei.c | bh = sysv_file_bread(inode,block,0); |
inode | 403 | fs/sysv/namei.c | if (de->inode) { |
inode | 418 | fs/sysv/namei.c | kdevname(inode->i_dev)); |
inode | 422 | fs/sysv/namei.c | int sysv_rmdir(struct inode * dir, const char * name, int len) |
inode | 425 | fs/sysv/namei.c | struct inode * inode; |
inode | 429 | fs/sysv/namei.c | inode = NULL; |
inode | 435 | fs/sysv/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
inode | 438 | fs/sysv/namei.c | current->fsuid != inode->i_uid && |
inode | 441 | fs/sysv/namei.c | if (inode->i_dev != dir->i_dev) |
inode | 443 | fs/sysv/namei.c | if (inode == dir) /* we may not delete ".", but "../dir" is ok */ |
inode | 445 | fs/sysv/namei.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 449 | fs/sysv/namei.c | if (!empty_dir(inode)) { |
inode | 453 | fs/sysv/namei.c | if (de->inode != inode->i_ino) { |
inode | 457 | fs/sysv/namei.c | if (inode->i_count > 1) { |
inode | 461 | fs/sysv/namei.c | if (inode->i_nlink != 2) |
inode | 462 | fs/sysv/namei.c | printk("empty directory has nlink!=2 (%d)\n",inode->i_nlink); |
inode | 463 | fs/sysv/namei.c | de->inode = 0; |
inode | 465 | fs/sysv/namei.c | inode->i_nlink=0; |
inode | 466 | fs/sysv/namei.c | inode->i_dirt=1; |
inode | 468 | fs/sysv/namei.c | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
inode | 473 | fs/sysv/namei.c | iput(inode); |
inode | 478 | fs/sysv/namei.c | int sysv_unlink(struct inode * dir, const char * name, int len) |
inode | 481 | fs/sysv/namei.c | struct inode * inode; |
inode | 487 | fs/sysv/namei.c | inode = NULL; |
inode | 491 | fs/sysv/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
inode | 494 | fs/sysv/namei.c | if (S_ISDIR(inode->i_mode)) |
inode | 496 | fs/sysv/namei.c | if (de->inode != inode->i_ino) { |
inode | 497 | fs/sysv/namei.c | iput(inode); |
inode | 504 | fs/sysv/namei.c | current->fsuid != inode->i_uid && |
inode | 507 | fs/sysv/namei.c | if (de->inode != inode->i_ino) { |
inode | 511 | fs/sysv/namei.c | if (!inode->i_nlink) { |
inode | 513 | fs/sysv/namei.c | kdevname(inode->i_dev), |
inode | 514 | fs/sysv/namei.c | inode->i_ino, inode->i_nlink); |
inode | 515 | fs/sysv/namei.c | inode->i_nlink=1; |
inode | 517 | fs/sysv/namei.c | de->inode = 0; |
inode | 521 | fs/sysv/namei.c | inode->i_nlink--; |
inode | 522 | fs/sysv/namei.c | inode->i_ctime = dir->i_ctime; |
inode | 523 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 527 | fs/sysv/namei.c | iput(inode); |
inode | 532 | fs/sysv/namei.c | int sysv_symlink(struct inode * dir, const char * name, int len, const char * symname) |
inode | 535 | fs/sysv/namei.c | struct inode * inode; |
inode | 543 | fs/sysv/namei.c | if (!(inode = sysv_new_inode(dir))) { |
inode | 547 | fs/sysv/namei.c | inode->i_mode = S_IFLNK | 0777; |
inode | 548 | fs/sysv/namei.c | inode->i_op = &sysv_symlink_inode_operations; |
inode | 549 | fs/sysv/namei.c | name_block = sysv_file_bread(inode,0,1); |
inode | 552 | fs/sysv/namei.c | inode->i_nlink--; |
inode | 553 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 554 | fs/sysv/namei.c | iput(inode); |
inode | 557 | fs/sysv/namei.c | sb = inode->i_sb; |
inode | 565 | fs/sysv/namei.c | inode->i_size = i; |
inode | 566 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 569 | fs/sysv/namei.c | inode->i_nlink--; |
inode | 570 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 571 | fs/sysv/namei.c | iput(inode); |
inode | 578 | fs/sysv/namei.c | inode->i_nlink--; |
inode | 579 | fs/sysv/namei.c | inode->i_dirt = 1; |
inode | 580 | fs/sysv/namei.c | iput(inode); |
inode | 584 | fs/sysv/namei.c | de->inode = inode->i_ino; |
inode | 588 | fs/sysv/namei.c | iput(inode); |
inode | 592 | fs/sysv/namei.c | int sysv_link(struct inode * oldinode, struct inode * dir, const char * name, int len) |
inode | 621 | fs/sysv/namei.c | de->inode = oldinode->i_ino; |
inode | 633 | fs/sysv/namei.c | static int subdir(struct inode * new_inode, struct inode * old_inode) |
inode | 658 | fs/sysv/namei.c | (((struct sysv_dir_entry *) ((buffer) + 1*SYSV_DIRSIZE))->inode) |
inode | 670 | fs/sysv/namei.c | static int do_sysv_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 671 | fs/sysv/namei.c | struct inode * new_dir, const char * new_name, int new_len) |
inode | 673 | fs/sysv/namei.c | struct inode * old_inode, * new_inode; |
inode | 694 | fs/sysv/namei.c | old_inode = __iget(old_dir->i_sb, old_de->inode, 0); /* don't cross mnt-points */ |
inode | 704 | fs/sysv/namei.c | new_inode = __iget(new_dir->i_sb, new_de->inode, 0); |
inode | 756 | fs/sysv/namei.c | if (new_inode && (new_de->inode != new_inode->i_ino)) |
inode | 758 | fs/sysv/namei.c | if (new_de->inode && !new_inode) |
inode | 760 | fs/sysv/namei.c | if (old_de->inode != old_inode->i_ino) |
inode | 763 | fs/sysv/namei.c | old_de->inode = 0; |
inode | 764 | fs/sysv/namei.c | new_de->inode = old_inode->i_ino; |
inode | 810 | fs/sysv/namei.c | int sysv_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 811 | fs/sysv/namei.c | struct inode * new_dir, const char * new_name, int new_len) |
inode | 23 | fs/sysv/symlink.c | static int sysv_readlink(struct inode *, char *, int); |
inode | 24 | fs/sysv/symlink.c | static int sysv_follow_link(struct inode *, struct inode *, int, int, struct inode **); |
inode | 47 | fs/sysv/symlink.c | static int sysv_follow_link(struct inode * dir, struct inode * inode, |
inode | 48 | fs/sysv/symlink.c | int flag, int mode, struct inode ** res_inode) |
inode | 58 | fs/sysv/symlink.c | if (!inode) { |
inode | 62 | fs/sysv/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 64 | fs/sysv/symlink.c | *res_inode = inode; |
inode | 68 | fs/sysv/symlink.c | iput(inode); |
inode | 72 | fs/sysv/symlink.c | if (!(bh = sysv_file_bread(inode, 0, 0))) { /* is reading 1 block enough ?? */ |
inode | 73 | fs/sysv/symlink.c | iput(inode); |
inode | 77 | fs/sysv/symlink.c | iput(inode); |
inode | 85 | fs/sysv/symlink.c | static int sysv_readlink(struct inode * inode, char * buffer, int buflen) |
inode | 92 | fs/sysv/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 93 | fs/sysv/symlink.c | iput(inode); |
inode | 96 | fs/sysv/symlink.c | if (buflen > inode->i_sb->sv_block_size_1) |
inode | 97 | fs/sysv/symlink.c | buflen = inode->i_sb->sv_block_size_1; |
inode | 98 | fs/sysv/symlink.c | bh = sysv_file_bread(inode, 0, 0); |
inode | 99 | fs/sysv/symlink.c | iput(inode); |
inode | 40 | fs/sysv/truncate.c | static int trunc_direct(struct inode * inode) |
inode | 49 | fs/sysv/truncate.c | sb = inode->i_sb; |
inode | 51 | fs/sysv/truncate.c | for (i = ((unsigned long) inode->i_size + sb->sv_block_size_1) >> sb->sv_block_size_bits; i < 10; i++) { |
inode | 52 | fs/sysv/truncate.c | p = inode->u.sysv_i.i_data + i; |
inode | 56 | fs/sysv/truncate.c | bh = sv_get_hash_table(sb, inode->i_dev, block); |
inode | 57 | fs/sysv/truncate.c | if ((i << sb->sv_block_size_bits) < inode->i_size) { |
inode | 67 | fs/sysv/truncate.c | inode->i_dirt = 1; |
inode | 74 | fs/sysv/truncate.c | static int trunc_indirect(struct inode * inode, unsigned long offset, unsigned long * p, int convert, unsigned char * dirt) |
inode | 90 | fs/sysv/truncate.c | sb = inode->i_sb; |
inode | 91 | fs/sysv/truncate.c | indbh = sv_bread(sb, inode->i_dev, indblock); |
inode | 102 | fs/sysv/truncate.c | if (inode->i_size < offset) |
inode | 105 | fs/sysv/truncate.c | i = (inode->i_size - offset + sb->sv_block_size_1) >> sb->sv_block_size_bits; |
inode | 113 | fs/sysv/truncate.c | bh = sv_get_hash_table(sb, inode->i_dev, block); |
inode | 114 | fs/sysv/truncate.c | if ((i << sb->sv_block_size_bits) + offset < inode->i_size) { |
inode | 143 | fs/sysv/truncate.c | static int trunc_dindirect(struct inode * inode, unsigned long offset, unsigned long * p, int convert, unsigned char * dirt) |
inode | 158 | fs/sysv/truncate.c | sb = inode->i_sb; |
inode | 159 | fs/sysv/truncate.c | indbh = sv_bread(sb, inode->i_dev, indblock); |
inode | 169 | fs/sysv/truncate.c | if (inode->i_size < offset) |
inode | 172 | fs/sysv/truncate.c | i = (inode->i_size - offset + sb->sv_ind_per_block_block_size_1) >> sb->sv_ind_per_block_block_size_bits; |
inode | 180 | fs/sysv/truncate.c | retry |= trunc_indirect(inode,offset+(i<<sb->sv_ind_per_block_bits),ind,sb->sv_convert,&indbh->b_dirt); |
inode | 197 | fs/sysv/truncate.c | static int trunc_tindirect(struct inode * inode, unsigned long offset, unsigned long * p, int convert, unsigned char * dirt) |
inode | 212 | fs/sysv/truncate.c | sb = inode->i_sb; |
inode | 213 | fs/sysv/truncate.c | indbh = sv_bread(sb, inode->i_dev, indblock); |
inode | 223 | fs/sysv/truncate.c | if (inode->i_size < offset) |
inode | 226 | fs/sysv/truncate.c | i = (inode->i_size - offset + sb->sv_ind_per_block_2_block_size_1) >> sb->sv_ind_per_block_2_block_size_bits; |
inode | 234 | fs/sysv/truncate.c | retry |= trunc_dindirect(inode,offset+(i<<sb->sv_ind_per_block_2_bits),ind,sb->sv_convert,&indbh->b_dirt); |
inode | 251 | fs/sysv/truncate.c | static int trunc_all(struct inode * inode) |
inode | 255 | fs/sysv/truncate.c | sb = inode->i_sb; |
inode | 256 | fs/sysv/truncate.c | return trunc_direct(inode) |
inode | 257 | fs/sysv/truncate.c | | trunc_indirect(inode,sb->sv_ind0_size,&inode->u.sysv_i.i_data[10],0,&inode->i_dirt) |
inode | 258 | fs/sysv/truncate.c | | trunc_dindirect(inode,sb->sv_ind1_size,&inode->u.sysv_i.i_data[11],0,&inode->i_dirt) |
inode | 259 | fs/sysv/truncate.c | | trunc_tindirect(inode,sb->sv_ind2_size,&inode->u.sysv_i.i_data[12],0,&inode->i_dirt); |
inode | 263 | fs/sysv/truncate.c | void sysv_truncate(struct inode * inode) |
inode | 273 | fs/sysv/truncate.c | if (S_ISLNK(inode->i_mode)) |
inode | 275 | fs/sysv/truncate.c | else if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) |
inode | 277 | fs/sysv/truncate.c | while (trunc_all(inode)) { |
inode | 281 | fs/sysv/truncate.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 282 | fs/sysv/truncate.c | inode->i_dirt = 1; |
inode | 26 | fs/umsdos/dir.c | extern struct inode *pseudo_root; |
inode | 30 | fs/umsdos/dir.c | int UMSDOS_dir_read(struct inode *inode,struct file *filp,char *buf, |
inode | 80 | fs/umsdos/dir.c | struct inode *dir, /* Point to a description of the super block */ |
inode | 159 | fs/umsdos/dir.c | struct inode *emd_dir = umsdos_emd_dir_lookup(dir,0); |
inode | 191 | fs/umsdos/dir.c | struct inode *inode; |
inode | 197 | fs/umsdos/dir.c | ,info.fake.len,&inode); |
inode | 203 | fs/umsdos/dir.c | struct inode *rinode; |
inode | 204 | fs/umsdos/dir.c | lret = umsdos_hlink2inode (inode,&rinode); |
inode | 205 | fs/umsdos/dir.c | inode = rinode; |
inode | 215 | fs/umsdos/dir.c | if (inode != pseudo_root |
inode | 220 | fs/umsdos/dir.c | ,cur_f_pos, inode->i_ino) < 0){ |
inode | 223 | fs/umsdos/dir.c | PRINTK (("Trouve ino %ld ",inode->i_ino)); |
inode | 225 | fs/umsdos/dir.c | iput (inode); |
inode | 228 | fs/umsdos/dir.c | iput (inode); |
inode | 262 | fs/umsdos/dir.c | struct inode *dir, /* Point to a description of the super block */ |
inode | 289 | fs/umsdos/dir.c | struct inode *dir, |
inode | 290 | fs/umsdos/dir.c | struct inode *inode, |
inode | 323 | fs/umsdos/dir.c | if (inode->i_sb == dir->i_sb && !umsdos_isinit(inode)){ |
inode | 324 | fs/umsdos/dir.c | if (S_ISDIR(inode->i_mode)) umsdos_lockcreate(inode); |
inode | 325 | fs/umsdos/dir.c | if (!umsdos_isinit(inode)){ |
inode | 343 | fs/umsdos/dir.c | if (S_ISREG(entry->mode)) entry->mtime = inode->i_mtime; |
inode | 344 | fs/umsdos/dir.c | inode->i_mode = entry->mode; |
inode | 345 | fs/umsdos/dir.c | inode->i_rdev = to_kdev_t(entry->rdev); |
inode | 346 | fs/umsdos/dir.c | inode->i_atime = entry->atime; |
inode | 347 | fs/umsdos/dir.c | inode->i_ctime = entry->ctime; |
inode | 348 | fs/umsdos/dir.c | inode->i_mtime = entry->mtime; |
inode | 349 | fs/umsdos/dir.c | inode->i_uid = entry->uid; |
inode | 350 | fs/umsdos/dir.c | inode->i_gid = entry->gid; |
inode | 386 | fs/umsdos/dir.c | MSDOS_I(inode)->i_binary = 1; |
inode | 397 | fs/umsdos/dir.c | inode->i_nlink = entry->nlink; |
inode | 402 | fs/umsdos/dir.c | umsdos_patch_inode(inode,dir,emd_pos); |
inode | 404 | fs/umsdos/dir.c | if (S_ISDIR(inode->i_mode)) umsdos_unlockcreate(inode); |
inode | 405 | fs/umsdos/dir.c | if (inode->u.umsdos_i.i_emd_owner==0) printk ("emd_owner still 0 ???\n"); |
inode | 463 | fs/umsdos/dir.c | struct inode *dir, |
inode | 464 | fs/umsdos/dir.c | struct inode *inode, |
inode | 468 | fs/umsdos/dir.c | if (inode == pseudo_root){ |
inode | 477 | fs/umsdos/dir.c | struct inode *emddir = umsdos_emd_dir_lookup(dir,0); |
inode | 486 | fs/umsdos/dir.c | bufk.search_ino = inode->i_ino; |
inode | 490 | fs/umsdos/dir.c | inode->u.umsdos_i.i_dir_owner = dir->i_ino; |
inode | 491 | fs/umsdos/dir.c | inode->u.umsdos_i.i_emd_owner = 0; |
inode | 492 | fs/umsdos/dir.c | umsdos_setup_dir_inode(inode); |
inode | 504 | fs/umsdos/dir.c | ,inode->i_ino); |
inode | 506 | fs/umsdos/dir.c | }else if (bufk.ino == inode->i_ino){ |
inode | 508 | fs/umsdos/dir.c | umsdos_lookup_patch (dir,inode,entry,bufk.f_pos); |
inode | 521 | fs/umsdos/dir.c | struct inode *dir, |
inode | 522 | fs/umsdos/dir.c | struct inode **result, |
inode | 530 | fs/umsdos/dir.c | struct inode *adir = *result; |
inode | 543 | fs/umsdos/dir.c | struct inode *inode, |
inode | 547 | fs/umsdos/dir.c | struct inode *dir = inode; |
inode | 555 | fs/umsdos/dir.c | PRINTK (("locate_path mode %x ",inode->i_mode)); |
inode | 556 | fs/umsdos/dir.c | if (!S_ISDIR(inode->i_mode)){ |
inode | 557 | fs/umsdos/dir.c | ret = umsdos_get_dirowner (inode,&dir); |
inode | 560 | fs/umsdos/dir.c | ret = umsdos_inode2entry (dir,inode,&entry); |
inode | 572 | fs/umsdos/dir.c | struct inode *adir; |
inode | 600 | fs/umsdos/dir.c | struct inode *dir, |
inode | 620 | fs/umsdos/dir.c | struct inode *dir, |
inode | 623 | fs/umsdos/dir.c | struct inode **result, /* Will hold inode of the file, if successful */ |
inode | 659 | fs/umsdos/dir.c | struct inode *aadir; |
inode | 689 | fs/umsdos/dir.c | struct inode *inode; |
inode | 691 | fs/umsdos/dir.c | inode = *result; |
inode | 692 | fs/umsdos/dir.c | if (inode == NULL){ |
inode | 697 | fs/umsdos/dir.c | umsdos_lookup_patch (dir,inode,&info.entry,info.f_pos); |
inode | 698 | fs/umsdos/dir.c | PRINTK (("lookup ino %ld flags %d\n",inode->i_ino |
inode | 701 | fs/umsdos/dir.c | ret = umsdos_hlink2inode (inode,result); |
inode | 729 | fs/umsdos/dir.c | struct inode *dir, |
inode | 732 | fs/umsdos/dir.c | struct inode **result) /* Will hold inode of the file, if successful */ |
inode | 740 | fs/umsdos/dir.c | int umsdos_hlink2inode (struct inode *hlink, struct inode **result) |
inode | 755 | fs/umsdos/dir.c | struct inode *dir; |
inode | 27 | fs/umsdos/emd.c | struct inode *inode, |
inode | 35 | fs/umsdos/emd.c | ret = msdos_file_read(inode,filp,buf,count); |
inode | 43 | fs/umsdos/emd.c | struct inode *inode, |
inode | 51 | fs/umsdos/emd.c | ret = msdos_file_write(inode,filp,buf,count); |
inode | 64 | fs/umsdos/emd.c | struct inode *emd_dir, |
inode | 80 | fs/umsdos/emd.c | struct inode *emd_dir, |
inode | 102 | fs/umsdos/emd.c | struct inode *umsdos_emd_dir_lookup(struct inode *dir, int creat) |
inode | 104 | fs/umsdos/emd.c | struct inode *ret = NULL; |
inode | 142 | fs/umsdos/emd.c | struct inode *emd_dir, |
inode | 163 | fs/umsdos/emd.c | struct inode *dir, |
inode | 164 | fs/umsdos/emd.c | struct inode *emd_dir, |
inode | 219 | fs/umsdos/emd.c | struct inode *inode, |
inode | 231 | fs/umsdos/emd.c | remain = inode->i_size - buf->filp.f_pos; |
inode | 234 | fs/umsdos/emd.c | ret = umsdos_emd_dir_read (inode,&buf->filp,buf->buffer+mustmove |
inode | 266 | fs/umsdos/emd.c | struct inode *dir, |
inode | 269 | fs/umsdos/emd.c | struct inode **pt_emd_dir) /* Will hold the emd_dir inode */ |
inode | 278 | fs/umsdos/emd.c | struct inode *emd_dir = umsdos_emd_dir_lookup(dir,1); |
inode | 366 | fs/umsdos/emd.c | struct inode *dir, |
inode | 369 | fs/umsdos/emd.c | struct inode *emd_dir; |
inode | 385 | fs/umsdos/emd.c | struct inode *dir, |
inode | 388 | fs/umsdos/emd.c | struct inode *emd_dir; |
inode | 413 | fs/umsdos/emd.c | struct inode *dir, |
inode | 417 | fs/umsdos/emd.c | struct inode *emd_dir; |
inode | 443 | fs/umsdos/emd.c | int umsdos_isempty (struct inode *dir) |
inode | 446 | fs/umsdos/emd.c | struct inode *emd_dir = umsdos_emd_dir_lookup(dir,0); |
inode | 475 | fs/umsdos/emd.c | struct inode *dir, |
inode | 481 | fs/umsdos/emd.c | struct inode *emd_dir; |
inode | 28 | fs/umsdos/file.c | struct inode *inode, |
inode | 34 | fs/umsdos/file.c | int ret = msdos_file_read(inode,filp,buf,count); |
inode | 35 | fs/umsdos/file.c | if (!IS_RDONLY(inode)){ |
inode | 36 | fs/umsdos/file.c | inode->i_atime = CURRENT_TIME; |
inode | 37 | fs/umsdos/file.c | inode->i_dirt = 1; |
inode | 45 | fs/umsdos/file.c | struct inode *inode, |
inode | 50 | fs/umsdos/file.c | return msdos_file_write(inode,filp,buf,count); |
inode | 55 | fs/umsdos/file.c | static void UMSDOS_truncate(struct inode *inode) |
inode | 58 | fs/umsdos/file.c | msdos_truncate (inode); |
inode | 59 | fs/umsdos/file.c | inode->i_ctime = inode->i_mtime = CURRENT_TIME; |
inode | 60 | fs/umsdos/file.c | inode->i_dirt = 1; |
inode | 21 | fs/umsdos/inode.c | struct inode *pseudo_root=NULL; /* Useful to simulate the pseudo DOS */ |
inode | 39 | fs/umsdos/inode.c | void UMSDOS_put_inode(struct inode *inode) |
inode | 41 | fs/umsdos/inode.c | PRINTK (("put inode %x owner %x pos %d dir %x\n",inode |
inode | 42 | fs/umsdos/inode.c | ,inode->u.umsdos_i.i_emd_owner,inode->u.umsdos_i.pos |
inode | 43 | fs/umsdos/inode.c | ,inode->u.umsdos_i.i_emd_dir)); |
inode | 44 | fs/umsdos/inode.c | if (inode != NULL && inode == pseudo_root){ |
inode | 47 | fs/umsdos/inode.c | msdos_put_inode(inode); |
inode | 69 | fs/umsdos/inode.c | struct inode *dir, |
inode | 72 | fs/umsdos/inode.c | struct inode **result) /* Will hold inode of the file, if successful */ |
inode | 85 | fs/umsdos/inode.c | void umsdos_setup_dir_inode (struct inode *inode) |
inode | 87 | fs/umsdos/inode.c | inode->u.umsdos_i.i_emd_dir = 0; |
inode | 89 | fs/umsdos/inode.c | struct inode *emd_dir = umsdos_emd_dir_lookup (inode,0); |
inode | 91 | fs/umsdos/inode.c | inode->i_op = emd_dir != NULL |
inode | 101 | fs/umsdos/inode.c | struct inode *inode, |
inode | 102 | fs/umsdos/inode.c | struct inode *dir, |
inode | 105 | fs/umsdos/inode.c | struct inode *emd_owner = umsdos_emd_dir_lookup(dir,1); |
inode | 106 | fs/umsdos/inode.c | inode->u.umsdos_i.i_dir_owner = dir->i_ino; |
inode | 107 | fs/umsdos/inode.c | inode->u.umsdos_i.i_emd_owner = emd_owner->i_ino; |
inode | 109 | fs/umsdos/inode.c | inode->u.umsdos_i.pos = f_pos; |
inode | 115 | fs/umsdos/inode.c | int umsdos_isinit (struct inode *inode) |
inode | 118 | fs/umsdos/inode.c | return inode->u.umsdos_i.i_emd_owner != 0; |
inode | 120 | fs/umsdos/inode.c | return inode->i_atime != 0; |
inode | 122 | fs/umsdos/inode.c | return inode->i_count > 1; |
inode | 129 | fs/umsdos/inode.c | struct inode *inode, |
inode | 130 | fs/umsdos/inode.c | struct inode *dir, /* May be NULL */ |
inode | 149 | fs/umsdos/inode.c | if (!umsdos_isinit(inode)){ |
inode | 150 | fs/umsdos/inode.c | inode->u.umsdos_i.i_emd_dir = 0; |
inode | 151 | fs/umsdos/inode.c | if (S_ISREG(inode->i_mode)){ |
inode | 152 | fs/umsdos/inode.c | if (inode->i_op->bmap != NULL){ |
inode | 153 | fs/umsdos/inode.c | inode->i_op = &umsdos_file_inode_operations; |
inode | 155 | fs/umsdos/inode.c | inode->i_op = &umsdos_file_inode_operations_no_bmap; |
inode | 157 | fs/umsdos/inode.c | }else if (S_ISDIR(inode->i_mode)){ |
inode | 159 | fs/umsdos/inode.c | umsdos_setup_dir_inode(inode); |
inode | 161 | fs/umsdos/inode.c | }else if (S_ISLNK(inode->i_mode)){ |
inode | 162 | fs/umsdos/inode.c | inode->i_op = &umsdos_symlink_inode_operations; |
inode | 163 | fs/umsdos/inode.c | }else if (S_ISCHR(inode->i_mode)){ |
inode | 164 | fs/umsdos/inode.c | inode->i_op = &chrdev_inode_operations; |
inode | 165 | fs/umsdos/inode.c | }else if (S_ISBLK(inode->i_mode)){ |
inode | 166 | fs/umsdos/inode.c | inode->i_op = &blkdev_inode_operations; |
inode | 167 | fs/umsdos/inode.c | }else if (S_ISFIFO(inode->i_mode)){ |
inode | 168 | fs/umsdos/inode.c | init_fifo(inode); |
inode | 181 | fs/umsdos/inode.c | umsdos_set_dirinfo (inode,dir,f_pos); |
inode | 188 | fs/umsdos/inode.c | struct inode *emd_owner = umsdos_emd_dir_lookup(dir,1); |
inode | 190 | fs/umsdos/inode.c | if (emd_owner->i_ino != inode->u.umsdos_i.i_emd_owner){ |
inode | 192 | fs/umsdos/inode.c | ,inode->i_ino,emd_owner->i_ino,inode->u.umsdos_i.i_emd_owner); |
inode | 201 | fs/umsdos/inode.c | struct inode *inode, |
inode | 202 | fs/umsdos/inode.c | struct inode **result) /* Hold NULL if any error */ |
inode | 206 | fs/umsdos/inode.c | unsigned long ino = inode->u.umsdos_i.i_dir_owner; |
inode | 211 | fs/umsdos/inode.c | struct inode *dir = *result = iget(inode->i_sb,ino); |
inode | 222 | fs/umsdos/inode.c | void UMSDOS_read_inode(struct inode *inode) |
inode | 224 | fs/umsdos/inode.c | PRINTK (("read inode %x ino = %d ",inode,inode->i_ino)); |
inode | 225 | fs/umsdos/inode.c | msdos_read_inode(inode); |
inode | 226 | fs/umsdos/inode.c | PRINTK (("ino = %d %d\n",inode->i_ino,inode->i_count)); |
inode | 227 | fs/umsdos/inode.c | if (S_ISDIR(inode->i_mode) |
inode | 228 | fs/umsdos/inode.c | && (inode->u.umsdos_i.u.dir_info.creating != 0 |
inode | 229 | fs/umsdos/inode.c | || inode->u.umsdos_i.u.dir_info.looking != 0 |
inode | 230 | fs/umsdos/inode.c | || inode->u.umsdos_i.u.dir_info.p != NULL)){ |
inode | 232 | fs/umsdos/inode.c | ,inode->u.umsdos_i.u.dir_info.creating |
inode | 233 | fs/umsdos/inode.c | ,inode->u.umsdos_i.u.dir_info.looking |
inode | 234 | fs/umsdos/inode.c | ,inode->u.umsdos_i.u.dir_info.p)); |
inode | 249 | fs/umsdos/inode.c | umsdos_patch_inode(inode,NULL,0); |
inode | 255 | fs/umsdos/inode.c | void UMSDOS_write_inode(struct inode *inode) |
inode | 259 | fs/umsdos/inode.c | PRINTK (("UMSDOS_write_inode emd %d\n",inode->u.umsdos_i.i_emd_owner)); |
inode | 260 | fs/umsdos/inode.c | msdos_write_inode(inode); |
inode | 261 | fs/umsdos/inode.c | newattrs.ia_mtime = inode->i_mtime; |
inode | 262 | fs/umsdos/inode.c | newattrs.ia_atime = inode->i_atime; |
inode | 263 | fs/umsdos/inode.c | newattrs.ia_ctime = inode->i_ctime; |
inode | 270 | fs/umsdos/inode.c | UMSDOS_notify_change (inode, &newattrs); |
inode | 271 | fs/umsdos/inode.c | inode->i_dirt = 0; |
inode | 274 | fs/umsdos/inode.c | int UMSDOS_notify_change(struct inode *inode, struct iattr *attr) |
inode | 278 | fs/umsdos/inode.c | if ((ret = inode_change_ok(inode, attr)) != 0) |
inode | 281 | fs/umsdos/inode.c | if (inode->i_nlink > 0){ |
inode | 287 | fs/umsdos/inode.c | unsigned long i_emd_owner = inode->u.umsdos_i.i_emd_owner; |
inode | 288 | fs/umsdos/inode.c | if (inode == inode->i_sb->s_mounted){ |
inode | 308 | fs/umsdos/inode.c | struct inode *emd_owner = iget (inode->i_sb,i_emd_owner); |
inode | 309 | fs/umsdos/inode.c | PRINTK (("notify change %p ",inode)); |
inode | 316 | fs/umsdos/inode.c | filp.f_pos = inode->u.umsdos_i.pos; |
inode | 337 | fs/umsdos/inode.c | entry.nlink = inode->i_nlink; |
inode | 338 | fs/umsdos/inode.c | filp.f_pos = inode->u.umsdos_i.pos; |
inode | 343 | fs/umsdos/inode.c | ,inode->u.umsdos_i.pos |
inode | 356 | fs/umsdos/inode.c | inode_setattr(inode, attr); |
inode | 443 | fs/umsdos/inode.c | struct inode *pseudo; |
inode | 448 | fs/umsdos/inode.c | struct inode *etc = NULL; |
inode | 449 | fs/umsdos/inode.c | struct inode *sbin = NULL; |
inode | 454 | fs/umsdos/inode.c | struct inode *init = NULL; |
inode | 455 | fs/umsdos/inode.c | struct inode *rc = NULL; |
inode | 469 | fs/umsdos/inode.c | struct inode *init = NULL; |
inode | 56 | fs/umsdos/ioctl.c | struct inode *dir, |
inode | 135 | fs/umsdos/ioctl.c | struct inode *emd_dir = umsdos_emd_dir_lookup (dir,0); |
inode | 179 | fs/umsdos/ioctl.c | struct inode *emd_dir = umsdos_emd_dir_lookup (dir,1); |
inode | 272 | fs/umsdos/ioctl.c | struct inode *inode; |
inode | 274 | fs/umsdos/ioctl.c | ,data.dos_dirent.d_reclen,&inode); |
inode | 276 | fs/umsdos/ioctl.c | data.stat.st_ino = inode->i_ino; |
inode | 277 | fs/umsdos/ioctl.c | data.stat.st_mode = inode->i_mode; |
inode | 278 | fs/umsdos/ioctl.c | data.stat.st_size = inode->i_size; |
inode | 279 | fs/umsdos/ioctl.c | data.stat.st_atime = inode->i_atime; |
inode | 280 | fs/umsdos/ioctl.c | data.stat.st_ctime = inode->i_ctime; |
inode | 281 | fs/umsdos/ioctl.c | data.stat.st_mtime = inode->i_mtime; |
inode | 283 | fs/umsdos/ioctl.c | iput (inode); |
inode | 32 | fs/umsdos/namei.c | static int umsdos_waitcreate(struct inode *dir) |
inode | 45 | fs/umsdos/namei.c | static void umsdos_waitlookup (struct inode *dir) |
inode | 54 | fs/umsdos/namei.c | void umsdos_lockcreate (struct inode *dir) |
inode | 96 | fs/umsdos/namei.c | static void umsdos_lockcreate2 (struct inode *dir1, struct inode *dir2) |
inode | 121 | fs/umsdos/namei.c | void umsdos_startlookup (struct inode *dir) |
inode | 130 | fs/umsdos/namei.c | void umsdos_unlockcreate (struct inode *dir) |
inode | 142 | fs/umsdos/namei.c | void umsdos_endlookup (struct inode *dir) |
inode | 152 | fs/umsdos/namei.c | static void umsdos_lockcreate (struct inode *dir){} |
inode | 153 | fs/umsdos/namei.c | static void umsdos_lockcreate2 (struct inode *dir1, struct inode *dir2){} |
inode | 154 | fs/umsdos/namei.c | void umsdos_startlookup (struct inode *dir){} |
inode | 155 | fs/umsdos/namei.c | static void umsdos_unlockcreate (struct inode *dir){} |
inode | 156 | fs/umsdos/namei.c | void umsdos_endlookup (struct inode *dir){} |
inode | 159 | fs/umsdos/namei.c | struct inode *dir, |
inode | 200 | fs/umsdos/namei.c | struct inode *dir, |
inode | 207 | fs/umsdos/namei.c | struct inode **result) /* Will hold the inode of the newly created */ |
inode | 232 | fs/umsdos/namei.c | struct inode *inode = *result; |
inode | 233 | fs/umsdos/namei.c | umsdos_lookup_patch (dir,inode,&info.entry,info.f_pos); |
inode | 234 | fs/umsdos/namei.c | PRINTK (("inode %p[%d] ",inode,inode->i_count)); |
inode | 309 | fs/umsdos/namei.c | struct inode * old_dir, |
inode | 312 | fs/umsdos/namei.c | struct inode * new_dir, |
inode | 376 | fs/umsdos/namei.c | struct inode *inode; |
inode | 380 | fs/umsdos/namei.c | ,&inode); |
inode | 390 | fs/umsdos/namei.c | umsdos_set_dirinfo (inode,new_dir,new_info.f_pos); |
inode | 392 | fs/umsdos/namei.c | iput (inode); |
inode | 421 | fs/umsdos/namei.c | struct inode * dir, |
inode | 438 | fs/umsdos/namei.c | struct inode *inode; |
inode | 442 | fs/umsdos/namei.c | ret = umsdos_create_any (dir,name,len,mode,0,flags,&inode); |
inode | 449 | fs/umsdos/namei.c | ret = umsdos_file_write_kmem (inode,&filp,symname,len); |
inode | 450 | fs/umsdos/namei.c | iput (inode); |
inode | 474 | fs/umsdos/namei.c | struct inode * dir, |
inode | 485 | fs/umsdos/namei.c | struct inode * oldinode, |
inode | 486 | fs/umsdos/namei.c | struct inode * dir, |
inode | 568 | fs/umsdos/namei.c | struct inode *olddir; |
inode | 665 | fs/umsdos/namei.c | struct inode *dir, |
inode | 669 | fs/umsdos/namei.c | struct inode **result) /* Will hold the inode of the newly created */ |
inode | 678 | fs/umsdos/namei.c | struct inode * dir, |
inode | 717 | fs/umsdos/namei.c | struct inode *subdir; |
inode | 721 | fs/umsdos/namei.c | struct inode *result; |
inode | 744 | fs/umsdos/namei.c | struct inode * dir, |
inode | 764 | fs/umsdos/namei.c | struct inode *inode; |
inode | 765 | fs/umsdos/namei.c | int ret = umsdos_create_any (dir,name,len,mode,rdev,0,&inode); |
inode | 766 | fs/umsdos/namei.c | iput (inode); |
inode | 774 | fs/umsdos/namei.c | struct inode * dir, |
inode | 867 | fs/umsdos/namei.c | struct inode *sdir; |
inode | 928 | fs/umsdos/namei.c | struct inode * dir, |
inode | 958 | fs/umsdos/namei.c | struct inode *inode; |
inode | 960 | fs/umsdos/namei.c | ret = UMSDOS_lookup (dir,name,len,&inode); |
inode | 962 | fs/umsdos/namei.c | PRINTK (("unlink nlink = %d ",inode->i_nlink)); |
inode | 963 | fs/umsdos/namei.c | inode->i_nlink--; |
inode | 964 | fs/umsdos/namei.c | if (inode->i_nlink == 0){ |
inode | 965 | fs/umsdos/namei.c | struct inode *hdir = iget(inode->i_sb |
inode | 966 | fs/umsdos/namei.c | ,inode->u.umsdos_i.i_dir_owner); |
inode | 968 | fs/umsdos/namei.c | ret = umsdos_inode2entry (hdir,inode,&entry); |
inode | 978 | fs/umsdos/namei.c | ret = UMSDOS_notify_change (inode, &newattrs); |
inode | 980 | fs/umsdos/namei.c | iput (inode); |
inode | 1012 | fs/umsdos/namei.c | struct inode * old_dir, |
inode | 1015 | fs/umsdos/namei.c | struct inode * new_dir, |
inode | 25 | fs/umsdos/rdir.c | extern struct inode *pseudo_root; |
inode | 64 | fs/umsdos/rdir.c | struct inode *dir, |
inode | 84 | fs/umsdos/rdir.c | struct inode *dir, |
inode | 87 | fs/umsdos/rdir.c | struct inode **result, /* Will hold inode of the file, if successful */ |
inode | 108 | fs/umsdos/rdir.c | struct inode *inode = *result; |
inode | 109 | fs/umsdos/rdir.c | if (inode == pseudo_root && !nopseudo){ |
inode | 117 | fs/umsdos/rdir.c | }else if (S_ISDIR(inode->i_mode)){ |
inode | 120 | fs/umsdos/rdir.c | umsdos_setup_dir_inode(inode); |
inode | 128 | fs/umsdos/rdir.c | struct inode *dir, |
inode | 131 | fs/umsdos/rdir.c | struct inode **result) /* Will hold inode of the file, if successful */ |
inode | 137 | fs/umsdos/rdir.c | struct inode *dir, |
inode | 171 | fs/umsdos/rdir.c | struct inode *sdir; |
inode | 30 | fs/umsdos/symlink.c | struct inode *inode, |
inode | 32 | fs/umsdos/symlink.c | int (*msdos_read)(struct inode *, struct file *, char *, int), |
inode | 35 | fs/umsdos/symlink.c | int ret = inode->i_size; |
inode | 40 | fs/umsdos/symlink.c | if ((*msdos_read) (inode, &filp, buffer,ret) != ret){ |
inode | 52 | fs/umsdos/symlink.c | struct inode * dir, |
inode | 53 | fs/umsdos/symlink.c | struct inode * inode, |
inode | 56 | fs/umsdos/symlink.c | struct inode ** res_inode) |
inode | 69 | fs/umsdos/symlink.c | if (!inode){ |
inode | 72 | fs/umsdos/symlink.c | }else if (!S_ISLNK(inode->i_mode)){ |
inode | 74 | fs/umsdos/symlink.c | *res_inode = inode; |
inode | 75 | fs/umsdos/symlink.c | inode = NULL; |
inode | 78 | fs/umsdos/symlink.c | ret = umsdos_readlink_x (inode,path |
inode | 83 | fs/umsdos/symlink.c | iput(inode); |
inode | 84 | fs/umsdos/symlink.c | inode = NULL; |
inode | 96 | fs/umsdos/symlink.c | iput(inode); |
inode | 102 | fs/umsdos/symlink.c | static int UMSDOS_readlink(struct inode * inode, char * buffer, int buflen) |
inode | 105 | fs/umsdos/symlink.c | if (S_ISLNK(inode->i_mode)) { |
inode | 106 | fs/umsdos/symlink.c | ret = umsdos_readlink_x (inode,buffer,msdos_file_read,buflen); |
inode | 108 | fs/umsdos/symlink.c | PRINTK (("readlink %d %x bufsiz %d\n",ret,inode->i_mode,buflen)); |
inode | 109 | fs/umsdos/symlink.c | iput(inode); |
inode | 278 | fs/xiafs/bitmap.c | void xiafs_free_inode(struct inode * inode) |
inode | 284 | fs/xiafs/bitmap.c | if (!inode) |
inode | 286 | fs/xiafs/bitmap.c | if (!inode->i_dev || inode->i_count!=1 |
inode | 287 | fs/xiafs/bitmap.c | || inode->i_nlink || !inode->i_sb || inode->i_ino < 3 |
inode | 288 | fs/xiafs/bitmap.c | || inode->i_ino > inode->i_sb->u.xiafs_sb.s_ninodes) { |
inode | 292 | fs/xiafs/bitmap.c | sb = inode->i_sb; |
inode | 293 | fs/xiafs/bitmap.c | ino = inode->i_ino; |
inode | 297 | fs/xiafs/bitmap.c | clear_inode(inode); |
inode | 301 | fs/xiafs/bitmap.c | kdevname(inode->i_dev), ino, ino, WHERE_ERR); |
inode | 306 | fs/xiafs/bitmap.c | struct inode * xiafs_new_inode(struct inode * dir) |
inode | 309 | fs/xiafs/bitmap.c | struct inode * inode; |
inode | 313 | fs/xiafs/bitmap.c | if (!dir || !(inode = get_empty_inode())) |
inode | 315 | fs/xiafs/bitmap.c | inode->i_sb = sb; |
inode | 316 | fs/xiafs/bitmap.c | inode->i_flags = inode->i_sb->s_flags; |
inode | 320 | fs/xiafs/bitmap.c | iput(inode); |
inode | 323 | fs/xiafs/bitmap.c | inode->i_count = 1; |
inode | 324 | fs/xiafs/bitmap.c | inode->i_nlink = 1; |
inode | 325 | fs/xiafs/bitmap.c | inode->i_dev = sb->s_dev; |
inode | 326 | fs/xiafs/bitmap.c | inode->i_uid = current->fsuid; |
inode | 327 | fs/xiafs/bitmap.c | inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; |
inode | 328 | fs/xiafs/bitmap.c | inode->i_dirt = 1; |
inode | 329 | fs/xiafs/bitmap.c | inode->i_ino = tmp; |
inode | 330 | fs/xiafs/bitmap.c | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
inode | 331 | fs/xiafs/bitmap.c | inode->i_op = NULL; |
inode | 332 | fs/xiafs/bitmap.c | inode->i_blocks = 0; |
inode | 333 | fs/xiafs/bitmap.c | inode->i_blksize = XIAFS_ZSIZE(inode->i_sb); |
inode | 334 | fs/xiafs/bitmap.c | insert_inode_hash(inode); |
inode | 335 | fs/xiafs/bitmap.c | return inode; |
inode | 23 | fs/xiafs/dir.c | static int xiafs_dir_read(struct inode *, struct file *, char *, int); |
inode | 24 | fs/xiafs/dir.c | static int xiafs_readdir(struct inode *, struct file *, void *, filldir_t); |
inode | 60 | fs/xiafs/dir.c | static int xiafs_dir_read(struct inode * inode, |
inode | 66 | fs/xiafs/dir.c | static int xiafs_readdir(struct inode * inode, struct file * filp, |
inode | 73 | fs/xiafs/dir.c | if (!inode || !inode->i_sb || !S_ISDIR(inode->i_mode)) |
inode | 75 | fs/xiafs/dir.c | if (inode->i_size & (XIAFS_ZSIZE(inode->i_sb) - 1) ) |
inode | 77 | fs/xiafs/dir.c | while (filp->f_pos < inode->i_size) { |
inode | 78 | fs/xiafs/dir.c | offset = filp->f_pos & (XIAFS_ZSIZE(inode->i_sb) - 1); |
inode | 79 | fs/xiafs/dir.c | bh = xiafs_bread(inode, filp->f_pos >> XIAFS_ZSIZE_BITS(inode->i_sb),0); |
inode | 81 | fs/xiafs/dir.c | filp->f_pos += XIAFS_ZSIZE(inode->i_sb)-offset; |
inode | 84 | fs/xiafs/dir.c | for (i = 0; i < XIAFS_ZSIZE(inode->i_sb) && i < offset; ) { |
inode | 93 | fs/xiafs/dir.c | while (offset < XIAFS_ZSIZE(inode->i_sb) && filp->f_pos < inode->i_size) { |
inode | 94 | fs/xiafs/dir.c | if (de->d_ino > inode->i_sb->u.xiafs_sb.s_ninodes || |
inode | 96 | fs/xiafs/dir.c | (char *)de+de->d_rec_len > XIAFS_ZSIZE(inode->i_sb)+bh->b_data || |
inode | 105 | fs/xiafs/dir.c | if (!IS_RDONLY (inode)) { |
inode | 106 | fs/xiafs/dir.c | inode->i_atime=CURRENT_TIME; |
inode | 107 | fs/xiafs/dir.c | inode->i_dirt=1; |
inode | 119 | fs/xiafs/dir.c | if (offset > XIAFS_ZSIZE(inode->i_sb)) { |
inode | 124 | fs/xiafs/dir.c | if (!IS_RDONLY (inode)) { |
inode | 125 | fs/xiafs/dir.c | inode->i_atime=CURRENT_TIME; |
inode | 126 | fs/xiafs/dir.c | inode->i_dirt=1; |
inode | 31 | fs/xiafs/file.c | static int xiafs_file_read(struct inode *, struct file *, char *, int); |
inode | 32 | fs/xiafs/file.c | static int xiafs_file_write(struct inode *, struct file *, const char *, int); |
inode | 70 | fs/xiafs/file.c | xiafs_file_read(struct inode * inode, struct file * filp, char * buf, int count) |
inode | 79 | fs/xiafs/file.c | if (!inode) { |
inode | 83 | fs/xiafs/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 88 | fs/xiafs/file.c | left = inode->i_size - offset; |
inode | 94 | fs/xiafs/file.c | zone_nr = offset >> XIAFS_ZSIZE_BITS(inode->i_sb); |
inode | 95 | fs/xiafs/file.c | offset &= XIAFS_ZSIZE(inode->i_sb) -1 ; |
inode | 96 | fs/xiafs/file.c | f_zones =(inode->i_size+XIAFS_ZSIZE(inode->i_sb)-1)>>XIAFS_ZSIZE_BITS(inode->i_sb); |
inode | 97 | fs/xiafs/file.c | zones = (left+offset+XIAFS_ZSIZE(inode->i_sb)-1) >> XIAFS_ZSIZE_BITS(inode->i_sb); |
inode | 100 | fs/xiafs/file.c | if(zones < read_ahead[MAJOR(inode->i_dev)] >> (1+XIAFS_ZSHIFT(inode->i_sb))) |
inode | 101 | fs/xiafs/file.c | zones = read_ahead[MAJOR(inode->i_dev)] >> (1+XIAFS_ZSHIFT(inode->i_sb)); |
inode | 120 | fs/xiafs/file.c | *bhb = xiafs_getblk(inode, zone_nr++, 0); |
inode | 152 | fs/xiafs/file.c | if (left < XIAFS_ZSIZE(inode->i_sb) - offset) |
inode | 155 | fs/xiafs/file.c | chars = XIAFS_ZSIZE(inode->i_sb) - offset; |
inode | 182 | fs/xiafs/file.c | if (!IS_RDONLY (inode)) { |
inode | 183 | fs/xiafs/file.c | inode->i_atime = CURRENT_TIME; |
inode | 184 | fs/xiafs/file.c | inode->i_dirt = 1; |
inode | 190 | fs/xiafs/file.c | xiafs_file_write(struct inode * inode, struct file * filp, const char * buf, int count) |
inode | 197 | fs/xiafs/file.c | if (!inode) { |
inode | 201 | fs/xiafs/file.c | if (!S_ISREG(inode->i_mode)) { |
inode | 210 | fs/xiafs/file.c | pos = inode->i_size; |
inode | 215 | fs/xiafs/file.c | bh = xiafs_getblk(inode, pos >> XIAFS_ZSIZE_BITS(inode->i_sb), 1); |
inode | 221 | fs/xiafs/file.c | c = XIAFS_ZSIZE(inode->i_sb) - (pos & (XIAFS_ZSIZE(inode->i_sb) - 1)); |
inode | 224 | fs/xiafs/file.c | if (c != XIAFS_ZSIZE(inode->i_sb) && !bh->b_uptodate) { |
inode | 234 | fs/xiafs/file.c | cp = (pos & (XIAFS_ZSIZE(inode->i_sb)-1)) + bh->b_data; |
inode | 236 | fs/xiafs/file.c | if (pos > inode->i_size) { |
inode | 237 | fs/xiafs/file.c | inode->i_size = pos; |
inode | 238 | fs/xiafs/file.c | inode->i_dirt = 1; |
inode | 247 | fs/xiafs/file.c | inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
inode | 249 | fs/xiafs/file.c | inode->i_dirt = 1; |
inode | 26 | fs/xiafs/fsync.c | #define blocksize (XIAFS_ZSIZE(inode->i_sb)) |
inode | 27 | fs/xiafs/fsync.c | #define addr_per_block (XIAFS_ADDRS_PER_Z(inode->i_sb)) |
inode | 29 | fs/xiafs/fsync.c | static int sync_block (struct inode * inode, unsigned long * block, int wait) |
inode | 37 | fs/xiafs/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
inode | 58 | fs/xiafs/fsync.c | static int sync_iblock (struct inode * inode, unsigned long * iblock, |
inode | 67 | fs/xiafs/fsync.c | rc = sync_block (inode, iblock, wait); |
inode | 70 | fs/xiafs/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
inode | 82 | fs/xiafs/fsync.c | static int sync_direct(struct inode *inode, int wait) |
inode | 88 | fs/xiafs/fsync.c | rc = sync_block (inode, inode->u.ext_i.i_data + i, wait); |
inode | 97 | fs/xiafs/fsync.c | static int sync_indirect(struct inode *inode, unsigned long *iblock, int wait) |
inode | 103 | fs/xiafs/fsync.c | rc = sync_iblock (inode, iblock, &ind_bh, wait); |
inode | 108 | fs/xiafs/fsync.c | rc = sync_block (inode, |
inode | 120 | fs/xiafs/fsync.c | static int sync_dindirect(struct inode *inode, unsigned long *diblock, |
inode | 127 | fs/xiafs/fsync.c | rc = sync_iblock (inode, diblock, &dind_bh, wait); |
inode | 132 | fs/xiafs/fsync.c | rc = sync_indirect (inode, |
inode | 144 | fs/xiafs/fsync.c | int xiafs_sync_file(struct inode * inode, struct file * file) |
inode | 148 | fs/xiafs/fsync.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 149 | fs/xiafs/fsync.c | S_ISLNK(inode->i_mode))) |
inode | 153 | fs/xiafs/fsync.c | err |= sync_direct(inode, wait); |
inode | 154 | fs/xiafs/fsync.c | err |= sync_indirect(inode, &inode->u.xiafs_i.i_ind_zone, wait); |
inode | 155 | fs/xiafs/fsync.c | err |= sync_dindirect(inode, &inode->u.xiafs_i.i_dind_zone, wait); |
inode | 157 | fs/xiafs/fsync.c | err |= xiafs_sync_inode (inode); |
inode | 28 | fs/xiafs/inode.c | void xiafs_put_inode(struct inode *inode) |
inode | 30 | fs/xiafs/inode.c | if (inode->i_nlink) |
inode | 32 | fs/xiafs/inode.c | inode->i_size = 0; |
inode | 33 | fs/xiafs/inode.c | xiafs_truncate(inode); |
inode | 34 | fs/xiafs/inode.c | xiafs_free_inode(inode); |
inode | 195 | fs/xiafs/inode.c | int xiafs_bmap(struct inode * inode,int zone) |
inode | 203 | fs/xiafs/inode.c | if (zone >= 8+(1+XIAFS_ADDRS_PER_Z(inode->i_sb))*XIAFS_ADDRS_PER_Z(inode->i_sb)) { |
inode | 207 | fs/xiafs/inode.c | if (!IS_RDONLY (inode)) { |
inode | 208 | fs/xiafs/inode.c | inode->i_atime = CURRENT_TIME; |
inode | 209 | fs/xiafs/inode.c | inode->i_dirt = 1; |
inode | 212 | fs/xiafs/inode.c | return inode->u.xiafs_i.i_zone[zone]; |
inode | 214 | fs/xiafs/inode.c | if (zone < XIAFS_ADDRS_PER_Z(inode->i_sb)) { |
inode | 215 | fs/xiafs/inode.c | i = inode->u.xiafs_i.i_ind_zone; |
inode | 217 | fs/xiafs/inode.c | i = zone_bmap(bread(inode->i_dev, i, XIAFS_ZSIZE(inode->i_sb)), zone); |
inode | 220 | fs/xiafs/inode.c | zone -= XIAFS_ADDRS_PER_Z(inode->i_sb); |
inode | 221 | fs/xiafs/inode.c | i = inode->u.xiafs_i.i_dind_zone; |
inode | 223 | fs/xiafs/inode.c | i = zone_bmap(bread(inode->i_dev, i, XIAFS_ZSIZE(inode->i_sb)), |
inode | 224 | fs/xiafs/inode.c | zone >> XIAFS_ADDRS_PER_Z_BITS(inode->i_sb)); |
inode | 226 | fs/xiafs/inode.c | i= zone_bmap(bread(inode->i_dev,i, XIAFS_ZSIZE(inode->i_sb)), |
inode | 227 | fs/xiafs/inode.c | zone & (XIAFS_ADDRS_PER_Z(inode->i_sb)-1)); |
inode | 231 | fs/xiafs/inode.c | static u_long get_prev_addr(struct inode * inode, int zone) |
inode | 237 | fs/xiafs/inode.c | if ((tmp=xiafs_bmap(inode, zone))) |
inode | 239 | fs/xiafs/inode.c | random_nr=(random_nr+23)%inode->i_sb->u.xiafs_sb.s_ndatazones; |
inode | 240 | fs/xiafs/inode.c | return random_nr + inode->i_sb->u.xiafs_sb.s_firstdatazone; |
inode | 244 | fs/xiafs/inode.c | dt_getblk(struct inode * inode, u_long *lp, int create, u_long prev_addr) |
inode | 251 | fs/xiafs/inode.c | result = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
inode | 259 | fs/xiafs/inode.c | tmp = xiafs_new_zone(inode->i_sb, prev_addr); |
inode | 262 | fs/xiafs/inode.c | result = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
inode | 264 | fs/xiafs/inode.c | xiafs_free_zone(inode->i_sb, tmp); |
inode | 269 | fs/xiafs/inode.c | inode->i_blocks+=2 << XIAFS_ZSHIFT(inode->i_sb); |
inode | 274 | fs/xiafs/inode.c | indt_getblk(struct inode * inode, struct buffer_head * bh, |
inode | 294 | fs/xiafs/inode.c | result = getblk(bh->b_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
inode | 306 | fs/xiafs/inode.c | tmp = xiafs_new_zone(inode->i_sb, prev_addr); |
inode | 311 | fs/xiafs/inode.c | result = getblk(bh->b_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
inode | 313 | fs/xiafs/inode.c | xiafs_free_zone(inode->i_sb, tmp); |
inode | 318 | fs/xiafs/inode.c | inode->i_blocks+=2 << XIAFS_ZSHIFT(inode->i_sb); |
inode | 324 | fs/xiafs/inode.c | struct buffer_head * xiafs_getblk(struct inode * inode, int zone, int create) |
inode | 333 | fs/xiafs/inode.c | if (zone >= 8+(1+XIAFS_ADDRS_PER_Z(inode->i_sb))*XIAFS_ADDRS_PER_Z(inode->i_sb)) { |
inode | 339 | fs/xiafs/inode.c | prev_addr=get_prev_addr(inode, zone); |
inode | 341 | fs/xiafs/inode.c | return dt_getblk(inode, zone+inode->u.xiafs_i.i_zone, create, prev_addr); |
inode | 343 | fs/xiafs/inode.c | if (zone < XIAFS_ADDRS_PER_Z(inode->i_sb)) { |
inode | 344 | fs/xiafs/inode.c | bh = dt_getblk(inode, &(inode->u.xiafs_i.i_ind_zone), create, prev_addr); |
inode | 345 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone, create, prev_addr); |
inode | 348 | fs/xiafs/inode.c | zone -= XIAFS_ADDRS_PER_Z(inode->i_sb); |
inode | 349 | fs/xiafs/inode.c | bh = dt_getblk(inode, &(inode->u.xiafs_i.i_dind_zone), create, prev_addr); |
inode | 350 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone>>XIAFS_ADDRS_PER_Z_BITS(inode->i_sb), |
inode | 352 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone&(XIAFS_ADDRS_PER_Z(inode->i_sb)-1), |
inode | 357 | fs/xiafs/inode.c | struct buffer_head * xiafs_bread(struct inode * inode, int zone, int create) |
inode | 361 | fs/xiafs/inode.c | bh = xiafs_getblk(inode, zone, create); |
inode | 372 | fs/xiafs/inode.c | void xiafs_read_inode(struct inode * inode) |
inode | 379 | fs/xiafs/inode.c | ino = inode->i_ino; |
inode | 380 | fs/xiafs/inode.c | inode->i_op = NULL; |
inode | 381 | fs/xiafs/inode.c | inode->i_mode=0; |
inode | 382 | fs/xiafs/inode.c | if (!ino || ino > inode->i_sb->u.xiafs_sb.s_ninodes) { |
inode | 386 | fs/xiafs/inode.c | zone = 1 + inode->i_sb->u.xiafs_sb.s_imap_zones + |
inode | 387 | fs/xiafs/inode.c | inode->i_sb->u.xiafs_sb.s_zmap_zones + |
inode | 388 | fs/xiafs/inode.c | (ino-1)/ XIAFS_INODES_PER_Z(inode->i_sb); |
inode | 389 | fs/xiafs/inode.c | if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) { |
inode | 394 | fs/xiafs/inode.c | ((ino-1) & (XIAFS_INODES_PER_Z(inode->i_sb) - 1)); |
inode | 395 | fs/xiafs/inode.c | inode->i_mode = raw_inode->i_mode; |
inode | 396 | fs/xiafs/inode.c | inode->i_uid = raw_inode->i_uid; |
inode | 397 | fs/xiafs/inode.c | inode->i_gid = raw_inode->i_gid; |
inode | 398 | fs/xiafs/inode.c | inode->i_nlink = raw_inode->i_nlinks; |
inode | 399 | fs/xiafs/inode.c | inode->i_size = raw_inode->i_size; |
inode | 400 | fs/xiafs/inode.c | inode->i_mtime = raw_inode->i_mtime; |
inode | 401 | fs/xiafs/inode.c | inode->i_atime = raw_inode->i_atime; |
inode | 402 | fs/xiafs/inode.c | inode->i_ctime = raw_inode->i_ctime; |
inode | 403 | fs/xiafs/inode.c | inode->i_blksize = XIAFS_ZSIZE(inode->i_sb); |
inode | 404 | fs/xiafs/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) { |
inode | 405 | fs/xiafs/inode.c | inode->i_blocks=0; |
inode | 406 | fs/xiafs/inode.c | inode->i_rdev = to_kdev_t(raw_inode->i_zone[0]); |
inode | 408 | fs/xiafs/inode.c | XIAFS_GET_BLOCKS(raw_inode, inode->i_blocks); |
inode | 410 | fs/xiafs/inode.c | inode->u.xiafs_i.i_zone[zone] = raw_inode->i_zone[zone] & 0xffffff; |
inode | 411 | fs/xiafs/inode.c | inode->u.xiafs_i.i_ind_zone = raw_inode->i_ind_zone & 0xffffff; |
inode | 412 | fs/xiafs/inode.c | inode->u.xiafs_i.i_dind_zone = raw_inode->i_dind_zone & 0xffffff; |
inode | 415 | fs/xiafs/inode.c | if (S_ISREG(inode->i_mode)) |
inode | 416 | fs/xiafs/inode.c | inode->i_op = &xiafs_file_inode_operations; |
inode | 417 | fs/xiafs/inode.c | else if (S_ISDIR(inode->i_mode)) |
inode | 418 | fs/xiafs/inode.c | inode->i_op = &xiafs_dir_inode_operations; |
inode | 419 | fs/xiafs/inode.c | else if (S_ISLNK(inode->i_mode)) |
inode | 420 | fs/xiafs/inode.c | inode->i_op = &xiafs_symlink_inode_operations; |
inode | 421 | fs/xiafs/inode.c | else if (S_ISCHR(inode->i_mode)) |
inode | 422 | fs/xiafs/inode.c | inode->i_op = &chrdev_inode_operations; |
inode | 423 | fs/xiafs/inode.c | else if (S_ISBLK(inode->i_mode)) |
inode | 424 | fs/xiafs/inode.c | inode->i_op = &blkdev_inode_operations; |
inode | 425 | fs/xiafs/inode.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 426 | fs/xiafs/inode.c | init_fifo(inode); |
inode | 429 | fs/xiafs/inode.c | static struct buffer_head * xiafs_update_inode(struct inode * inode) |
inode | 436 | fs/xiafs/inode.c | if (IS_RDONLY (inode)) { |
inode | 438 | fs/xiafs/inode.c | inode->i_dirt = 0; |
inode | 442 | fs/xiafs/inode.c | ino = inode->i_ino; |
inode | 443 | fs/xiafs/inode.c | if (!ino || ino > inode->i_sb->u.xiafs_sb.s_ninodes) { |
inode | 445 | fs/xiafs/inode.c | inode->i_dirt=0; |
inode | 448 | fs/xiafs/inode.c | zone = 1 + inode->i_sb->u.xiafs_sb.s_imap_zones + |
inode | 449 | fs/xiafs/inode.c | inode->i_sb->u.xiafs_sb.s_zmap_zones + |
inode | 450 | fs/xiafs/inode.c | (ino-1) / XIAFS_INODES_PER_Z(inode->i_sb); |
inode | 451 | fs/xiafs/inode.c | if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) { |
inode | 453 | fs/xiafs/inode.c | inode->i_dirt=0; |
inode | 457 | fs/xiafs/inode.c | ((ino-1) & (XIAFS_INODES_PER_Z(inode->i_sb) -1)); |
inode | 458 | fs/xiafs/inode.c | raw_inode->i_mode = inode->i_mode; |
inode | 459 | fs/xiafs/inode.c | raw_inode->i_uid = inode->i_uid; |
inode | 460 | fs/xiafs/inode.c | raw_inode->i_gid = inode->i_gid; |
inode | 461 | fs/xiafs/inode.c | raw_inode->i_nlinks = inode->i_nlink; |
inode | 462 | fs/xiafs/inode.c | raw_inode->i_size = inode->i_size; |
inode | 463 | fs/xiafs/inode.c | raw_inode->i_atime = inode->i_atime; |
inode | 464 | fs/xiafs/inode.c | raw_inode->i_ctime = inode->i_ctime; |
inode | 465 | fs/xiafs/inode.c | raw_inode->i_mtime = inode->i_mtime; |
inode | 466 | fs/xiafs/inode.c | if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) |
inode | 467 | fs/xiafs/inode.c | raw_inode->i_zone[0] = kdev_t_to_nr(inode->i_rdev); |
inode | 469 | fs/xiafs/inode.c | XIAFS_PUT_BLOCKS(raw_inode, inode->i_blocks); |
inode | 472 | fs/xiafs/inode.c | | (inode->u.xiafs_i.i_zone[zone] & 0xffffff); |
inode | 474 | fs/xiafs/inode.c | | (inode->u.xiafs_i.i_ind_zone & 0xffffff); |
inode | 476 | fs/xiafs/inode.c | | (inode->u.xiafs_i.i_dind_zone & 0xffffff); |
inode | 478 | fs/xiafs/inode.c | inode->i_dirt=0; |
inode | 484 | fs/xiafs/inode.c | void xiafs_write_inode(struct inode * inode) |
inode | 487 | fs/xiafs/inode.c | bh = xiafs_update_inode(inode); |
inode | 491 | fs/xiafs/inode.c | int xiafs_sync_inode (struct inode *inode) |
inode | 496 | fs/xiafs/inode.c | bh = xiafs_update_inode(inode); |
inode | 504 | fs/xiafs/inode.c | kdevname(inode->i_dev), inode->i_ino); |
inode | 58 | fs/xiafs/namei.c | xiafs_find_entry(struct inode * inode, const char * name, int namelen, |
inode | 66 | fs/xiafs/namei.c | if (!inode) |
inode | 71 | fs/xiafs/namei.c | if (inode->i_size & (XIAFS_ZSIZE(inode->i_sb) - 1)) { |
inode | 75 | fs/xiafs/namei.c | zones=inode->i_size >> XIAFS_ZSIZE_BITS(inode->i_sb); |
inode | 77 | fs/xiafs/namei.c | bh = xiafs_bread(inode, i, 0); |
inode | 88 | fs/xiafs/namei.c | while ( pos < XIAFS_ZSIZE(inode->i_sb) ) { |
inode | 89 | fs/xiafs/namei.c | if (dep->d_ino > inode->i_sb->u.xiafs_sb.s_ninodes || |
inode | 91 | fs/xiafs/namei.c | dep->d_rec_len+(char *)dep > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
inode | 108 | fs/xiafs/namei.c | if (pos > XIAFS_ZSIZE(inode->i_sb)) { |
inode | 116 | fs/xiafs/namei.c | int xiafs_lookup(struct inode * dir, const char * name, int len, |
inode | 117 | fs/xiafs/namei.c | struct inode ** result) |
inode | 154 | fs/xiafs/namei.c | static struct buffer_head * xiafs_add_entry(struct inode * dir, |
inode | 245 | fs/xiafs/namei.c | int xiafs_create(struct inode * dir, const char * name, int len, int mode, |
inode | 246 | fs/xiafs/namei.c | struct inode ** result) |
inode | 248 | fs/xiafs/namei.c | struct inode * inode; |
inode | 255 | fs/xiafs/namei.c | inode = xiafs_new_inode(dir); |
inode | 256 | fs/xiafs/namei.c | if (!inode) { |
inode | 260 | fs/xiafs/namei.c | inode->i_op = &xiafs_file_inode_operations; |
inode | 261 | fs/xiafs/namei.c | inode->i_mode = mode; |
inode | 262 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 265 | fs/xiafs/namei.c | inode->i_nlink--; |
inode | 266 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 267 | fs/xiafs/namei.c | iput(inode); |
inode | 271 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
inode | 275 | fs/xiafs/namei.c | *result = inode; |
inode | 279 | fs/xiafs/namei.c | int xiafs_mknod(struct inode *dir, const char *name, int len, int mode, int rdev) |
inode | 281 | fs/xiafs/namei.c | struct inode * inode; |
inode | 293 | fs/xiafs/namei.c | inode = xiafs_new_inode(dir); |
inode | 294 | fs/xiafs/namei.c | if (!inode) { |
inode | 298 | fs/xiafs/namei.c | inode->i_uid = current->fsuid; |
inode | 299 | fs/xiafs/namei.c | inode->i_mode = mode; |
inode | 300 | fs/xiafs/namei.c | inode->i_op = NULL; |
inode | 301 | fs/xiafs/namei.c | if (S_ISREG(inode->i_mode)) |
inode | 302 | fs/xiafs/namei.c | inode->i_op = &xiafs_file_inode_operations; |
inode | 303 | fs/xiafs/namei.c | else if (S_ISDIR(inode->i_mode)) { |
inode | 304 | fs/xiafs/namei.c | inode->i_op = &xiafs_dir_inode_operations; |
inode | 306 | fs/xiafs/namei.c | inode->i_mode |= S_ISGID; |
inode | 308 | fs/xiafs/namei.c | else if (S_ISLNK(inode->i_mode)) |
inode | 309 | fs/xiafs/namei.c | inode->i_op = &xiafs_symlink_inode_operations; |
inode | 310 | fs/xiafs/namei.c | else if (S_ISCHR(inode->i_mode)) |
inode | 311 | fs/xiafs/namei.c | inode->i_op = &chrdev_inode_operations; |
inode | 312 | fs/xiafs/namei.c | else if (S_ISBLK(inode->i_mode)) |
inode | 313 | fs/xiafs/namei.c | inode->i_op = &blkdev_inode_operations; |
inode | 314 | fs/xiafs/namei.c | else if (S_ISFIFO(inode->i_mode)) |
inode | 315 | fs/xiafs/namei.c | init_fifo(inode); |
inode | 317 | fs/xiafs/namei.c | inode->i_rdev = to_kdev_t(rdev); |
inode | 318 | fs/xiafs/namei.c | inode->i_atime = inode->i_ctime = inode->i_atime = CURRENT_TIME; |
inode | 319 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 322 | fs/xiafs/namei.c | inode->i_nlink--; |
inode | 323 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 324 | fs/xiafs/namei.c | iput(inode); |
inode | 328 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
inode | 332 | fs/xiafs/namei.c | iput(inode); |
inode | 336 | fs/xiafs/namei.c | int xiafs_mkdir(struct inode * dir, const char * name, int len, int mode) |
inode | 338 | fs/xiafs/namei.c | struct inode * inode; |
inode | 352 | fs/xiafs/namei.c | inode = xiafs_new_inode(dir); |
inode | 353 | fs/xiafs/namei.c | if (!inode) { |
inode | 357 | fs/xiafs/namei.c | inode->i_op = &xiafs_dir_inode_operations; |
inode | 358 | fs/xiafs/namei.c | inode->i_size = XIAFS_ZSIZE(dir->i_sb); |
inode | 359 | fs/xiafs/namei.c | inode->i_atime = inode->i_ctime = inode->i_mtime = CURRENT_TIME; |
inode | 360 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 361 | fs/xiafs/namei.c | dir_block = xiafs_bread(inode,0,1); |
inode | 364 | fs/xiafs/namei.c | inode->i_nlink--; |
inode | 365 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 366 | fs/xiafs/namei.c | iput(inode); |
inode | 370 | fs/xiafs/namei.c | de->d_ino=inode->i_ino; |
inode | 379 | fs/xiafs/namei.c | inode->i_nlink = 2; |
inode | 382 | fs/xiafs/namei.c | inode->i_mode = S_IFDIR | (mode & S_IRWXUGO & ~current->fs->umask); |
inode | 384 | fs/xiafs/namei.c | inode->i_mode |= S_ISGID; |
inode | 385 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 389 | fs/xiafs/namei.c | inode->i_nlink=0; |
inode | 390 | fs/xiafs/namei.c | iput(inode); |
inode | 393 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
inode | 398 | fs/xiafs/namei.c | iput(inode); |
inode | 406 | fs/xiafs/namei.c | static int empty_dir(struct inode * inode) |
inode | 412 | fs/xiafs/namei.c | if (inode->i_size & (XIAFS_ZSIZE(inode->i_sb)-1) ) { |
inode | 417 | fs/xiafs/namei.c | zones=inode->i_size >> XIAFS_ZSIZE_BITS(inode->i_sb); |
inode | 419 | fs/xiafs/namei.c | bh = xiafs_bread(inode, i, 0); |
inode | 426 | fs/xiafs/namei.c | if (de->d_ino != inode->i_ino || strcmp(".", de->d_name) || |
inode | 444 | fs/xiafs/namei.c | while (offset < XIAFS_ZSIZE(inode->i_sb)) { |
inode | 446 | fs/xiafs/namei.c | if (de->d_ino > inode->i_sb->u.xiafs_sb.s_ninodes || |
inode | 448 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
inode | 486 | fs/xiafs/namei.c | int xiafs_rmdir(struct inode * dir, const char * name, int len) |
inode | 489 | fs/xiafs/namei.c | struct inode * inode; |
inode | 493 | fs/xiafs/namei.c | inode = NULL; |
inode | 499 | fs/xiafs/namei.c | if (!(inode = iget(dir->i_sb, de->d_ino))) |
inode | 502 | fs/xiafs/namei.c | current->fsuid != inode->i_uid && |
inode | 505 | fs/xiafs/namei.c | if (inode->i_dev != dir->i_dev) |
inode | 507 | fs/xiafs/namei.c | if (inode == dir) /* we may not delete ".", but "../dir" is ok */ |
inode | 509 | fs/xiafs/namei.c | if (!S_ISDIR(inode->i_mode)) { |
inode | 513 | fs/xiafs/namei.c | if (!empty_dir(inode)) { |
inode | 517 | fs/xiafs/namei.c | if (inode->i_count > 1) { |
inode | 521 | fs/xiafs/namei.c | if (inode->i_nlink != 2) |
inode | 525 | fs/xiafs/namei.c | inode->i_nlink=0; |
inode | 526 | fs/xiafs/namei.c | inode->i_dirt=1; |
inode | 528 | fs/xiafs/namei.c | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
inode | 533 | fs/xiafs/namei.c | iput(inode); |
inode | 538 | fs/xiafs/namei.c | int xiafs_unlink(struct inode * dir, const char * name, int len) |
inode | 541 | fs/xiafs/namei.c | struct inode * inode; |
inode | 547 | fs/xiafs/namei.c | inode = NULL; |
inode | 551 | fs/xiafs/namei.c | if (!(inode = iget(dir->i_sb, de->d_ino))) |
inode | 554 | fs/xiafs/namei.c | if (S_ISDIR(inode->i_mode)) |
inode | 556 | fs/xiafs/namei.c | if (de->d_ino != inode->i_ino) { |
inode | 557 | fs/xiafs/namei.c | iput(inode); |
inode | 564 | fs/xiafs/namei.c | current->fsuid != inode->i_uid && |
inode | 567 | fs/xiafs/namei.c | if (!inode->i_nlink) { |
inode | 569 | fs/xiafs/namei.c | inode->i_nlink=1; |
inode | 573 | fs/xiafs/namei.c | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
inode | 575 | fs/xiafs/namei.c | inode->i_nlink--; |
inode | 576 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 580 | fs/xiafs/namei.c | iput(inode); |
inode | 585 | fs/xiafs/namei.c | int xiafs_symlink(struct inode * dir, const char * name, |
inode | 589 | fs/xiafs/namei.c | struct inode * inode = NULL; |
inode | 600 | fs/xiafs/namei.c | if (!(inode = xiafs_new_inode(dir))) { |
inode | 604 | fs/xiafs/namei.c | inode->i_mode = S_IFLNK | S_IRWXUGO; |
inode | 605 | fs/xiafs/namei.c | inode->i_op = &xiafs_symlink_inode_operations; |
inode | 606 | fs/xiafs/namei.c | name_block = xiafs_bread(inode,0,1); |
inode | 609 | fs/xiafs/namei.c | inode->i_nlink--; |
inode | 610 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 611 | fs/xiafs/namei.c | iput(inode); |
inode | 619 | fs/xiafs/namei.c | inode->i_size = i; |
inode | 620 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 623 | fs/xiafs/namei.c | inode->i_nlink--; |
inode | 624 | fs/xiafs/namei.c | inode->i_dirt = 1; |
inode | 625 | fs/xiafs/namei.c | iput(inode); |
inode | 629 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
inode | 633 | fs/xiafs/namei.c | iput(inode); |
inode | 637 | fs/xiafs/namei.c | int xiafs_link(struct inode * oldinode, struct inode * dir, |
inode | 677 | fs/xiafs/namei.c | static int subdir(struct inode * new_inode, struct inode * old_inode) |
inode | 714 | fs/xiafs/namei.c | static int do_xiafs_rename(struct inode * old_dir, const char * old_name, |
inode | 715 | fs/xiafs/namei.c | int old_len, struct inode * new_dir, |
inode | 718 | fs/xiafs/namei.c | struct inode * old_inode, * new_inode; |
inode | 834 | fs/xiafs/namei.c | int xiafs_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 835 | fs/xiafs/namei.c | struct inode * new_dir, const char * new_name, int new_len) |
inode | 21 | fs/xiafs/symlink.c | xiafs_readlink(struct inode *, char *, int); |
inode | 24 | fs/xiafs/symlink.c | xiafs_follow_link(struct inode *, struct inode *, int, int, struct inode **); |
inode | 47 | fs/xiafs/symlink.c | static int xiafs_readlink(struct inode * inode, char * buffer, int buflen) |
inode | 53 | fs/xiafs/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 54 | fs/xiafs/symlink.c | iput(inode); |
inode | 59 | fs/xiafs/symlink.c | bh = xiafs_bread(inode, 0, 0); |
inode | 60 | fs/xiafs/symlink.c | if (!IS_RDONLY (inode)) { |
inode | 61 | fs/xiafs/symlink.c | inode->i_atime=CURRENT_TIME; |
inode | 62 | fs/xiafs/symlink.c | inode->i_dirt=1; |
inode | 64 | fs/xiafs/symlink.c | iput(inode); |
inode | 75 | fs/xiafs/symlink.c | static int xiafs_follow_link(struct inode * dir, struct inode * inode, |
inode | 76 | fs/xiafs/symlink.c | int flag, int mode, struct inode ** res_inode) |
inode | 86 | fs/xiafs/symlink.c | if (!inode) { |
inode | 90 | fs/xiafs/symlink.c | if (!S_ISLNK(inode->i_mode)) { |
inode | 92 | fs/xiafs/symlink.c | *res_inode = inode; |
inode | 95 | fs/xiafs/symlink.c | if (!IS_RDONLY (inode)) { |
inode | 96 | fs/xiafs/symlink.c | inode->i_atime=CURRENT_TIME; |
inode | 97 | fs/xiafs/symlink.c | inode->i_dirt=1; |
inode | 100 | fs/xiafs/symlink.c | iput(inode); |
inode | 104 | fs/xiafs/symlink.c | if (!(bh = xiafs_bread(inode, 0, 0))) { |
inode | 105 | fs/xiafs/symlink.c | iput(inode); |
inode | 109 | fs/xiafs/symlink.c | iput(inode); |
inode | 35 | fs/xiafs/truncate.c | #define DT_ZONE ((inode->i_size + XIAFS_ZSIZE(inode->i_sb) - 1) \ |
inode | 36 | fs/xiafs/truncate.c | >> XIAFS_ZSIZE_BITS(inode->i_sb) ) |
inode | 38 | fs/xiafs/truncate.c | static int trunc_direct(struct inode * inode) |
inode | 49 | fs/xiafs/truncate.c | lp=i + inode->u.xiafs_i.i_zone; |
inode | 52 | fs/xiafs/truncate.c | bh = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
inode | 61 | fs/xiafs/truncate.c | inode->i_dirt = 1; |
inode | 62 | fs/xiafs/truncate.c | inode->i_blocks-=2 << XIAFS_ZSHIFT(inode->i_sb); |
inode | 63 | fs/xiafs/truncate.c | xiafs_free_zone(inode->i_sb, tmp); |
inode | 70 | fs/xiafs/truncate.c | static int trunc_indirect(struct inode * inode, int addr_off, u_long * lp) |
inode | 82 | fs/xiafs/truncate.c | ind_bh = bread(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
inode | 92 | fs/xiafs/truncate.c | for (i = INDT_ZONE<0?0:INDT_ZONE; i < XIAFS_ADDRS_PER_Z(inode->i_sb); i++) { |
inode | 98 | fs/xiafs/truncate.c | bh = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
inode | 108 | fs/xiafs/truncate.c | inode->i_blocks-= 2 << XIAFS_ZSHIFT(inode->i_sb); |
inode | 109 | fs/xiafs/truncate.c | xiafs_free_zone(inode->i_sb, tmp); |
inode | 114 | fs/xiafs/truncate.c | for (i = 0; i < XIAFS_ADDRS_PER_Z(inode->i_sb) && !(*indp++); i++) ; |
inode | 115 | fs/xiafs/truncate.c | if (i >= XIAFS_ADDRS_PER_Z(inode->i_sb)) { |
inode | 121 | fs/xiafs/truncate.c | inode->i_blocks-= 2 << XIAFS_ZSHIFT(inode->i_sb); |
inode | 122 | fs/xiafs/truncate.c | xiafs_free_zone(inode->i_sb, tmp); |
inode | 129 | fs/xiafs/truncate.c | static int trunc_dindirect(struct inode * inode) |
inode | 133 | fs/xiafs/truncate.c | ((DT_ZONE-XIAFS_ADDRS_PER_Z(inode->i_sb)-8)>>XIAFS_ADDRS_PER_Z_BITS(inode->i_sb)) |
inode | 140 | fs/xiafs/truncate.c | lp = &(inode->u.xiafs_i.i_dind_zone); |
inode | 143 | fs/xiafs/truncate.c | dind_bh = bread(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
inode | 153 | fs/xiafs/truncate.c | for (i=DINDT_ZONE<0?0:DINDT_ZONE ; i < XIAFS_ADDRS_PER_Z(inode->i_sb) ; i ++) { |
inode | 157 | fs/xiafs/truncate.c | retry |= trunc_indirect(inode, |
inode | 158 | fs/xiafs/truncate.c | 8+((1+i)<<XIAFS_ADDRS_PER_Z_BITS(inode->i_sb)), |
inode | 163 | fs/xiafs/truncate.c | for (i = 0; i < XIAFS_ADDRS_PER_Z(inode->i_sb) && !(*dindp++); i++); |
inode | 164 | fs/xiafs/truncate.c | if (i >= XIAFS_ADDRS_PER_Z(inode->i_sb)) { |
inode | 170 | fs/xiafs/truncate.c | inode->i_dirt = 1; |
inode | 171 | fs/xiafs/truncate.c | inode->i_blocks-=2 << XIAFS_ZSHIFT(inode->i_sb); |
inode | 172 | fs/xiafs/truncate.c | xiafs_free_zone(inode->i_sb, tmp); |
inode | 179 | fs/xiafs/truncate.c | void xiafs_truncate(struct inode * inode) |
inode | 183 | fs/xiafs/truncate.c | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
inode | 184 | fs/xiafs/truncate.c | S_ISLNK(inode->i_mode))) |
inode | 187 | fs/xiafs/truncate.c | retry = trunc_direct(inode); |
inode | 188 | fs/xiafs/truncate.c | retry |= trunc_indirect(inode, 8, &(inode->u.xiafs_i.i_ind_zone)); |
inode | 189 | fs/xiafs/truncate.c | retry |= trunc_dindirect(inode); |
inode | 195 | fs/xiafs/truncate.c | inode->i_ctime = inode->i_mtime = CURRENT_TIME; |
inode | 196 | fs/xiafs/truncate.c | inode->i_dirt = 1; |
inode | 21 | include/linux/binfmts.h | struct inode * inode; |
inode | 43 | include/linux/binfmts.h | extern int read_exec(struct inode *inode, unsigned long offset, |
inode | 46 | include/linux/binfmts.h | extern int open_inode(struct inode * inode, int mode); |
inode | 368 | include/linux/ext2_fs.h | __u32 inode; /* Inode number */ |
inode | 404 | include/linux/ext2_fs.h | extern int ext2_permission (struct inode *, int); |
inode | 418 | include/linux/ext2_fs.h | extern int ext2_check_dir_entry (const char *, struct inode *, |
inode | 423 | include/linux/ext2_fs.h | extern int ext2_read (struct inode *, struct file *, char *, int); |
inode | 424 | include/linux/ext2_fs.h | extern int ext2_write (struct inode *, struct file *, char *, int); |
inode | 427 | include/linux/ext2_fs.h | extern int ext2_sync_file (struct inode *, struct file *); |
inode | 430 | include/linux/ext2_fs.h | extern struct inode * ext2_new_inode (const struct inode *, int); |
inode | 431 | include/linux/ext2_fs.h | extern void ext2_free_inode (struct inode *); |
inode | 436 | include/linux/ext2_fs.h | extern int ext2_bmap (struct inode *, int); |
inode | 438 | include/linux/ext2_fs.h | extern struct buffer_head * ext2_getblk (struct inode *, long, int, int *); |
inode | 439 | include/linux/ext2_fs.h | extern struct buffer_head * ext2_bread (struct inode *, int, int, int *); |
inode | 441 | include/linux/ext2_fs.h | extern int ext2_getcluster (struct inode * inode, long block); |
inode | 442 | include/linux/ext2_fs.h | extern void ext2_read_inode (struct inode *); |
inode | 443 | include/linux/ext2_fs.h | extern void ext2_write_inode (struct inode *); |
inode | 444 | include/linux/ext2_fs.h | extern void ext2_put_inode (struct inode *); |
inode | 445 | include/linux/ext2_fs.h | extern int ext2_sync_inode (struct inode *); |
inode | 446 | include/linux/ext2_fs.h | extern void ext2_discard_prealloc (struct inode *); |
inode | 449 | include/linux/ext2_fs.h | extern int ext2_ioctl (struct inode *, struct file *, unsigned int, |
inode | 453 | include/linux/ext2_fs.h | extern void ext2_release (struct inode *, struct file *); |
inode | 454 | include/linux/ext2_fs.h | extern int ext2_lookup (struct inode *,const char *, int, struct inode **); |
inode | 455 | include/linux/ext2_fs.h | extern int ext2_create (struct inode *,const char *, int, int, |
inode | 456 | include/linux/ext2_fs.h | struct inode **); |
inode | 457 | include/linux/ext2_fs.h | extern int ext2_mkdir (struct inode *, const char *, int, int); |
inode | 458 | include/linux/ext2_fs.h | extern int ext2_rmdir (struct inode *, const char *, int); |
inode | 459 | include/linux/ext2_fs.h | extern int ext2_unlink (struct inode *, const char *, int); |
inode | 460 | include/linux/ext2_fs.h | extern int ext2_symlink (struct inode *, const char *, int, const char *); |
inode | 461 | include/linux/ext2_fs.h | extern int ext2_link (struct inode *, struct inode *, const char *, int); |
inode | 462 | include/linux/ext2_fs.h | extern int ext2_mknod (struct inode *, const char *, int, int, int); |
inode | 463 | include/linux/ext2_fs.h | extern int ext2_rename (struct inode *, const char *, int, |
inode | 464 | include/linux/ext2_fs.h | struct inode *, const char *, int); |
inode | 481 | include/linux/ext2_fs.h | extern void ext2_truncate (struct inode *); |
inode | 56 | include/linux/ext_fs.h | unsigned long inode; |
inode | 63 | include/linux/ext_fs.h | extern int ext_open(struct inode * inode, struct file * filp); |
inode | 64 | include/linux/ext_fs.h | extern void ext_release(struct inode * inode, struct file * filp); |
inode | 65 | include/linux/ext_fs.h | extern int ext_lookup(struct inode * dir,const char * name, int len, |
inode | 66 | include/linux/ext_fs.h | struct inode ** result); |
inode | 67 | include/linux/ext_fs.h | extern int ext_create(struct inode * dir,const char * name, int len, int mode, |
inode | 68 | include/linux/ext_fs.h | struct inode ** result); |
inode | 69 | include/linux/ext_fs.h | extern int ext_mkdir(struct inode * dir, const char * name, int len, int mode); |
inode | 70 | include/linux/ext_fs.h | extern int ext_rmdir(struct inode * dir, const char * name, int len); |
inode | 71 | include/linux/ext_fs.h | extern int ext_unlink(struct inode * dir, const char * name, int len); |
inode | 72 | include/linux/ext_fs.h | extern int ext_symlink(struct inode * inode, const char * name, int len, |
inode | 74 | include/linux/ext_fs.h | extern int ext_link(struct inode * oldinode, struct inode * dir, const char * name, int len); |
inode | 75 | include/linux/ext_fs.h | extern int ext_mknod(struct inode * dir, const char * name, int len, int mode, int rdev); |
inode | 76 | include/linux/ext_fs.h | extern int ext_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 77 | include/linux/ext_fs.h | struct inode * new_dir, const char * new_name, int new_len); |
inode | 78 | include/linux/ext_fs.h | extern struct inode * ext_new_inode(const struct inode * dir); |
inode | 79 | include/linux/ext_fs.h | extern void ext_free_inode(struct inode * inode); |
inode | 85 | include/linux/ext_fs.h | extern int ext_bmap(struct inode *,int); |
inode | 87 | include/linux/ext_fs.h | extern struct buffer_head * ext_getblk(struct inode *, int, int); |
inode | 88 | include/linux/ext_fs.h | extern struct buffer_head * ext_bread(struct inode *, int, int); |
inode | 90 | include/linux/ext_fs.h | extern void ext_truncate(struct inode *); |
inode | 94 | include/linux/ext_fs.h | extern void ext_read_inode(struct inode *); |
inode | 95 | include/linux/ext_fs.h | extern void ext_write_inode(struct inode *); |
inode | 96 | include/linux/ext_fs.h | extern void ext_put_inode(struct inode *); |
inode | 98 | include/linux/ext_fs.h | extern int ext_sync_inode(struct inode *); |
inode | 99 | include/linux/ext_fs.h | extern int ext_sync_file(struct inode *, struct file *); |
inode | 101 | include/linux/ext_fs.h | extern int ext_lseek(struct inode *, struct file *, off_t, int); |
inode | 102 | include/linux/ext_fs.h | extern int ext_read(struct inode *, struct file *, char *, int); |
inode | 103 | include/linux/ext_fs.h | extern int ext_write(struct inode *, struct file *, char *, int); |
inode | 85 | include/linux/fs.h | #define IS_RDONLY(inode) (((inode)->i_sb) && ((inode)->i_sb->s_flags & MS_RDONLY)) |
inode | 86 | include/linux/fs.h | #define IS_NOSUID(inode) ((inode)->i_flags & MS_NOSUID) |
inode | 87 | include/linux/fs.h | #define IS_NODEV(inode) ((inode)->i_flags & MS_NODEV) |
inode | 88 | include/linux/fs.h | #define IS_NOEXEC(inode) ((inode)->i_flags & MS_NOEXEC) |
inode | 89 | include/linux/fs.h | #define IS_SYNC(inode) ((inode)->i_flags & MS_SYNCHRONOUS) |
inode | 91 | include/linux/fs.h | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) |
inode | 92 | include/linux/fs.h | #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) |
inode | 219 | include/linux/fs.h | struct inode * i_next, * i_prev; |
inode | 220 | include/linux/fs.h | struct inode * i_hash_next, * i_hash_prev; |
inode | 221 | include/linux/fs.h | struct inode * i_bound_to, * i_bound_by; |
inode | 222 | include/linux/fs.h | struct inode * i_mount; |
inode | 257 | include/linux/fs.h | struct inode * f_inode; |
inode | 285 | include/linux/fs.h | extern int fasync_helper(struct inode *, struct file *, int, struct fasync_struct **); |
inode | 309 | include/linux/fs.h | struct inode * s_covered; |
inode | 310 | include/linux/fs.h | struct inode * s_mounted; |
inode | 335 | include/linux/fs.h | int (*lseek) (struct inode *, struct file *, off_t, int); |
inode | 336 | include/linux/fs.h | int (*read) (struct inode *, struct file *, char *, int); |
inode | 337 | include/linux/fs.h | int (*write) (struct inode *, struct file *, const char *, int); |
inode | 338 | include/linux/fs.h | int (*readdir) (struct inode *, struct file *, void *, filldir_t); |
inode | 339 | include/linux/fs.h | int (*select) (struct inode *, struct file *, int, select_table *); |
inode | 340 | include/linux/fs.h | int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); |
inode | 341 | include/linux/fs.h | int (*mmap) (struct inode *, struct file *, struct vm_area_struct *); |
inode | 342 | include/linux/fs.h | int (*open) (struct inode *, struct file *); |
inode | 343 | include/linux/fs.h | void (*release) (struct inode *, struct file *); |
inode | 344 | include/linux/fs.h | int (*fsync) (struct inode *, struct file *); |
inode | 345 | include/linux/fs.h | int (*fasync) (struct inode *, struct file *, int); |
inode | 352 | include/linux/fs.h | int (*create) (struct inode *,const char *,int,int,struct inode **); |
inode | 353 | include/linux/fs.h | int (*lookup) (struct inode *,const char *,int,struct inode **); |
inode | 354 | include/linux/fs.h | int (*link) (struct inode *,struct inode *,const char *,int); |
inode | 355 | include/linux/fs.h | int (*unlink) (struct inode *,const char *,int); |
inode | 356 | include/linux/fs.h | int (*symlink) (struct inode *,const char *,int,const char *); |
inode | 357 | include/linux/fs.h | int (*mkdir) (struct inode *,const char *,int,int); |
inode | 358 | include/linux/fs.h | int (*rmdir) (struct inode *,const char *,int); |
inode | 359 | include/linux/fs.h | int (*mknod) (struct inode *,const char *,int,int,int); |
inode | 360 | include/linux/fs.h | int (*rename) (struct inode *,const char *,int,struct inode *,const char *,int); |
inode | 361 | include/linux/fs.h | int (*readlink) (struct inode *,char *,int); |
inode | 362 | include/linux/fs.h | int (*follow_link) (struct inode *,struct inode *,int,int,struct inode **); |
inode | 363 | include/linux/fs.h | int (*bmap) (struct inode *,int); |
inode | 364 | include/linux/fs.h | void (*truncate) (struct inode *); |
inode | 365 | include/linux/fs.h | int (*permission) (struct inode *, int); |
inode | 366 | include/linux/fs.h | int (*smap) (struct inode *,int); |
inode | 370 | include/linux/fs.h | void (*read_inode) (struct inode *); |
inode | 371 | include/linux/fs.h | int (*notify_change) (struct inode *, struct iattr *); |
inode | 372 | include/linux/fs.h | void (*write_inode) (struct inode *); |
inode | 373 | include/linux/fs.h | void (*put_inode) (struct inode *); |
inode | 400 | include/linux/fs.h | extern int blkdev_open(struct inode * inode, struct file * filp); |
inode | 406 | include/linux/fs.h | extern int chrdev_open(struct inode * inode, struct file * filp); |
inode | 410 | include/linux/fs.h | extern void init_fifo(struct inode * inode); |
inode | 423 | include/linux/fs.h | extern int fs_may_umount(kdev_t dev, struct inode * mount_root); |
inode | 474 | include/linux/fs.h | extern int bmap(struct inode * inode,int block); |
inode | 475 | include/linux/fs.h | extern int notify_change(struct inode *, struct iattr *); |
inode | 476 | include/linux/fs.h | extern int namei(const char * pathname, struct inode ** res_inode); |
inode | 477 | include/linux/fs.h | extern int lnamei(const char * pathname, struct inode ** res_inode); |
inode | 478 | include/linux/fs.h | extern int permission(struct inode * inode,int mask); |
inode | 479 | include/linux/fs.h | extern int get_write_access(struct inode * inode); |
inode | 480 | include/linux/fs.h | extern void put_write_access(struct inode * inode); |
inode | 482 | include/linux/fs.h | struct inode ** res_inode, struct inode * base); |
inode | 485 | include/linux/fs.h | extern void iput(struct inode * inode); |
inode | 486 | include/linux/fs.h | extern struct inode * __iget(struct super_block * sb,int nr,int crsmnt); |
inode | 487 | include/linux/fs.h | extern struct inode * get_empty_inode(void); |
inode | 488 | include/linux/fs.h | extern void insert_inode_hash(struct inode *); |
inode | 489 | include/linux/fs.h | extern void clear_inode(struct inode *); |
inode | 490 | include/linux/fs.h | extern struct inode * get_pipe_inode(void); |
inode | 524 | include/linux/fs.h | extern int char_read(struct inode *, struct file *, char *, int); |
inode | 525 | include/linux/fs.h | extern int block_read(struct inode *, struct file *, char *, int); |
inode | 528 | include/linux/fs.h | extern int char_write(struct inode *, struct file *, const char *, int); |
inode | 529 | include/linux/fs.h | extern int block_write(struct inode *, struct file *, const char *, int); |
inode | 531 | include/linux/fs.h | extern int generic_mmap(struct inode *, struct file *, struct vm_area_struct *); |
inode | 533 | include/linux/fs.h | extern int block_fsync(struct inode *, struct file *); |
inode | 534 | include/linux/fs.h | extern int file_fsync(struct inode *, struct file *); |
inode | 536 | include/linux/fs.h | extern void dcache_add(struct inode *, const char *, int, unsigned long); |
inode | 537 | include/linux/fs.h | extern int dcache_lookup(struct inode *, const char *, int, unsigned long *); |
inode | 539 | include/linux/fs.h | extern int inode_change_ok(struct inode *, struct iattr *); |
inode | 540 | include/linux/fs.h | extern void inode_setattr(struct inode *, struct iattr *); |
inode | 542 | include/linux/fs.h | extern inline struct inode * iget(struct super_block * sb,int nr) |
inode | 158 | include/linux/iso_fs.h | extern int parse_rock_ridge_inode(struct iso_directory_record *, struct inode *); |
inode | 159 | include/linux/iso_fs.h | extern int get_rock_ridge_filename(struct iso_directory_record *, char ** name, int * len, struct inode *); |
inode | 161 | include/linux/iso_fs.h | extern char * get_rock_ridge_symlink(struct inode *); |
inode | 162 | include/linux/iso_fs.h | extern int find_rock_ridge_relocation(struct iso_directory_record *, struct inode *); |
inode | 167 | include/linux/iso_fs.h | extern int isofs_open(struct inode * inode, struct file * filp); |
inode | 168 | include/linux/iso_fs.h | extern void isofs_release(struct inode * inode, struct file * filp); |
inode | 169 | include/linux/iso_fs.h | extern int isofs_lookup(struct inode * dir,const char * name, int len, |
inode | 170 | include/linux/iso_fs.h | struct inode ** result); |
inode | 174 | include/linux/iso_fs.h | extern int isofs_bmap(struct inode *,int); |
inode | 178 | include/linux/iso_fs.h | extern void isofs_read_inode(struct inode *); |
inode | 179 | include/linux/iso_fs.h | extern void isofs_put_inode(struct inode *); |
inode | 182 | include/linux/iso_fs.h | extern int isofs_lseek(struct inode *, struct file *, off_t, int); |
inode | 183 | include/linux/iso_fs.h | extern int isofs_read(struct inode *, struct file *, char *, int); |
inode | 184 | include/linux/iso_fs.h | extern int isofs_lookup_grandparent(struct inode *, int); |
inode | 78 | include/linux/minix_fs.h | __u16 inode; |
inode | 84 | include/linux/minix_fs.h | extern int minix_lookup(struct inode * dir,const char * name, int len, |
inode | 85 | include/linux/minix_fs.h | struct inode ** result); |
inode | 86 | include/linux/minix_fs.h | extern int minix_create(struct inode * dir,const char * name, int len, int mode, |
inode | 87 | include/linux/minix_fs.h | struct inode ** result); |
inode | 88 | include/linux/minix_fs.h | extern int minix_mkdir(struct inode * dir, const char * name, int len, int mode); |
inode | 89 | include/linux/minix_fs.h | extern int minix_rmdir(struct inode * dir, const char * name, int len); |
inode | 90 | include/linux/minix_fs.h | extern int minix_unlink(struct inode * dir, const char * name, int len); |
inode | 91 | include/linux/minix_fs.h | extern int minix_symlink(struct inode * inode, const char * name, int len, |
inode | 93 | include/linux/minix_fs.h | extern int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len); |
inode | 94 | include/linux/minix_fs.h | extern int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev); |
inode | 95 | include/linux/minix_fs.h | extern int minix_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 96 | include/linux/minix_fs.h | struct inode * new_dir, const char * new_name, int new_len); |
inode | 97 | include/linux/minix_fs.h | extern struct inode * minix_new_inode(const struct inode * dir); |
inode | 98 | include/linux/minix_fs.h | extern void minix_free_inode(struct inode * inode); |
inode | 104 | include/linux/minix_fs.h | extern int minix_bmap(struct inode *,int); |
inode | 106 | include/linux/minix_fs.h | extern struct buffer_head * minix_getblk(struct inode *, int, int); |
inode | 107 | include/linux/minix_fs.h | extern struct buffer_head * minix_bread(struct inode *, int, int); |
inode | 109 | include/linux/minix_fs.h | extern void minix_truncate(struct inode *); |
inode | 114 | include/linux/minix_fs.h | extern void minix_read_inode(struct inode *); |
inode | 115 | include/linux/minix_fs.h | extern void minix_write_inode(struct inode *); |
inode | 116 | include/linux/minix_fs.h | extern void minix_put_inode(struct inode *); |
inode | 118 | include/linux/minix_fs.h | extern int minix_sync_inode(struct inode *); |
inode | 119 | include/linux/minix_fs.h | extern int minix_sync_file(struct inode *, struct file *); |
inode | 55 | include/linux/mm.h | struct inode * vm_inode; |
inode | 174 | include/linux/mm.h | extern void vmtruncate(struct inode * inode, unsigned long offset); |
inode | 126 | include/linux/msdos_fs.h | extern int msdos_add_cluster(struct inode *inode); |
inode | 129 | include/linux/msdos_fs.h | extern int msdos_get_entry(struct inode *dir,loff_t *pos,struct buffer_head **bh, |
inode | 131 | include/linux/msdos_fs.h | extern int msdos_scan(struct inode *dir,const char *name,struct buffer_head **res_bh, |
inode | 133 | include/linux/msdos_fs.h | extern int msdos_parent_ino(struct inode *dir,int locked); |
inode | 134 | include/linux/msdos_fs.h | extern int msdos_subdirs(struct inode *dir); |
inode | 139 | include/linux/msdos_fs.h | extern int msdos_smap(struct inode *inode,int sector); |
inode | 140 | include/linux/msdos_fs.h | extern int fat_free(struct inode *inode,int skip); |
inode | 142 | include/linux/msdos_fs.h | void cache_lookup(struct inode *inode,int cluster,int *f_clu,int *d_clu); |
inode | 143 | include/linux/msdos_fs.h | void cache_add(struct inode *inode,int f_clu,int d_clu); |
inode | 144 | include/linux/msdos_fs.h | void cache_inval_inode(struct inode *inode); |
inode | 146 | include/linux/msdos_fs.h | int get_cluster(struct inode *inode,int cluster); |
inode | 150 | include/linux/msdos_fs.h | extern int msdos_lookup(struct inode *dir,const char *name,int len, |
inode | 151 | include/linux/msdos_fs.h | struct inode **result); |
inode | 152 | include/linux/msdos_fs.h | extern int msdos_create(struct inode *dir,const char *name,int len,int mode, |
inode | 153 | include/linux/msdos_fs.h | struct inode **result); |
inode | 154 | include/linux/msdos_fs.h | extern int msdos_mkdir(struct inode *dir,const char *name,int len,int mode); |
inode | 155 | include/linux/msdos_fs.h | extern int msdos_rmdir(struct inode *dir,const char *name,int len); |
inode | 156 | include/linux/msdos_fs.h | extern int msdos_unlink(struct inode *dir,const char *name,int len); |
inode | 157 | include/linux/msdos_fs.h | extern int msdos_unlink_umsdos(struct inode *dir,const char *name,int len); |
inode | 158 | include/linux/msdos_fs.h | extern int msdos_rename(struct inode *old_dir,const char *old_name,int old_len, |
inode | 159 | include/linux/msdos_fs.h | struct inode *new_dir,const char *new_name,int new_len); |
inode | 163 | include/linux/msdos_fs.h | extern void msdos_put_inode(struct inode *inode); |
inode | 168 | include/linux/msdos_fs.h | extern int msdos_bmap(struct inode *inode,int block); |
inode | 169 | include/linux/msdos_fs.h | extern void msdos_read_inode(struct inode *inode); |
inode | 170 | include/linux/msdos_fs.h | extern void msdos_write_inode(struct inode *inode); |
inode | 171 | include/linux/msdos_fs.h | extern int msdos_notify_change(struct inode *,struct iattr *); |
inode | 176 | include/linux/msdos_fs.h | extern int msdos_readdir (struct inode *inode, struct file *filp, |
inode | 182 | include/linux/msdos_fs.h | extern int msdos_file_read(struct inode *, struct file *, char *, int); |
inode | 183 | include/linux/msdos_fs.h | extern int msdos_file_write(struct inode *, struct file *, const char *, int); |
inode | 186 | include/linux/msdos_fs.h | extern void msdos_truncate(struct inode *inode); |
inode | 189 | include/linux/msdos_fs.h | extern int msdos_mmap(struct inode *, struct file *, struct vm_area_struct *); |
inode | 32 | include/linux/msdos_fs_i.h | struct inode *i_depend; /* pointer to inode that depends on the |
inode | 34 | include/linux/msdos_fs_i.h | struct inode *i_old; /* pointer to the old inode this inode |
inode | 84 | include/linux/net.h | struct inode *inode; |
inode | 88 | include/linux/net.h | #define SOCK_INODE(S) ((S)->inode) |
inode | 45 | include/linux/nfs_fs.h | #define NFS_SERVER(inode) (&(inode)->i_sb->u.nfs_sb.s_server) |
inode | 46 | include/linux/nfs_fs.h | #define NFS_FH(inode) (&(inode)->u.nfs_i.fhandle) |
inode | 101 | include/linux/nfs_fs.h | extern struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle, |
inode | 103 | include/linux/nfs_fs.h | extern void nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr); |
inode | 120 | include/linux/nfs_fs.h | extern int nfs_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma); |
inode | 16 | include/linux/pipe_fs_i.h | #define PIPE_WAIT(inode) ((inode).u.pipe_i.wait) |
inode | 17 | include/linux/pipe_fs_i.h | #define PIPE_BASE(inode) ((inode).u.pipe_i.base) |
inode | 18 | include/linux/pipe_fs_i.h | #define PIPE_START(inode) ((inode).u.pipe_i.start) |
inode | 19 | include/linux/pipe_fs_i.h | #define PIPE_LEN(inode) ((inode).u.pipe_i.len) |
inode | 20 | include/linux/pipe_fs_i.h | #define PIPE_RD_OPENERS(inode) ((inode).u.pipe_i.rd_openers) |
inode | 21 | include/linux/pipe_fs_i.h | #define PIPE_WR_OPENERS(inode) ((inode).u.pipe_i.wr_openers) |
inode | 22 | include/linux/pipe_fs_i.h | #define PIPE_READERS(inode) ((inode).u.pipe_i.readers) |
inode | 23 | include/linux/pipe_fs_i.h | #define PIPE_WRITERS(inode) ((inode).u.pipe_i.writers) |
inode | 24 | include/linux/pipe_fs_i.h | #define PIPE_LOCK(inode) ((inode).u.pipe_i.lock) |
inode | 25 | include/linux/pipe_fs_i.h | #define PIPE_SIZE(inode) PIPE_LEN(inode) |
inode | 27 | include/linux/pipe_fs_i.h | #define PIPE_EMPTY(inode) (PIPE_SIZE(inode)==0) |
inode | 28 | include/linux/pipe_fs_i.h | #define PIPE_FULL(inode) (PIPE_SIZE(inode)==PIPE_BUF) |
inode | 29 | include/linux/pipe_fs_i.h | #define PIPE_FREE(inode) (PIPE_BUF - PIPE_LEN(inode)) |
inode | 30 | include/linux/pipe_fs_i.h | #define PIPE_END(inode) ((PIPE_START(inode)+PIPE_LEN(inode))&\ |
inode | 32 | include/linux/pipe_fs_i.h | #define PIPE_MAX_RCHUNK(inode) (PIPE_BUF - PIPE_START(inode)) |
inode | 33 | include/linux/pipe_fs_i.h | #define PIPE_MAX_WCHUNK(inode) (PIPE_BUF - PIPE_END(inode)) |
inode | 148 | include/linux/proc_fs.h | void (*fill_inode)(struct inode *); |
inode | 210 | include/linux/proc_fs.h | extern struct inode * proc_get_inode(struct super_block *, int, struct proc_dir_entry *); |
inode | 212 | include/linux/proc_fs.h | extern void proc_read_inode(struct inode *); |
inode | 213 | include/linux/proc_fs.h | extern void proc_write_inode(struct inode *); |
inode | 223 | include/linux/proc_fs.h | extern int proc_readdir(struct inode *, struct file *, void *, filldir_t); |
inode | 224 | include/linux/proc_fs.h | extern int proc_lookup(struct inode *, const char *, int, struct inode **); |
inode | 124 | include/linux/sched.h | struct inode * root, * pwd; |
inode | 43 | include/linux/smb_fs.h | #define SMB_INOP(inode) ((struct smb_inode_info *)(inode->u.generic_ip)) |
inode | 45 | include/linux/smb_fs.h | #define SMB_SERVER(inode) (&(SMB_SBP(inode->i_sb)->s_server)) |
inode | 46 | include/linux/smb_fs.h | #define SMB_SERVATTR(inode) (&(SMB_SBP(inode->i_sb)->s_attr)) |
inode | 48 | include/linux/smb_fs.h | #define SMB_FINFO(inode) (&(SMB_INOP(inode)->finfo)) |
inode | 101 | include/linux/smb_fs.h | int smb_make_open(struct inode *i, int right); |
inode | 115 | include/linux/smb_fs.h | int smb_ioctl (struct inode * inode, struct file * filp, |
inode | 121 | include/linux/smb_fs.h | int smb_notify_change(struct inode *inode, struct iattr *attr); |
inode | 149 | include/linux/smb_fs.h | int smb_proc_readdir(struct smb_server *server, struct inode *dir, |
inode | 155 | include/linux/smb_fs.h | struct inode *ino, |
inode | 180 | include/linux/smb_fs.h | int smb_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma); |
inode | 312 | include/linux/sysv_fs.h | sysv_ino_t inode; |
inode | 364 | include/linux/sysv_fs.h | extern int sysv_lookup(struct inode * dir,const char * name, int len, |
inode | 365 | include/linux/sysv_fs.h | struct inode ** result); |
inode | 366 | include/linux/sysv_fs.h | extern int sysv_create(struct inode * dir,const char * name, int len, int mode, |
inode | 367 | include/linux/sysv_fs.h | struct inode ** result); |
inode | 368 | include/linux/sysv_fs.h | extern int sysv_mkdir(struct inode * dir, const char * name, int len, int mode); |
inode | 369 | include/linux/sysv_fs.h | extern int sysv_rmdir(struct inode * dir, const char * name, int len); |
inode | 370 | include/linux/sysv_fs.h | extern int sysv_unlink(struct inode * dir, const char * name, int len); |
inode | 371 | include/linux/sysv_fs.h | extern int sysv_symlink(struct inode * inode, const char * name, int len, |
inode | 373 | include/linux/sysv_fs.h | extern int sysv_link(struct inode * oldinode, struct inode * dir, const char * name, int len); |
inode | 374 | include/linux/sysv_fs.h | extern int sysv_mknod(struct inode * dir, const char * name, int len, int mode, int rdev); |
inode | 375 | include/linux/sysv_fs.h | extern int sysv_rename(struct inode * old_dir, const char * old_name, int old_len, |
inode | 376 | include/linux/sysv_fs.h | struct inode * new_dir, const char * new_name, int new_len); |
inode | 377 | include/linux/sysv_fs.h | extern struct inode * sysv_new_inode(const struct inode * dir); |
inode | 378 | include/linux/sysv_fs.h | extern void sysv_free_inode(struct inode * inode); |
inode | 384 | include/linux/sysv_fs.h | extern int sysv_bmap(struct inode *,int); |
inode | 386 | include/linux/sysv_fs.h | extern struct buffer_head * sysv_getblk(struct inode *, unsigned int, int); |
inode | 387 | include/linux/sysv_fs.h | extern struct buffer_head * sysv_file_bread(struct inode *, int, int); |
inode | 388 | include/linux/sysv_fs.h | extern int sysv_file_read(struct inode *, struct file *, char *, int); |
inode | 390 | include/linux/sysv_fs.h | extern void sysv_truncate(struct inode *); |
inode | 394 | include/linux/sysv_fs.h | extern void sysv_read_inode(struct inode *); |
inode | 395 | include/linux/sysv_fs.h | extern int sysv_notify_change(struct inode *, struct iattr *); |
inode | 396 | include/linux/sysv_fs.h | extern void sysv_write_inode(struct inode *); |
inode | 397 | include/linux/sysv_fs.h | extern void sysv_put_inode(struct inode *); |
inode | 399 | include/linux/sysv_fs.h | extern int sysv_sync_inode(struct inode *); |
inode | 400 | include/linux/sysv_fs.h | extern int sysv_sync_file(struct inode *, struct file *); |
inode | 401 | include/linux/sysv_fs.h | extern int sysv_mmap(struct inode *, struct file *, struct vm_area_struct *); |
inode | 29 | include/linux/tty_ldisc.h | int (*select)(struct tty_struct * tty, struct inode * inode, |
inode | 112 | include/linux/xd.h | static int xd_open (struct inode *inode,struct file *file); |
inode | 114 | include/linux/xd.h | static int xd_ioctl (struct inode *inode,struct file *file,unsigned int cmd,unsigned long arg); |
inode | 115 | include/linux/xd.h | static void xd_release (struct inode *inode,struct file *file); |
inode | 67 | include/linux/xia_fs.h | extern int xiafs_lookup(struct inode * dir,const char * name, int len, |
inode | 68 | include/linux/xia_fs.h | struct inode ** result); |
inode | 69 | include/linux/xia_fs.h | extern int xiafs_create(struct inode * dir,const char * name, int len, int mode, |
inode | 70 | include/linux/xia_fs.h | struct inode ** result); |
inode | 71 | include/linux/xia_fs.h | extern int xiafs_mkdir(struct inode * dir, const char * name, int len, int mode); |
inode | 72 | include/linux/xia_fs.h | extern int xiafs_rmdir(struct inode * dir, const char * name, int len); |
inode | 73 | include/linux/xia_fs.h | extern int xiafs_unlink(struct inode * dir, const char * name, int len); |
inode | 74 | include/linux/xia_fs.h | extern int xiafs_symlink(struct inode * inode, const char * name, int len, |
inode | 76 | include/linux/xia_fs.h | extern int xiafs_link(struct inode * oldinode, struct inode * dir, |
inode | 78 | include/linux/xia_fs.h | extern int xiafs_mknod(struct inode * dir, const char * name, int len, |
inode | 80 | include/linux/xia_fs.h | extern int xiafs_rename(struct inode * old_dir, const char * old_name, |
inode | 81 | include/linux/xia_fs.h | int old_len, struct inode * new_dir, |
inode | 83 | include/linux/xia_fs.h | extern struct inode * xiafs_new_inode(struct inode * dir); |
inode | 84 | include/linux/xia_fs.h | extern void xiafs_free_inode(struct inode * inode); |
inode | 90 | include/linux/xia_fs.h | extern int xiafs_bmap(struct inode *,int); |
inode | 92 | include/linux/xia_fs.h | extern struct buffer_head * xiafs_getblk(struct inode *, int, int); |
inode | 93 | include/linux/xia_fs.h | extern struct buffer_head * xiafs_bread(struct inode *, int, int); |
inode | 95 | include/linux/xia_fs.h | extern void xiafs_truncate(struct inode *); |
inode | 98 | include/linux/xia_fs.h | extern void xiafs_read_inode(struct inode *); |
inode | 99 | include/linux/xia_fs.h | extern void xiafs_write_inode(struct inode *); |
inode | 100 | include/linux/xia_fs.h | extern void xiafs_put_inode(struct inode *); |
inode | 102 | include/linux/xia_fs.h | extern int xiafs_sync_inode(struct inode *); |
inode | 103 | include/linux/xia_fs.h | extern int xiafs_sync_file(struct inode *, struct file *); |
inode | 71 | include/net/sock.h | struct inode * inode; |
inode | 648 | init/main.c | extern struct inode *pseudo_root; |
inode | 118 | kernel/ksyms.c | int inode, int func) = 0; /* Dirty hack */ |
inode | 39 | mm/filemap.c | static inline void multi_bmap(struct inode * inode, unsigned long block, unsigned int * nr, int shift) |
inode | 44 | mm/filemap.c | *nr = bmap(inode, block); |
inode | 59 | mm/filemap.c | struct inode * inode = area->vm_inode; |
inode | 63 | mm/filemap.c | if (address >= inode->i_size && (area->vm_flags & VM_SHARED) && area->vm_mm == current->mm) |
inode | 65 | mm/filemap.c | multi_bmap(inode, address, nr, inode->i_sb->s_blocksize_bits); |
inode | 66 | mm/filemap.c | return bread_page(page, inode->i_dev, nr, inode->i_sb->s_blocksize, no_share); |
inode | 81 | mm/filemap.c | struct inode * inode; |
inode | 95 | mm/filemap.c | inode = vma->vm_inode; |
inode | 96 | mm/filemap.c | file.f_op = inode->i_op->default_file_ops; |
inode | 101 | mm/filemap.c | if (S_ISREG(inode->i_mode)) { |
inode | 102 | mm/filemap.c | if (size > inode->i_size) |
inode | 103 | mm/filemap.c | size = inode->i_size; |
inode | 112 | mm/filemap.c | file.f_inode = inode; |
inode | 117 | mm/filemap.c | result = file.f_op->write(inode, &file, (const char *) page, size); |
inode | 327 | mm/filemap.c | int generic_mmap(struct inode * inode, struct file * file, struct vm_area_struct * vma) |
inode | 339 | mm/filemap.c | if (vma->vm_offset & (inode->i_sb->s_blocksize - 1)) |
inode | 342 | mm/filemap.c | if (!inode->i_sb || !S_ISREG(inode->i_mode)) |
inode | 344 | mm/filemap.c | if (!inode->i_op || !inode->i_op->bmap) |
inode | 346 | mm/filemap.c | if (!IS_RDONLY(inode)) { |
inode | 347 | mm/filemap.c | inode->i_atime = CURRENT_TIME; |
inode | 348 | mm/filemap.c | inode->i_dirt = 1; |
inode | 350 | mm/filemap.c | vma->vm_inode = inode; |
inode | 351 | mm/filemap.c | inode->i_count++; |
inode | 859 | mm/memory.c | struct inode * inode; |
inode | 865 | mm/memory.c | if (!area || !(inode = area->vm_inode) || inode->i_count < 2) |
inode | 879 | mm/memory.c | if (mpnt->vm_inode != inode) { |
inode | 969 | mm/memory.c | void vmtruncate(struct inode * inode, unsigned long offset) |
inode | 974 | mm/memory.c | if (!inode->i_mmap) |
inode | 977 | mm/memory.c | mpnt = inode->i_mmap; |
inode | 1006 | mm/memory.c | } while ((mpnt = mpnt->vm_next_share) != inode->i_mmap); |
inode | 24 | mm/mmap.c | static inline int anon_map(struct inode *ino, struct file * file, struct vm_area_struct * vma) |
inode | 800 | mm/mmap.c | struct inode * inode; |
inode | 828 | mm/mmap.c | inode = vmp->vm_inode; |
inode | 829 | mm/mmap.c | if (!inode) |
inode | 833 | mm/mmap.c | if ((share = inode->i_mmap)) { |
inode | 839 | mm/mmap.c | inode->i_mmap = vmp->vm_next_share = vmp->vm_prev_share = vmp; |
inode | 847 | mm/mmap.c | struct inode * inode = mpnt->vm_inode; |
inode | 849 | mm/mmap.c | if (!inode) |
inode | 853 | mm/mmap.c | if (inode->i_mmap != mpnt) |
inode | 855 | mm/mmap.c | inode->i_mmap = NULL; |
inode | 859 | mm/mmap.c | if (inode->i_mmap == mpnt) |
inode | 860 | mm/mmap.c | inode->i_mmap = mpnt->vm_next_share; |
inode | 65 | mm/swap.c | struct inode * swap_file; |
inode | 211 | mm/swap.c | struct inode *swapf = p->swap_file; |
inode | 1053 | mm/swap.c | struct inode * inode; |
inode | 1059 | mm/swap.c | i = namei(specialfile,&inode); |
inode | 1067 | mm/swap.c | if (p->swap_file == inode) |
inode | 1070 | mm/swap.c | if (S_ISBLK(inode->i_mode) |
inode | 1071 | mm/swap.c | && (p->swap_device == inode->i_rdev)) |
inode | 1078 | mm/swap.c | iput(inode); |
inode | 1093 | mm/swap.c | iput(inode); |
inode | 1100 | mm/swap.c | filp.f_inode = inode; |
inode | 1103 | mm/swap.c | if( !blkdev_open(inode, &filp) && |
inode | 1105 | mm/swap.c | filp.f_op->release(inode,&filp); |
inode | 1106 | mm/swap.c | filp.f_op->release(inode,&filp); |
inode | 1109 | mm/swap.c | iput(inode); |
inode | 1131 | mm/swap.c | struct inode * swap_inode; |
inode | 70 | net/netlink.c | static int netlink_write(struct inode * inode, struct file * file, const char * buf, int count) |
inode | 72 | net/netlink.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 83 | net/netlink.c | static int netlink_read(struct inode * inode, struct file * file, char * buf, int count) |
inode | 85 | net/netlink.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 111 | net/netlink.c | static int netlink_lseek(struct inode * inode, struct file * file, |
inode | 117 | net/netlink.c | static int netlink_open(struct inode * inode, struct file * file) |
inode | 119 | net/netlink.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 134 | net/netlink.c | static void netlink_release(struct inode * inode, struct file * file) |
inode | 136 | net/netlink.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 142 | net/netlink.c | static int netlink_ioctl(struct inode *inode, struct file *file, |
inode | 145 | net/netlink.c | unsigned int minor = MINOR(inode->i_rdev); |
inode | 73 | net/socket.c | static int sock_lseek(struct inode *inode, struct file *file, off_t offset, |
inode | 75 | net/socket.c | static int sock_read(struct inode *inode, struct file *file, char *buf, |
inode | 77 | net/socket.c | static int sock_write(struct inode *inode, struct file *file, const char *buf, |
inode | 80 | net/socket.c | static void sock_close(struct inode *inode, struct file *file); |
inode | 81 | net/socket.c | static int sock_select(struct inode *inode, struct file *file, int which, select_table *seltable); |
inode | 82 | net/socket.c | static int sock_ioctl(struct inode *inode, struct file *file, |
inode | 84 | net/socket.c | static int sock_fasync(struct inode *inode, struct file *filp, int on); |
inode | 162 | net/socket.c | static int get_fd(struct inode *inode) |
inode | 190 | net/socket.c | file->f_inode = inode; |
inode | 191 | net/socket.c | if (inode) |
inode | 192 | net/socket.c | inode->i_count++; |
inode | 205 | net/socket.c | __inline struct socket *socki_lookup(struct inode *inode) |
inode | 207 | net/socket.c | return &inode->u.socket_i; |
inode | 217 | net/socket.c | struct inode *inode; |
inode | 222 | net/socket.c | inode = file->f_inode; |
inode | 223 | net/socket.c | if (!inode || !inode->i_sock) |
inode | 229 | net/socket.c | return socki_lookup(inode); |
inode | 238 | net/socket.c | struct inode * inode; |
inode | 241 | net/socket.c | inode = get_empty_inode(); |
inode | 242 | net/socket.c | if (!inode) |
inode | 245 | net/socket.c | inode->i_mode = S_IFSOCK; |
inode | 246 | net/socket.c | inode->i_sock = 1; |
inode | 247 | net/socket.c | inode->i_uid = current->uid; |
inode | 248 | net/socket.c | inode->i_gid = current->gid; |
inode | 250 | net/socket.c | sock = &inode->u.socket_i; |
inode | 258 | net/socket.c | sock->wait = &inode->i_wait; |
inode | 259 | net/socket.c | sock->inode = inode; /* "backlink": we could use pointer arithmetic instead */ |
inode | 312 | net/socket.c | static int sock_lseek(struct inode *inode, struct file *file, off_t offset, int whence) |
inode | 322 | net/socket.c | static int sock_read(struct inode *inode, struct file *file, char *ubuf, int size) |
inode | 329 | net/socket.c | sock = socki_lookup(inode); |
inode | 354 | net/socket.c | static int sock_write(struct inode *inode, struct file *file, const char *ubuf, int size) |
inode | 361 | net/socket.c | sock = socki_lookup(inode); |
inode | 389 | net/socket.c | int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd, |
inode | 393 | net/socket.c | sock = socki_lookup(inode); |
inode | 398 | net/socket.c | static int sock_select(struct inode *inode, struct file *file, int sel_type, select_table * wait) |
inode | 402 | net/socket.c | sock = socki_lookup(inode); |
inode | 414 | net/socket.c | void sock_close(struct inode *inode, struct file *filp) |
inode | 420 | net/socket.c | if (!inode) |
inode | 422 | net/socket.c | sock_fasync(inode, filp, 0); |
inode | 423 | net/socket.c | sock_release(socki_lookup(inode)); |
inode | 430 | net/socket.c | static int sock_fasync(struct inode *inode, struct file *filp, int on) |
inode | 443 | net/socket.c | sock = socki_lookup(inode); |
inode | 114 | net/unix/af_unix.c | static unix_socket *unix_find_socket(struct inode *i) |
inode | 121 | net/unix/af_unix.c | if(s->protinfo.af_unix.inode==i) |
inode | 186 | net/unix/af_unix.c | if(sk->protinfo.af_unix.inode!=NULL) |
inode | 188 | net/unix/af_unix.c | iput(sk->protinfo.af_unix.inode); |
inode | 189 | net/unix/af_unix.c | sk->protinfo.af_unix.inode=NULL; |
inode | 301 | net/unix/af_unix.c | sk->protinfo.af_unix.inode=NULL; |
inode | 379 | net/unix/af_unix.c | struct inode *inode; |
inode | 384 | net/unix/af_unix.c | err = open_namei(path, 2, S_IFSOCK, &inode, NULL); |
inode | 391 | net/unix/af_unix.c | u=unix_find_socket(inode); |
inode | 392 | net/unix/af_unix.c | iput(inode); |
inode | 418 | net/unix/af_unix.c | if(sk->protinfo.af_unix.inode!=NULL) |
inode | 431 | net/unix/af_unix.c | err=open_namei(sk->protinfo.af_unix.name, 2, S_IFSOCK, &sk->protinfo.af_unix.inode, NULL); |