Re: [RFC] [PATCH 1/8] inode_diet: Replace inode.u.generic_ip withinode.i_private
From: Jan Engelhardt
Date: Mon Jun 19 2006 - 13:17:14 EST
>--- linux-2.6.17.orig/arch/s390/kernel/debug.c 2006-06-18 18:58:51.000000000 -0400
>+++ linux-2.6.17/arch/s390/kernel/debug.c 2006-06-18 18:58:55.000000000 -0400
>@@ -604,7 +604,7 @@
> debug_info_t *debug_info, *debug_info_snapshot;
>
> down(&debug_lock);
>- debug_info = (struct debug_info*)file->f_dentry->d_inode->u.generic_ip;
>+ debug_info = (struct debug_info*)file->f_dentry->d_inode->i_private;
All these casts can be removed at the same time,
since i_private is a void* anyway and therefore does not require casting.
>- rhbeat->sp = (struct service_processor *)inode->u.generic_ip;
>+ rhbeat->sp = (struct service_processor *)inode->i_private;
>- char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data;
>+ char *s=((struct autofs_symlink *)dentry->d_inode->i_private)->data;
>- VERIFY_ENTRY((struct devfs_entry *)inode->u.generic_ip);
>- return inode->u.generic_ip;
>+ VERIFY_ENTRY((struct devfs_entry *)inode->i_private);
>+ return inode->i_private;
> #define VXFS_INO(ip) \
>- ((struct vxfs_inode_info *)(ip)->u.generic_ip)
>+ ((struct vxfs_inode_info *)(ip)->i_private)
Depends on use of VXFS_INO here.
>- ip->u.generic_ip = (void *)vip;
>+ ip->i_private = (void *)vip;
>- inode->u.generic_ip = (void *)f;
>+ inode->i_private = (void *)f;
>- if (!(old_dir_f = (struct jffs_file *)old_dir->u.generic_ip)) {
>+ if (!(old_dir_f = (struct jffs_file *)old_dir->i_private)) {
Not sure.
>- if (!(new_dir_f = (struct jffs_file *)new_dir->u.generic_ip)) {
>+ if (!(new_dir_f = (struct jffs_file *)new_dir->i_private)) {
>- if (!(d = (struct jffs_file *)dir->u.generic_ip)) {
>+ if (!(d = (struct jffs_file *)dir->i_private)) {
>- struct jffs_file *f = (struct jffs_file *)inode->u.generic_ip;
>+ struct jffs_file *f = (struct jffs_file *)inode->i_private;
> struct jffs_control *c = (struct jffs_control *)inode->i_sb->s_fs_info;
>- dir_f = (struct jffs_file *)dir->u.generic_ip;
>+ dir_f = (struct jffs_file *)dir->i_private;
>- dir_f = (struct jffs_file *) dir->u.generic_ip;
>+ dir_f = (struct jffs_file *) dir->i_private;
>- dir_f = (struct jffs_file *)dir->u.generic_ip;
>+ dir_f = (struct jffs_file *)dir->i_private;
>- dir_f = (struct jffs_file *)dir->u.generic_ip;
>+ dir_f = (struct jffs_file *)dir->i_private;
>- dir_f = (struct jffs_file *)dir->u.generic_ip;
>+ dir_f = (struct jffs_file *)dir->i_private;
>- if (!(f = (struct jffs_file *)inode->u.generic_ip)) {
>- D(printk("jffs_file_write(): inode->u.generic_ip = 0x%p\n",
>- inode->u.generic_ip));
>+ if (!(f = (struct jffs_file *)inode->i_private)) {
>+ D(printk("jffs_file_write(): inode->i_private = 0x%p\n",
>+ inode->i_private));
>- inode->u.generic_ip = (void *)f;
>+ inode->i_private = (void *)f;
lots more.
Jan Engelhardt
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/