The calling code actually handles -ECHILD, so this BUG_ON can be converted to WARN_ON_ONCE. Signed-off-by: Bernd Schubert <bschubert@xxxxxxx> Cc: Christian Brauner <brauner@xxxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Amir Goldstein <amir73il@xxxxxxxxx> Cc: Dharmendra Singh <dsingh@xxxxxxx> Cc: Miklos Szeredi <miklos@xxxxxxxxxx> Cc: linux-fsdevel@xxxxxxxxxxxxxxx --- This relates to the fuse atomic open patches and their vfs revalidate part. Amir had annotated that these patches had a BUG_ON, which I had only taken as a few lines below the there was the BUG_ON replaced in this patch. --- fs/namei.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/namei.c b/fs/namei.c index 94565bd7e73f..9ff8590ea0a7 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3536,7 +3536,8 @@ static const char *open_last_lookups(struct nameidata *nd, if (likely(dentry)) goto finish_lookup; - BUG_ON(nd->flags & LOOKUP_RCU); + if (WARN_ON_ONCE(nd->flags & LOOKUP_RCU)) + return ERR_PTR(-ECHILD); } else { /* create side of things */ if (nd->flags & LOOKUP_RCU) { -- 2.39.2