Re: [PATCH 0/4] fscrypt: Add FSTR() helper macro and convert initializers

From: Eric Biggers

Date: Wed Nov 18 2026 - 00:02:08 EST


On Wed, Nov 18, 2026 at 01:28:46AM +0100, Thorsten Blum wrote:
> Similar to QSTR(), add FSTR() to initialize struct fscrypt_str from a
> NUL-terminated string without specifying its length.
>
> Use the helper for 8 initializers in btrfs, F2FS, and UBIFS, replacing
> hard-coded lengths and explicit strlen() calls.

It would be worth stating explicitly that the new strlen() calls are
constant-folded in most configurations (if they indeed are).

- Eric