linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / fs / file_table.c
index 6022b86..75331a0 100644 (file)
@@ -91,7 +91,6 @@ int proc_nr_files(ctl_table *table, int write, struct file *filp,
  */
 struct file *get_empty_filp(void)
 {
-       struct task_struct *tsk;
        static int old_max;
        struct file * f;
 
@@ -116,14 +115,13 @@ struct file *get_empty_filp(void)
        if (security_file_alloc(f))
                goto fail_sec;
 
-       tsk = current;
-       INIT_LIST_HEAD(&f->f_u.fu_list);
+       eventpoll_init_file(f);
        atomic_set(&f->f_count, 1);
+       f->f_uid = current->fsuid;
+       f->f_gid = current->fsgid;
        rwlock_init(&f->f_owner.lock);
-       f->f_uid = tsk->fsuid;
-       f->f_gid = tsk->fsgid;
-       eventpoll_init_file(f);
        /* f->f_version: 0 */
+       INIT_LIST_HEAD(&f->f_u.fu_list);
        f->f_xid = vx_current_xid();
        vx_files_inc(f);
        return f;