Commit 9d5fab50 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] 32-bit dev_t fixups

	Argh.  A couple of places where we needed ..._encode_dev() had
been lost in reordering the patchset - the most notable being ctty number in
/proc/<pid>/stat.  Fix follows:
parent 117991c5
...@@ -35,7 +35,7 @@ static int tiocgdev(unsigned fd, unsigned cmd, unsigned int *ptr) ...@@ -35,7 +35,7 @@ static int tiocgdev(unsigned fd, unsigned cmd, unsigned int *ptr)
real_tty = (struct tty_struct *)file->private_data; real_tty = (struct tty_struct *)file->private_data;
if (!real_tty) if (!real_tty)
return -EINVAL; return -EINVAL;
return put_user(tty_devnum(real_tty), ptr); return put_user(new_encode_dev(tty_devnum(real_tty)), ptr);
} }
......
...@@ -306,7 +306,7 @@ int proc_pid_stat(struct task_struct *task, char * buffer) ...@@ -306,7 +306,7 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
mm = mmgrab(mm); mm = mmgrab(mm);
if (task->tty) { if (task->tty) {
tty_pgrp = task->tty->pgrp; tty_pgrp = task->tty->pgrp;
tty_nr = tty_devnum(task->tty); tty_nr = new_encode_dev(tty_devnum(task->tty));
} }
task_unlock(task); task_unlock(task);
if (mm) { if (mm) {
......
...@@ -340,9 +340,10 @@ static void do_acct_process(long exitcode, struct file *file) ...@@ -340,9 +340,10 @@ static void do_acct_process(long exitcode, struct file *file)
ac.ac_btime = xtime.tv_sec - elapsed; ac.ac_btime = xtime.tv_sec - elapsed;
ac.ac_utime = encode_comp_t(current->utime); ac.ac_utime = encode_comp_t(current->utime);
ac.ac_stime = encode_comp_t(current->stime); ac.ac_stime = encode_comp_t(current->stime);
/* we really need to bite the bullet and change layout */
ac.ac_uid = current->uid; ac.ac_uid = current->uid;
ac.ac_gid = current->gid; ac.ac_gid = current->gid;
ac.ac_tty = current->tty ? tty_devnum(current->tty) : 0; ac.ac_tty = current->tty ? old_encode_dev(tty_devnum(current->tty)) : 0;
ac.ac_flag = 0; ac.ac_flag = 0;
if (current->flags & PF_FORKNOEXEC) if (current->flags & PF_FORKNOEXEC)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment