Commit 37c90c5
erofs: register fscache context for primary data blob
Registers fscache context for primary data blob. Also move the
initialization of s_op and related fields forward, since anonymous
inode will be allocated under the super block when registering the
fscache context.
Something worth mentioning about the cleanup routine.
1. The fscache context will instantiate anonymous inodes under the super
block. Release these anonymous inodes when .put_super() is called, or
we'll get "VFS: Busy inodes after unmount." warning.
2. The fscache context is initialized prior to the root inode. If
.kill_sb() is called when mount failed, .put_super() won't be called
when root inode has not been initialized yet. Thus .kill_sb() shall
also contain the cleanup routine.
Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220425122143.56815-16-jefflexu@linux.alibaba.com
Acked-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>1 parent ec00b5e commit 37c90c5
2 files changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
631 | 634 | | |
632 | 635 | | |
633 | 636 | | |
| |||
645 | 648 | | |
646 | 649 | | |
647 | 650 | | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
648 | 656 | | |
649 | 657 | | |
650 | 658 | | |
| |||
667 | 675 | | |
668 | 676 | | |
669 | 677 | | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | 678 | | |
674 | | - | |
| 679 | + | |
675 | 680 | | |
676 | 681 | | |
677 | 682 | | |
| |||
812 | 817 | | |
813 | 818 | | |
814 | 819 | | |
| 820 | + | |
815 | 821 | | |
816 | 822 | | |
817 | 823 | | |
| |||
830 | 836 | | |
831 | 837 | | |
832 | 838 | | |
| 839 | + | |
833 | 840 | | |
834 | 841 | | |
835 | 842 | | |
| |||
0 commit comments