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

Thorsten Blum blum at kernel.org
Tue Nov 17 16:28:46 PST 2026


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.

Thorsten Blum (4):
  fscrypt: Add FSTR() helper macro
  btrfs: Use FSTR() for the "default" name
  f2fs: Use FSTR() in f2fs_do_make_empty_dir()
  ubifs: Use FSTR() in ubifs_xattr_{set,get,remove}()

 fs/btrfs/inode.c        | 3 +--
 fs/btrfs/ioctl.c        | 3 +--
 fs/btrfs/super.c        | 3 +--
 fs/f2fs/dir.c           | 7 ++-----
 fs/ubifs/xattr.c        | 6 +++---
 include/linux/fscrypt.h | 1 +
 6 files changed, 9 insertions(+), 14 deletions(-)



More information about the linux-mtd mailing list