linux/fs/overlayfs
Al Viro 25885a35a7 Change calling conventions for filldir_t
filldir_t instances (directory iterators callbacks) used to return 0 for
"OK, keep going" or -E... for "stop".  Note that it's *NOT* how the
error values are reported - the rules for those are callback-dependent
and ->iterate{,_shared}() instances only care about zero vs. non-zero
(look at emit_dir() and friends).

So let's just return bool ("should we keep going?") - it's less confusing
that way.  The choice between "true means keep going" and "true means
stop" is bikesheddable; we have two groups of callbacks -
	do something for everything in directory, until we run into problem
and
	find an entry in directory and do something to it.

The former tended to use 0/-E... conventions - -E<something> on failure.
The latter tended to use 0/1, 1 being "stop, we are done".
The callers treated anything non-zero as "stop", ignoring which
non-zero value did they get.

"true means stop" would be more natural for the second group; "true
means keep going" - for the first one.  I tried both variants and
the things like
	if allocation failed
		something = -ENOMEM;
		return true;
just looked unnatural and asking for trouble.

[folded suggestion from Matthew Wilcox <willy@infradead.org>]
Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2022-08-17 17:25:04 -04:00
..
copy_up.c Saner handling of "lseek should fail with ESPIPE" - gets rid of 2022-08-03 11:35:20 -07:00
dir.c ovl: use ovl_copy_{real,upper}attr() wrappers 2022-04-28 16:31:12 +02:00
export.c ovl: drop WARN_ON() dentry is NULL in ovl_encode_fh() 2022-07-28 15:00:57 +02:00
file.c overlayfs update for 5.19 2022-05-30 11:19:16 -07:00
inode.c overlayfs update for 6.0 2022-08-08 11:03:11 -07:00
Kconfig
Makefile
namei.c ovl: fix spelling mistakes 2022-08-02 15:41:10 +02:00
overlayfs.h overlayfs update for 6.0 2022-08-08 11:03:11 -07:00
ovl_entry.h ovl: support idmapped layers 2022-04-28 16:31:12 +02:00
readdir.c Change calling conventions for filldir_t 2022-08-17 17:25:04 -04:00
super.c overlayfs update for 6.0 2022-08-08 11:03:11 -07:00
util.c ovl: handle idmappings in layer open helpers 2022-04-28 16:31:12 +02:00