Commit 9aa6543
nvdimm-btt: simplify code with the scope based resource management
Use the scope based resource management (defined in
linux/cleanup.h) to automate resource lifetime
control on struct btt_sb *super in discover_arenas().
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20231214083919.22218-1-dinghao.liu@zju.edu.cn
Signed-off-by: Ira Weiny <ira.weiny@intel.com>1 parent deb369e commit 9aa6543
1 file changed
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
847 | 848 | | |
848 | 849 | | |
849 | 850 | | |
850 | | - | |
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
856 | | - | |
| 856 | + | |
857 | 857 | | |
858 | 858 | | |
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
| 863 | + | |
| 864 | + | |
867 | 865 | | |
868 | 866 | | |
869 | 867 | | |
| |||
919 | 917 | | |
920 | 918 | | |
921 | 919 | | |
922 | | - | |
923 | 920 | | |
924 | 921 | | |
925 | 922 | | |
926 | 923 | | |
927 | 924 | | |
928 | | - | |
929 | | - | |
930 | 925 | | |
931 | 926 | | |
932 | 927 | | |
| |||
0 commit comments