summaryrefslogtreecommitdiff
path: root/fs/erofs
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@linux.alibaba.com>2025-02-25 11:39:34 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:44:09 +0200
commit484ccd48564b057b21f48e1a830fd635205cc1d9 (patch)
treedc210cf6ee45261b74953f1fdcde3b102fecb26e /fs/erofs
parent274817805e64374fc8efc8577c88fb1a81e5b515 (diff)
downloadlinux-484ccd48564b057b21f48e1a830fd635205cc1d9.tar.gz
linux-484ccd48564b057b21f48e1a830fd635205cc1d9.tar.bz2
linux-484ccd48564b057b21f48e1a830fd635205cc1d9.zip
erofs: allow 16-byte volume name again
[ Upstream commit 579450277780159b8ba94a08b2f1d1da2002aec5 ] Actually, volume name doesn't need to include the NIL terminator if the string length matches the on-disk field size as mentioned in [1]. I tend to relax it together with the upcoming 48-bit block addressing (or stable kernels which backport this fix) so that we could have a chance to record a 16-byte volume name like ext4. Since in-memory `volume_name` has no user, just get rid of the unneeded check for now. `sbi->uuid` is useless and avoid it too. [1] https://lore.kernel.org/r/96efe46b-dcce-4490-bba1-a0b00932d1cc@linux.alibaba.com Fixes: a64d9493f587 ("staging: erofs: refuse to mount images with malformed volume name") Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20250225033934.2542635-1-hsiangkao@linux.alibaba.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/erofs')
-rw-r--r--fs/erofs/internal.h2
-rw-r--r--fs/erofs/super.c8
2 files changed, 0 insertions, 10 deletions
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
index 686d835eb533..efd25f3101f1 100644
--- a/fs/erofs/internal.h
+++ b/fs/erofs/internal.h
@@ -152,8 +152,6 @@ struct erofs_sb_info {
/* used for statfs, f_files - f_favail */
u64 inos;
- u8 uuid[16]; /* 128-bit uuid for volume */
- u8 volume_name[16]; /* volume name */
u32 feature_compat;
u32 feature_incompat;
diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 827b62665649..9f2bce5af9c8 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -317,14 +317,6 @@ static int erofs_read_superblock(struct super_block *sb)
super_set_uuid(sb, (void *)dsb->uuid, sizeof(dsb->uuid));
- ret = strscpy(sbi->volume_name, dsb->volume_name,
- sizeof(dsb->volume_name));
- if (ret < 0) { /* -E2BIG */
- erofs_err(sb, "bad volume name without NIL terminator");
- ret = -EFSCORRUPTED;
- goto out;
- }
-
/* parse on-disk compression configurations */
ret = z_erofs_parse_cfgs(sb, dsb);
if (ret < 0)