fuse: verify nlink
authorMiklos Szeredi <mszeredi@redhat.com>
Tue, 12 Nov 2019 10:49:04 +0000 (11:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:41:29 +0000 (10:41 +0100)
commit38969fe9b9137ec0141b9a1d66edf42d1c4da1c5
tree411ef9919b3908e07918d6ed1c30235e5af7d356
parentbdb6fa8234e59dfb1e0136352adf7684ac9c11af
fuse: verify nlink

commit c634da718db9b2fac201df2ae1b1b095344ce5eb upstream.

When adding a new hard link, make sure that i_nlink doesn't overflow.

Fixes: ac45d61357e8 ("fuse: fix nlink after unlink")
Cc: <stable@vger.kernel.org> # v3.4
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dir.c