summaryrefslogtreecommitdiff
path: root/fs/anon_inodes.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2019-12-21 11:42:29 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2020-01-22 20:11:41 +0100
commitb1f9d3858f724ed45b279b689fb5b400d91352e3 (patch)
treefaabb4d4dd5af7b3ea8448d1db1ed1019965fc5a /fs/anon_inodes.c
parent1bd0a3aea4357e1dce8b3f0f889fd3fe756353e6 (diff)
downloadlinux-next-b1f9d3858f724ed45b279b689fb5b400d91352e3.tar.gz
ovl: use ovl_inode_lock in ovl_llseek()
In ovl_llseek() we use the overlay inode rwsem to protect against concurrent modifications to real file f_pos, because we copy the overlay file f_pos to/from the real file f_pos. This caused a lockdep warning of locking order violation when the ovl_llseek() operation was called on a lower nested overlay layer while the upper layer fs sb_writers is held (with patch improving copy-up efficiency for big sparse file). Use the internal ovl_inode_lock() instead of the overlay inode rwsem in those cases. It is meant to be used for protecting against concurrent changes to overlay inode internal state changes. The locking order rules are documented to explain this case. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/anon_inodes.c')
0 files changed, 0 insertions, 0 deletions