Skip to content

Commit 7c83cc9

Browse files
Artem BityutskiyArtem Bityutskiy
authored andcommitted
UBIFS: save 128KiB or more RAM
When debugging is enabled, we allocate a buffer of PEB size for various debugging purposes. However, now all users of this buffer are gone and we can safely remove it and save 128KiB or more RAM. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
1 parent f5cf319 commit 7c83cc9

2 files changed

Lines changed: 0 additions & 11 deletions

File tree

‎fs/ubifs/debug.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,16 +2701,8 @@ int ubifs_debugging_init(struct ubifs_info *c)
27012701
if (!c->dbg)
27022702
return -ENOMEM;
27032703

2704-
c->dbg->buf = vmalloc(c->leb_size);
2705-
if (!c->dbg->buf)
2706-
goto out;
2707-
27082704
failure_mode_init(c);
27092705
return 0;
2710-
2711-
out:
2712-
kfree(c->dbg);
2713-
return -ENOMEM;
27142706
}
27152707

27162708
/**
@@ -2720,7 +2712,6 @@ int ubifs_debugging_init(struct ubifs_info *c)
27202712
void ubifs_debugging_exit(struct ubifs_info *c)
27212713
{
27222714
failure_mode_exit(c);
2723-
vfree(c->dbg->buf);
27242715
kfree(c->dbg);
27252716
}
27262717

‎fs/ubifs/debug.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
/**
2929
* ubifs_debug_info - per-FS debugging information.
30-
* @buf: a buffer of LEB size, used for various purposes
3130
* @old_zroot: old index root - used by 'dbg_check_old_index()'
3231
* @old_zroot_level: old index root level - used by 'dbg_check_old_index()'
3332
* @old_zroot_sqnum: old index root sqnum - used by 'dbg_check_old_index()'
@@ -54,7 +53,6 @@
5453
* dfs_dump_tnc: "dump TNC" debugfs knob
5554
*/
5655
struct ubifs_debug_info {
57-
void *buf;
5856
struct ubifs_zbranch old_zroot;
5957
int old_zroot_level;
6058
unsigned long long old_zroot_sqnum;

0 commit comments

Comments
 (0)