File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -438,6 +438,11 @@ static int fs_path_ensure_buf(struct fs_path *p, int len)
438
438
path_len = p -> end - p -> start ;
439
439
old_buf_len = p -> buf_len ;
440
440
441
+ /*
442
+ * Allocate to the next largest kmalloc bucket size, to let
443
+ * the fast path happen most of the time.
444
+ */
445
+ len = kmalloc_size_roundup (len );
441
446
/*
442
447
* First time the inline_buf does not suffice
443
448
*/
@@ -451,11 +456,7 @@ static int fs_path_ensure_buf(struct fs_path *p, int len)
451
456
if (!tmp_buf )
452
457
return - ENOMEM ;
453
458
p -> buf = tmp_buf ;
454
- /*
455
- * The real size of the buffer is bigger, this will let the fast path
456
- * happen most of the time
457
- */
458
- p -> buf_len = ksize (p -> buf );
459
+ p -> buf_len = len ;
459
460
460
461
if (p -> reversed ) {
461
462
tmp_buf = p -> buf + old_buf_len - path_len - 1 ;
You can’t perform that action at this time.
0 commit comments