Commit d47059d
hfsplus: extract hidden directory search into a helper function
In hfsplus_fill_super(), the process of looking up the hidden directory
involves initializing a catalog search, building a search key, reading
the b-tree record, and releasing the search data.
Currently, this logic is open-coded directly within the main superblock
initialization routine. This makes hfsplus_fill_super() quite lengthy
and its error handling paths less straightforward.
Extract the hidden directory search sequence into a new helper function,
hfsplus_get_hidden_dir_entry(). This improves overall code readability,
cleanly encapsulates the hfs_find_data lifecycle, and simplifies the
error exits in hfsplus_fill_super().
Signed-off-by: Zilin Guan <[email protected]>
Reviewed-by: Viacheslav Dubeyko <[email protected]>
Tested-by: Viacheslav Dubeyko <[email protected]>
Signed-off-by: Viacheslav Dubeyko <[email protected]>1 parent 90c500e commit d47059d
1 file changed
Lines changed: 32 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
427 | 451 | | |
428 | 452 | | |
429 | 453 | | |
430 | 454 | | |
431 | 455 | | |
432 | | - | |
433 | 456 | | |
434 | 457 | | |
435 | 458 | | |
| |||
565 | 588 | | |
566 | 589 | | |
567 | 590 | | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
574 | 597 | | |
575 | | - | |
576 | | - | |
577 | | - | |
| 598 | + | |
578 | 599 | | |
579 | 600 | | |
580 | 601 | | |
| |||
585 | 606 | | |
586 | 607 | | |
587 | 608 | | |
588 | | - | |
589 | | - | |
| 609 | + | |
590 | 610 | | |
591 | 611 | | |
592 | 612 | | |
| |||
0 commit comments