X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fsparc64%2Fsolaris%2Fsocksys.c;fp=arch%2Fsparc64%2Fsolaris%2Fsocksys.c;h=89a4757f192f5bee16b90fed7b793ce622bf36c7;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=fc6669e8dde189640a053c40f629e63720795d9c;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c index fc6669e8d..89a4757f1 100644 --- a/arch/sparc64/solaris/socksys.c +++ b/arch/sparc64/solaris/socksys.c @@ -26,7 +26,6 @@ #include #include #include -#include #include @@ -97,13 +96,13 @@ static int socksys_open(struct inode * inode, struct file * filp) * No shit. WTF is it supposed to do, anyway? * * Try instead: - * d_delete(filp->f_dentry), then d_instantiate with sock inode + * d_delete(filp->f_path.dentry), then d_instantiate with sock inode */ - dentry = filp->f_dentry; - filp->f_dentry = dget(fcheck(fd)->f_dentry); - filp->f_dentry->d_inode->i_rdev = inode->i_rdev; - filp->f_dentry->d_inode->i_flock = inode->i_flock; - SOCKET_I(filp->f_dentry->d_inode)->file = filp; + dentry = filp->f_path.dentry; + filp->f_path.dentry = dget(fcheck(fd)->f_path.dentry); + filp->f_path.dentry->d_inode->i_rdev = inode->i_rdev; + filp->f_path.dentry->d_inode->i_flock = inode->i_flock; + SOCKET_I(filp->f_path.dentry->d_inode)->file = filp; filp->f_op = &socksys_file_ops; sock = (struct sol_socket_struct*) mykmalloc(sizeof(struct sol_socket_struct), GFP_KERNEL); @@ -149,7 +148,7 @@ static unsigned int socksys_poll(struct file * filp, poll_table * wait) struct inode *ino; unsigned int mask = 0; - ino=filp->f_dentry->d_inode; + ino=filp->f_path.dentry->d_inode; if (ino && S_ISSOCK(ino->i_mode)) { struct sol_socket_struct *sock; sock = (struct sol_socket_struct*)filp->private_data; @@ -169,8 +168,7 @@ static struct file_operations socksys_fops = { .release = socksys_release, }; -int __init -init_socksys(void) +int __init init_socksys(void) { int ret; struct file * file; @@ -190,8 +188,6 @@ init_socksys(void) return ret; } - devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUSR|S_IWUSR, "socksys"); - file = fcheck(ret); /* N.B. Is this valid? Suppose the f_ops are in a module ... */ socksys_file_ops = *file->f_op; @@ -202,10 +198,8 @@ init_socksys(void) return 0; } -void -cleanup_socksys(void) +void __exit cleanup_socksys(void) { if (unregister_chrdev(30, "socksys")) printk ("Couldn't unregister socksys character device\n"); - devfs_remove ("socksys"); }