X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Ffile_table.c;h=75331a0485d888b8cbd1c9cc7048849f8f7526ff;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=6022b86a8e0f6684f14bfbfe00bad48364778469;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/fs/file_table.c b/fs/file_table.c index 6022b86a8..75331a048 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -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;