Commit af7633d
committed
fs/dir: reuse close_mountpoint/close_pseudodir helpers in dir_close
dir_close() open-coded the same mountpoint and pseudodir cleanup
sequences that already exist as the close_mountpoint() and
close_pseudodir() helpers (used by closedir()). Switch dir_close()
to call those helpers so the two close paths share identical logic
and future fixes only need to be applied in one place.
The helpers do not propagate the underlying mops->closedir() return
value, so dir_close() now always returns OK; this matches the
behaviour of closedir(), which has used the helpers since they were
introduced and never surfaced that error to callers either.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>1 parent 64ca343 commit af7633d
1 file changed
Lines changed: 3 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
416 | 415 | | |
417 | 416 | | |
418 | 417 | | |
| |||
425 | 424 | | |
426 | 425 | | |
427 | 426 | | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
| 427 | + | |
437 | 428 | | |
438 | 429 | | |
439 | 430 | | |
440 | 431 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
| 432 | + | |
455 | 433 | | |
456 | 434 | | |
457 | 435 | | |
458 | 436 | | |
459 | 437 | | |
460 | 438 | | |
461 | | - | |
| 439 | + | |
462 | 440 | | |
463 | 441 | | |
464 | 442 | | |
| |||
0 commit comments