Lines Matching refs:u

761     u;  member
800 u; member
920 if ( S_ISLNK (de->mode) ) kfree (de->u.symlink.linkname); in devfs_put()
921 if ( ( S_ISCHR (de->mode) || S_ISBLK (de->mode) ) && de->u.fcb.autogen ) in devfs_put()
925 mk_kdev (de->u.fcb.u.device.major, in devfs_put()
926 de->u.fcb.u.device.minor) ); in devfs_put()
933 if ( S_ISLNK (de->mode) ) stat_num_bytes -= de->u.symlink.length + 1; in devfs_put()
962 for (curr = dir->u.dir.first; curr != NULL; curr = curr->next) in _devfs_search_dir()
994 if ( S_ISDIR (mode) ) rwlock_init (&new->u.dir.lock); in _devfs_alloc_entry()
1038 write_lock (&dir->u.dir.lock); in _devfs_append_entry()
1039 if (dir->u.dir.no_more_additions) retval = -ENOENT; in _devfs_append_entry()
1050 de->prev = dir->u.dir.last; in _devfs_append_entry()
1052 if (dir->u.dir.first == NULL) dir->u.dir.first = de; in _devfs_append_entry()
1053 else dir->u.dir.last->next = de; in _devfs_append_entry()
1054 dir->u.dir.last = de; in _devfs_append_entry()
1055 if (removable) ++dir->u.dir.num_removable; in _devfs_append_entry()
1060 write_unlock (&dir->u.dir.lock); in _devfs_append_entry()
1094 new->u.fcb.u.device.major = major (devnum); in _devfs_get_root_entry()
1095 new->u.fcb.u.device.minor = minor (devnum); in _devfs_get_root_entry()
1096 new->u.fcb.ops = &devfsd_fops; in _devfs_get_root_entry()
1102 new->u.fcb.u.device.major = major (devnum); in _devfs_get_root_entry()
1103 new->u.fcb.u.device.minor = minor (devnum); in _devfs_get_root_entry()
1104 new->u.fcb.ops = &stat_fops; in _devfs_get_root_entry()
1141 read_lock (&dir->u.dir.lock); in _devfs_descend()
1143 read_unlock (&dir->u.dir.lock); in _devfs_descend()
1238 link = _devfs_walk_path (dir, de->u.symlink.linkname, in _devfs_walk_path()
1239 de->u.symlink.length, TRUE); in _devfs_walk_path()
1283 read_lock (&dir->u.dir.lock); in _devfs_find_by_dev()
1284 for (entry = dir->u.dir.first; entry != NULL; entry = entry->next) in _devfs_find_by_dev()
1289 if ( (entry->u.fcb.u.device.major == major) && in _devfs_find_by_dev()
1290 (entry->u.fcb.u.device.minor == minor) ) in _devfs_find_by_dev()
1293 read_unlock (&dir->u.dir.lock); in _devfs_find_by_dev()
1300 for (entry = dir->u.dir.first; entry != NULL; entry = entry->next) in _devfs_find_by_dev()
1306 read_unlock (&dir->u.dir.lock); in _devfs_find_by_dev()
1311 read_unlock (&dir->u.dir.lock); in _devfs_find_by_dev()
1375 VERIFY_ENTRY ( (struct devfs_entry *) inode->u.generic_ip ); in get_devfs_entry_from_vfs_inode()
1376 return inode->u.generic_ip; in get_devfs_entry_from_vfs_inode()
1600 de->u.fcb.u.device.major = major; in devfs_register()
1601 de->u.fcb.u.device.minor = minor; in devfs_register()
1602 de->u.fcb.autogen = kdev_none (devnum) ? FALSE : TRUE; in devfs_register()
1622 de->u.fcb.ops = ops; in devfs_register()
1623 de->u.fcb.auto_owner = (flags & DEVFS_FL_AUTO_OWNER) ? TRUE : FALSE; in devfs_register()
1624 de->u.fcb.aopen_notify = (flags & DEVFS_FL_AOPEN_NOTIFY) ? TRUE : FALSE; in devfs_register()
1626 if (flags & DEVFS_FL_REMOVABLE) de->u.fcb.removable = TRUE; in devfs_register()
1627 if ( ( err = _devfs_append_entry (dir, de, de->u.fcb.removable, NULL) ) in devfs_register()
1658 if (de->prev == NULL) parent->u.dir.first = de->next; in _devfs_unhook()
1660 if (de->next == NULL) parent->u.dir.last = de->prev; in _devfs_unhook()
1665 de->u.fcb.removable ) in _devfs_unhook()
1666 --parent->u.dir.num_removable; in _devfs_unhook()
1684 write_unlock (&dir->u.dir.lock); in _devfs_unregister()
1696 write_lock (&de->u.dir.lock); in _devfs_unregister()
1697 de->u.dir.no_more_additions = TRUE; in _devfs_unregister()
1698 child = de->u.dir.first; in _devfs_unregister()
1721 write_lock (&de->parent->u.dir.lock); in devfs_unregister()
1760 de->u.symlink.linkname = newlink; in devfs_do_symlink()
1761 de->u.symlink.length = linklength; in devfs_do_symlink()
1924 if (de->u.fcb.auto_owner) fl |= DEVFS_FL_AUTO_OWNER; in devfs_get_flags()
1925 if (de->u.fcb.aopen_notify) fl |= DEVFS_FL_AOPEN_NOTIFY; in devfs_get_flags()
1926 if (de->u.fcb.removable) fl |= DEVFS_FL_REMOVABLE; in devfs_get_flags()
1949 de->u.fcb.auto_owner = (flags & DEVFS_FL_AUTO_OWNER) ? TRUE : FALSE; in devfs_set_flags()
1950 de->u.fcb.aopen_notify = (flags & DEVFS_FL_AOPEN_NOTIFY) ? TRUE:FALSE; in devfs_set_flags()
1972 if (major != NULL) *major = de->u.fcb.u.device.major; in devfs_get_maj_min()
1973 if (minor != NULL) *minor = de->u.fcb.u.device.minor; in devfs_get_maj_min()
2007 #define NAMEOF(de) ( (de)->mode ? (de)->name : (de)->u.name ) in devfs_generate_path()
2043 if (de->u.fcb.ops == NULL) return NULL; in devfs_get_ops()
2044 read_lock (&de->parent->u.dir.lock); /* Prevent module from unloading */ in devfs_get_ops()
2047 owner = ( (struct file_operations *) de->u.fcb.ops )->owner; in devfs_get_ops()
2048 else owner = ( (struct block_device_operations *) de->u.fcb.ops )->owner; in devfs_get_ops()
2051 read_unlock (&de->parent->u.dir.lock); in devfs_get_ops()
2054 read_unlock (&de->parent->u.dir.lock); /* Module can continue unloading*/ in devfs_get_ops()
2055 return de->u.fcb.ops; in devfs_get_ops()
2074 if (de->u.fcb.ops == NULL) return; in devfs_put_ops()
2076 owner = ( (struct file_operations *) de->u.fcb.ops )->owner; in devfs_put_ops()
2077 else owner = ( (struct block_device_operations *) de->u.fcb.ops )->owner; in devfs_put_ops()
2095 if (de->u.fcb.u.file.size == size) return 0; in devfs_set_file_size()
2096 de->u.fcb.u.file.size = size; in devfs_set_file_size()
2160 return de->u.dir.first; in devfs_get_first_child()
2424 buf->u.name = name; in try_modload()
2448 kdev_t dev = mk_kdev (de->u.fcb.u.device.major, de->u.fcb.u.device.minor); in check_disc_changed()
2486 read_lock (&dir->u.dir.lock); in scan_dir_for_removable()
2487 if (dir->u.dir.num_removable < 1) de = NULL; in scan_dir_for_removable()
2490 for (de = dir->u.dir.first; de != NULL; de = de->next) in scan_dir_for_removable()
2492 if (S_ISBLK (de->mode) && de->u.fcb.removable) break; in scan_dir_for_removable()
2496 read_unlock (&dir->u.dir.lock); in scan_dir_for_removable()
2520 if (dir->u.dir.num_removable < 1) in get_removable_partition()
2522 read_unlock (&dir->u.dir.lock); in get_removable_partition()
2525 for (de = dir->u.dir.first; de != NULL; de = de->next) in get_removable_partition()
2527 if (!S_ISBLK (de->mode) || !de->u.fcb.removable) continue; in get_removable_partition()
2535 read_unlock (&dir->u.dir.lock); in get_removable_partition()
2555 struct fs_info *fs_info = inode->i_sb->u.generic_sbp; in devfs_notify_change()
2570 !S_ISBLK (inode->i_mode) ) || !de->u.fcb.auto_owner ) in devfs_notify_change()
2635 read_lock (&de->parent->u.dir.lock); in _devfs_get_vfs_inode()
2637 read_unlock (&de->parent->u.dir.lock); in _devfs_get_vfs_inode()
2645 inode->u.generic_ip = devfs_get (de); in _devfs_get_vfs_inode()
2656 inode->i_rdev = mk_kdev (de->u.fcb.u.device.major, in _devfs_get_vfs_inode()
2657 de->u.fcb.u.device.minor); in _devfs_get_vfs_inode()
2663 inode->i_rdev = mk_kdev (de->u.fcb.u.device.major, in _devfs_get_vfs_inode()
2664 de->u.fcb.u.device.minor); in _devfs_get_vfs_inode()
2667 if (!inode->i_bdev->bd_op && de->u.fcb.ops) in _devfs_get_vfs_inode()
2668 inode->i_bdev->bd_op = de->u.fcb.ops; in _devfs_get_vfs_inode()
2676 inode->i_size = de->u.fcb.u.file.size; in _devfs_get_vfs_inode()
2687 inode->i_size = de->u.symlink.length; in _devfs_get_vfs_inode()
2689 if (is_fcb && de->u.fcb.auto_owner) in _devfs_get_vfs_inode()
2713 fs_info = inode->i_sb->u.generic_sbp; in devfs_readdir()
2739 read_lock (&parent->u.dir.lock); in devfs_readdir()
2740 for (de = parent->u.dir.first; de && (count > 0); de = de->next) in devfs_readdir()
2743 read_unlock (&parent->u.dir.lock); in devfs_readdir()
2761 read_lock (&parent->u.dir.lock); in devfs_readdir()
2763 read_unlock (&parent->u.dir.lock); in devfs_readdir()
2777 struct fs_info *fs_info = inode->i_sb->u.generic_sbp; in devfs_open()
2783 df = &de->u.fcb; in devfs_open()
2909 fs_info = inode->i_sb->u.generic_sbp; in devfs_d_delete()
2916 if (!de->u.fcb.open) return 0; in devfs_d_delete()
2917 de->u.fcb.open = FALSE; in devfs_d_delete()
2918 if (de->u.fcb.aopen_notify) in devfs_d_delete()
2921 if (!de->u.fcb.auto_owner) return 0; in devfs_d_delete()
2938 struct fs_info *fs_info = dir->i_sb->u.generic_sbp; in devfs_d_revalidate_wait()
2955 read_lock (&parent->u.dir.lock); in devfs_d_revalidate_wait()
2958 read_unlock (&parent->u.dir.lock); in devfs_d_revalidate_wait()
2972 read_lock (&parent->u.dir.lock); in devfs_d_revalidate_wait()
2977 read_unlock (&parent->u.dir.lock); in devfs_d_revalidate_wait()
2980 else read_unlock (&parent->u.dir.lock); in devfs_d_revalidate_wait()
2991 struct fs_info *fs_info = dir->i_sb->u.generic_sbp; in devfs_lookup()
3004 read_lock (&parent->u.dir.lock); in devfs_lookup()
3006 if (de) read_unlock (&parent->u.dir.lock); in devfs_lookup()
3012 read_lock (&parent->u.dir.lock); in devfs_lookup()
3015 read_unlock (&parent->u.dir.lock); in devfs_lookup()
3048 read_lock (&parent->u.dir.lock); in devfs_lookup()
3051 read_unlock (&parent->u.dir.lock); in devfs_lookup()
3068 write_lock (&parent->u.dir.lock); in devfs_lookup()
3070 write_unlock (&parent->u.dir.lock); in devfs_lookup()
3080 struct fs_info *fs_info = dir->i_sb->u.generic_sbp; in devfs_unlink()
3086 write_lock (&de->parent->u.dir.lock); in devfs_unlink()
3088 write_unlock (&de->parent->u.dir.lock); in devfs_unlink()
3102 struct fs_info *fs_info = dir->i_sb->u.generic_sbp; in devfs_symlink()
3134 struct fs_info *fs_info = dir->i_sb->u.generic_sbp; in devfs_mkdir()
3166 struct fs_info *fs_info = dir->i_sb->u.generic_sbp; in devfs_rmdir()
3169 if (dir->i_sb->u.generic_sbp != inode->i_sb->u.generic_sbp) return -EINVAL; in devfs_rmdir()
3175 write_lock (&de->u.dir.lock); in devfs_rmdir()
3176 if (de->u.dir.first) err = -ENOTEMPTY; in devfs_rmdir()
3177 else de->u.dir.no_more_additions = TRUE; in devfs_rmdir()
3178 write_unlock (&de->u.dir.lock); in devfs_rmdir()
3181 write_lock (&de->parent->u.dir.lock); in devfs_rmdir()
3183 write_unlock (&de->parent->u.dir.lock); in devfs_rmdir()
3197 struct fs_info *fs_info = dir->i_sb->u.generic_sbp; in devfs_mknod()
3210 de->u.fcb.u.device.major = MAJOR (rdev); in devfs_mknod()
3211 de->u.fcb.u.device.minor = MINOR (rdev); in devfs_mknod()
3238 err = vfs_readlink (dentry, buffer, buflen, de->u.symlink.linkname); in devfs_readlink()
3249 err = vfs_follow_link (nd, de->u.symlink.linkname); in devfs_follow_link()
3286 sb->u.generic_sbp = &fs_info; in devfs_read_super()
3295 DPRINTK (DEBUG_S_READ, "(): made devfs ptr: %p\n", sb->u.generic_sbp); in devfs_read_super()
3318 struct fs_info *fs_info = file->f_dentry->d_inode->i_sb->u.generic_sbp; in devfsd_read()
3358 info->major = de->u.fcb.u.device.major; in devfsd_read()
3359 info->minor = de->u.fcb.u.device.minor; in devfsd_read()
3419 struct fs_info *fs_info = inode->i_sb->u.generic_sbp; in devfsd_ioctl()
3476 struct fs_info *fs_info = inode->i_sb->u.generic_sbp; in devfsd_close()