proc: task_state: deuglify the max_fds calculation
authorOleg Nesterov <[email protected]>
Wed, 10 Dec 2014 23:45:12 +0000 (15:45 -0800)
committerLinus Torvalds <[email protected]>
Thu, 11 Dec 2014 01:41:09 +0000 (17:41 -0800)
commit0f4a0d53f20c76a70cb5b69b6aa237de2107e171
tree6c1e5e4a323bd542fc07d117acf61824293b5262
parent4af1036df4dd4f0d59fad9d82ed456bfa2e73fa6
proc: task_state: deuglify the max_fds calculation

1. The usage of fdt looks very ugly, it can't be NULL if ->files is
   not NULL. We can use "unsigned int max_fds" instead.

2. This also allows to move seq_printf(max_fds) outside of task_lock()
   and join it with the previous seq_printf(). See also the next patch.

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Aaron Tomlin <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>,
Cc: Sterling Alexander <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Roland McGrath <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/proc/array.c