proc: Fix unbalanced hard link numbers
authorTakashi Iwai <tiwai@suse.de>
Fri, 28 Apr 2017 13:00:15 +0000 (15:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:44:37 +0000 (15:44 +0200)
commitd10b21d6e56261f5d815b8783f944cae8c6369c1
treec8a73c6f3a97faaf25a92dc90e2021f9b0d0e1f6
parent168b2bfaa235e91c2f7a76ac693435e530f486b3
proc: Fix unbalanced hard link numbers

commit d66bb1607e2d8d384e53f3d93db5c18483c8c4f7 upstream.

proc_create_mount_point() forgot to increase the parent's nlink, and
it resulted in unbalanced hard link numbers, e.g. /proc/fs shows one
less than expected.

Fixes: eb6d38d5427b ("proc: Allow creating permanently empty directories...")
Reported-by: Tristan Ye <tristan.ye@suse.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/proc/generic.c