patch-2.1.56 linux/net/socket.c

Next file: linux/net/sunrpc/clnt.c
Previous file: linux/net/netlink.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.55/linux/net/socket.c linux/net/socket.c
@@ -96,8 +96,7 @@
 #include <net/scm.h>
 
 
-static long long sock_lseek(struct inode *inode, struct file *file,
-			    long long offset, int whence);
+static long long sock_lseek(struct file *file, long long offset, int whence);
 static long sock_read(struct inode *inode, struct file *file,
 		      char *buf, unsigned long size);
 static long sock_write(struct inode *inode, struct file *file,
@@ -107,7 +106,7 @@
 static unsigned int sock_poll(struct file *file, poll_table *wait);
 static int sock_ioctl(struct inode *inode, struct file *file,
 		      unsigned int cmd, unsigned long arg);
-static int sock_fasync(struct inode *inode, struct file *filp, int on);
+static int sock_fasync(struct file *filp, int on);
 
 
 /*
@@ -353,8 +352,7 @@
  *	Sockets are not seekable.
  */
 
-static long long sock_lseek(struct inode *inode, struct file *file,
-			    long long offset, int whence)
+static long long sock_lseek(struct file *file,long long offset, int whence)
 {
 	return -ESPIPE;
 }
@@ -482,7 +480,7 @@
 		printk(KERN_DEBUG "sock_close: NULL inode\n");
 		return 0;
 	}
-	sock_fasync(inode, filp, 0);
+	sock_fasync(filp, 0);
 	sock_release(socki_lookup(inode));
 	return 0;
 }
@@ -491,7 +489,7 @@
  *	Update the socket async list
  */
  
-static int sock_fasync(struct inode *inode, struct file *filp, int on)
+static int sock_fasync(struct file *filp, int on)
 {
 	struct fasync_struct *fa, *fna=NULL, **prev;
 	struct socket *sock;
@@ -504,7 +502,7 @@
 			return -ENOMEM;
 	}
 
-	sock = socki_lookup(inode);
+	sock = socki_lookup(filp->f_dentry->d_inode);
 	
 	prev=&(sock->fasync_list);
 	

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov