aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/tty_io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 6a56ae4f772..0bfc7af6891 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2454,6 +2454,7 @@ static void __do_SAK(void *arg)
int i;
struct file *filp;
struct tty_ldisc *disc;
+ struct fdtable *fdt;
if (!tty)
return;
@@ -2480,7 +2481,8 @@ static void __do_SAK(void *arg)
task_lock(p);
if (p->files) {
spin_lock(&p->files->file_lock);
- for (i=0; i < p->files->max_fds; i++) {
+ fdt = files_fdtable(p->files);
+ for (i=0; i < fdt->max_fds; i++) {
filp = fcheck_files(p->files, i);
if (!filp)
continue;