diff options
author | pzread <netfirewall@gmail.com> | 2013-05-13 20:51:56 +0800 |
---|---|---|
committer | pzread <netfirewall@gmail.com> | 2013-05-13 20:51:56 +0800 |
commit | b3854acc842b95b9ea9fcdafb47a6518d63eb111 (patch) | |
tree | 3ece3ad8e664548a3dbea21a8f664737917f5d71 | |
parent | 7557a467ea27ca6e0b0ea25b1d903d63a324ee11 (diff) | |
download | taiwan-online-judge-b3854acc842b95b9ea9fcdafb47a6518d63eb111.tar taiwan-online-judge-b3854acc842b95b9ea9fcdafb47a6518d63eb111.tar.gz taiwan-online-judge-b3854acc842b95b9ea9fcdafb47a6518d63eb111.tar.bz2 taiwan-online-judge-b3854acc842b95b9ea9fcdafb47a6518d63eb111.tar.lz taiwan-online-judge-b3854acc842b95b9ea9fcdafb47a6518d63eb111.tar.xz taiwan-online-judge-b3854acc842b95b9ea9fcdafb47a6518d63eb111.tar.zst taiwan-online-judge-b3854acc842b95b9ea9fcdafb47a6518d63eb111.zip |
Fix compile on kernel 3.9
-rwxr-xr-x | toj/center/src/judgk_hyperio.c | 5 | ||||
-rwxr-xr-x | toj/center/src/judgk_proc.c | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/toj/center/src/judgk_hyperio.c b/toj/center/src/judgk_hyperio.c index 67b0ef6..2702f55 100755 --- a/toj/center/src/judgk_hyperio.c +++ b/toj/center/src/judgk_hyperio.c @@ -239,13 +239,12 @@ int judgk_hyperio_mmap(struct file *filp,struct vm_area_struct *vma){ } static inline struct hyperio_info* hyperio_filp_lookup(struct file *filp){ - struct hlist_node *node; struct hyperio_info *info; rcu_read_lock(); info = NULL; - hlist_for_each_entry_rcu(info,node,&hyperio_filp_ht[(unsigned long)filp % HYPERIO_FILP_HTSIZE],node){ + hlist_for_each_entry_rcu(info,&hyperio_filp_ht[(unsigned long)filp % HYPERIO_FILP_HTSIZE],node){ if((unsigned long)info->filp == (unsigned long)filp){ break; } @@ -260,8 +259,6 @@ static int hyperio_tty_open(struct tty_struct *tty, struct file *filp){ struct hyperio_info *info; struct file_operations *hook_fops; - tty->low_latency = 1; - info = &hyperio_table[tty->index]; atomic_inc(&info->ref_count); info->filp = filp; diff --git a/toj/center/src/judgk_proc.c b/toj/center/src/judgk_proc.c index 9780498..cc51ced 100755 --- a/toj/center/src/judgk_proc.c +++ b/toj/center/src/judgk_proc.c @@ -150,12 +150,11 @@ int judgk_proc_del(unsigned long arg){ } struct judgk_proc_info* judgk_proc_task_lookup(struct task_struct *task){ struct judgk_proc_info *info; - struct hlist_node *node; rcu_read_lock(); info = NULL; - hlist_for_each_entry_rcu(info,node,&proc_task_ht[(unsigned long)task % PROC_TASK_HTSIZE],node){ + hlist_for_each_entry_rcu(info,&proc_task_ht[(unsigned long)task % PROC_TASK_HTSIZE],node){ if((unsigned long)info->task == (unsigned long)task){ break; } |