[PATCH] remove many unneeded #includes of sched.h
[sfrench/cifs-2.6.git] / net / unix / garbage.c
index 746c2f4a5fa62a290418a0b7780b165678ae7f96..f20b7ea7c5553264b5ecd18fc3e5196a8f012500 100644 (file)
@@ -63,9 +63,8 @@
  *             Damn. Added missing check for ->dead in listen queues scanning.
  *
  */
+
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/socket.h>
 #include <linux/un.h>
@@ -96,7 +95,7 @@ atomic_t unix_tot_inflight = ATOMIC_INIT(0);
 static struct sock *unix_get_socket(struct file *filp)
 {
        struct sock *u_sock = NULL;
-       struct inode *inode = filp->f_dentry->d_inode;
+       struct inode *inode = filp->f_path.dentry->d_inode;
 
        /*
         *      Socket ?
@@ -118,7 +117,7 @@ static struct sock *unix_get_socket(struct file *filp)
  *     Keep the number of times in flight count for the file
  *     descriptor if it is for an AF_UNIX socket.
  */
+
 void unix_inflight(struct file *fp)
 {
        struct sock *s = unix_get_socket(fp);
@@ -190,7 +189,7 @@ void unix_gc(void)
                unix_sk(s)->gc_tree = GC_ORPHAN;
        }
        /*
-        *      Everything is now marked 
+        *      Everything is now marked
         */
 
        /* Invariant to be maintained:
@@ -227,7 +226,7 @@ void unix_gc(void)
        }
 
        /*
-        *      Mark phase 
+        *      Mark phase
         */
 
        while (!empty_stack())
@@ -237,11 +236,11 @@ void unix_gc(void)
 
                spin_lock(&x->sk_receive_queue.lock);
                skb = skb_peek(&x->sk_receive_queue);
-               
+
                /*
-                *      Loop through all but first born 
+                *      Loop through all but first born
                 */
-               
+
                while (skb && skb != (struct sk_buff *)&x->sk_receive_queue) {
                        /*
                         *      Do we have file descriptors ?