linux/fs/overlayfs
Amir Goldstein b1f9d3858f 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>
2020-01-22 20:11:41 +01:00
..
copy_up.c ovl: use pr_fmt auto generate prefix 2020-01-22 20:11:41 +01:00
dir.c ovl: use pr_fmt auto generate prefix 2020-01-22 20:11:41 +01:00
export.c ovl: use pr_fmt auto generate prefix 2020-01-22 20:11:41 +01:00
file.c ovl: use ovl_inode_lock in ovl_llseek() 2020-01-22 20:11:41 +01:00
inode.c ovl: use ovl_inode_lock in ovl_llseek() 2020-01-22 20:11:41 +01:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
namei.c ovl: use pr_fmt auto generate prefix 2020-01-22 20:11:41 +01:00
overlayfs.h ovl: use pr_fmt auto generate prefix 2020-01-22 20:11:41 +01:00
ovl_entry.h ovl: fix lookup failure on multi lower squashfs 2019-12-10 16:00:55 +01:00
readdir.c ovl: use pr_fmt auto generate prefix 2020-01-22 20:11:41 +01:00
super.c ovl: use pr_fmt auto generate prefix 2020-01-22 20:11:41 +01:00
util.c ovl: use pr_fmt auto generate prefix 2020-01-22 20:11:41 +01:00