proc: smaller RCU section in ->getattr()
PATCH 1/1 proc: smaller RCU section in ->getattr()
struct kstat is thread local.
Signed-off-by Alexey Dobriyan <[email protected]>
---
fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/base.c +1 -1
@@ -1787,9 +1787,9 @@ int pid_getattr(const struct path *path, struct kstat *stat,generic_fillattr (inode, stat); -rcu_read_lock (); stat->uid =GLOBAL_ROOT_UID ; stat->gid =GLOBAL_ROOT_GID ; +rcu_read_lock (); task =pid_task (proc_pid (inode),PIDTYPE_PID );if (task) {if (!has_pid_permissions (pid, task,HIDEPID_INVISIBLE )) {