Re: [PATCH] ovl: restrict casefold consistency checks to directories
From: André Almeida
Date: Fri Oct 30 2026 - 14:49:13 EST
Em 28/10/2026 12:40, Hungyu Lin escreveu:
ovl_lookup_single() compares every positive child's casefold flag with
that of the overlay. On casefolded ext4, regular files do not inherit
the casefold flag from their parent directory. Looking up an existing
regular file on a casefolded overlay therefore fails with EREMOTE.
Symlinks, FIFOs and whiteouts are rejected by the same check.
Restrict the child consistency check to directories, along with the
corresponding assertion in ovl_get_inode(). This allows nondirectory
objects to be looked up without rejecting them or warning about their
flags, while directories with inconsistent casefold settings are still
rejected.
Fixes: 16754d61dc69 ("ovl: Support mounting case-insensitive enabled layers")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Hungyu Lin <dennylin0707@xxxxxxxxx>
Reviewed-by: André Almeida <andrealmeid@xxxxxxxxxx>