linux/fs/overlayfs
Miklos Szeredi 4473d8ccad ovl: lookup whiteouts outside iterate_dir()
commit cdb6727958 upstream.

If jffs2 can deadlock on overlayfs readdir because it takes the same lock
on ->iterate() as in ->lookup().

Fix by moving whiteout checking outside iterate_dir().  Optimized by
collecting potential whiteouts (DT_CHR) in a temporary list and if
non-empty iterating throug these and checking for a 0/0 chardev.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Fixes: 49c21e1cac ("ovl: check whiteout while reading directory")
Reported-by: Roman Yeryomin <leroi.lists@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2015-08-03 09:29:16 -07:00
..
copy_up.c ovl: mount read-only if workdir can't be created 2015-05-19 14:30:12 +02:00
dir.c ovl: mount read-only if workdir can't be created 2015-05-19 14:30:12 +02:00
inode.c ovl: Use macros to present ovl_xattr 2014-12-13 00:59:52 +01:00
Kconfig ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
Makefile ovl: rename filesystem type to "overlay" 2014-11-20 16:39:59 +01:00
overlayfs.h ovl: Use macros to present ovl_xattr 2014-12-13 00:59:52 +01:00
readdir.c ovl: lookup whiteouts outside iterate_dir() 2015-08-03 09:29:16 -07:00
super.c ovl: mount read-only if workdir can't be created 2015-05-19 14:30:12 +02:00