aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r--fs/ubifs/super.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index ea493e6f2652..1d511569c035 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -569,16 +569,16 @@ static int init_constants_early(struct ubifs_info *c)
569 c->leb_overhead = c->leb_size % UBIFS_MAX_DATA_NODE_SZ; 569 c->leb_overhead = c->leb_size % UBIFS_MAX_DATA_NODE_SZ;
570 570
571 /* Buffer size for bulk-reads */ 571 /* Buffer size for bulk-reads */
572 c->bulk_read_buf_size = UBIFS_MAX_BULK_READ * UBIFS_MAX_DATA_NODE_SZ; 572 c->max_bu_buf_len = UBIFS_MAX_BULK_READ * UBIFS_MAX_DATA_NODE_SZ;
573 if (c->bulk_read_buf_size > c->leb_size) 573 if (c->max_bu_buf_len > c->leb_size)
574 c->bulk_read_buf_size = c->leb_size; 574 c->max_bu_buf_len = c->leb_size;
575 if (c->bulk_read_buf_size > UBIFS_KMALLOC_OK) { 575 if (c->max_bu_buf_len > UBIFS_KMALLOC_OK) {
576 /* Check if we can kmalloc that much */ 576 /* Check if we can kmalloc that much */
577 void *try = kmalloc(c->bulk_read_buf_size, 577 void *try = kmalloc(c->max_bu_buf_len,
578 GFP_KERNEL | __GFP_NOWARN); 578 GFP_KERNEL | __GFP_NOWARN);
579 kfree(try); 579 kfree(try);
580 if (!try) 580 if (!try)
581 c->bulk_read_buf_size = UBIFS_KMALLOC_OK; 581 c->max_bu_buf_len = UBIFS_KMALLOC_OK;
582 } 582 }
583 return 0; 583 return 0;
584} 584}