Whamcloud - gitweb
LU-15081 vfs: set_nlink() is not race-safe 91/45191/2
authorAndrew Perepechko <andrew.perepechko@hpe.com>
Mon, 11 Oct 2021 19:11:05 +0000 (22:11 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 Oct 2021 00:38:12 +0000 (00:38 +0000)
commit12b05772fdb6d080819b6c213fcd7f8705278412
tree28ff497f7616a5787635f4f2109a1d20a0a5fd4f
parent0549031b991ec0bbf570a41c7d28b8a7fd4b41c3
LU-15081 vfs: set_nlink() is not race-safe

set_nlink() is not atomic wrt race with itself and
the following warning may be triggered by VFS:

WARNING: CPU: 5 PID: 195090 at fs/inode.c:241 __destroy_inode+0xdb/0xf0

It does not seem important what exact nlink value is the result
of the race. However, we need to protect the superblock remove
counter.

Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
HPE-bug-id: LUS-9825
Change-Id: I67bc345b9a9e43fb88d919a83246759d11604b03
Reviewed-on: https://review.whamcloud.com/45191
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c
lustre/llite/llite_lib.c
lustre/llite/namei.c
lustre/lmv/lmv_intent.c