fs: make unlazy_walk() error handling consistent
authorJens Axboe <axboe@kernel.dk>
Thu, 17 Dec 2020 16:19:08 +0000 (09:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Mar 2021 11:34:11 +0000 (12:34 +0100)
commit01fd84a436b501243a8031d19041efcd7fe80ba9
treeeca5195687b9ac49ad8031c9d20f670b8f13122a
parented51ffe96abcdd5c39fb55ac0e1b2242b097d7e4
fs: make unlazy_walk() error handling consistent

[ Upstream commit e36cffed20a324e116f329a94061ae30dd26fb51 ]

Most callers check for non-zero return, and assume it's -ECHILD (which
it always will be). One caller uses the actual error return. Clean this
up and make it fully consistent, by having unlazy_walk() return a bool
instead. Rename it to try_to_unlazy() and return true on success, and
failure on error. That's easier to read.

No functional changes in this patch.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/namei.c