Skip to contentSkip to conversation

bcachefs: Remove unnecessary byte allocation

PATCH RESEND Applied Thorsten Blum 2 participants 2 messages Mar 8, 2025 – Mar 9, 2025

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 bcachefs: Remove unnecessary byte allocation

The extra byte is not used - remove it.

---
 fs/bcachefs/fs-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/bcachefs/fs-ioctl.c +1 -1
index d9f1a7c09e85..9761a365552a 100644
@@ -244,7 +244,7 @@ static int bch2_ioc_reinherit_attrs(struct bch_fs *c,
 	int ret = 0;
 	subvol_inum inum;
 
-	kname = kmalloc(BCH_NAME_MAX + 1, GFP_KERNEL);
+	kname = kmalloc(BCH_NAME_MAX, GFP_KERNEL);
 	if (!kname)
 		return -ENOMEM;
 
Signature · 1 line
2.48.1
#1 lore raw
Quoted 3 lines · Thorsten Blum

The extra byte is not used - remove it.

applied

Quoted 20 lines
---
 fs/bcachefs/fs-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/bcachefs/fs-ioctl.c +1 -1
index d9f1a7c09e85..9761a365552a 100644
@@ -244,7 +244,7 @@ static int bch2_ioc_reinherit_attrs(struct bch_fs *c,
 	int ret = 0;
 	subvol_inum inum;
 
-	kname = kmalloc(BCH_NAME_MAX + 1, GFP_KERNEL);
+	kname = kmalloc(BCH_NAME_MAX, GFP_KERNEL);
 	if (!kname)
 		return -ENOMEM;
 
Signature · 1 line
2.48.1