ovl: protect copying of realinode attributes to ovl inode
authorAmir Goldstein <amir73il@gmail.com>
Thu, 24 Aug 2023 11:51:17 +0000 (14:51 +0300)
committerAmir Goldstein <amir73il@gmail.com>
Mon, 30 Oct 2023 22:12:55 +0000 (00:12 +0200)
commitf7621b11e8acc8efa208c9420ff3ecb198b20e29
treeae97dcdbcff0a993b0e87b86af7c0984d8d5a87c
parent389a4a4a19851211bb9c40d31c664591fb206f69
ovl: protect copying of realinode attributes to ovl inode

ovl_copyattr() may be called concurrently from aio completion context
without any lock and that could lead to overlay inode attributes getting
permanently out of sync with real inode attributes.

Use ovl inode spinlock to protect ovl_copyattr().

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
fs/overlayfs/util.c