Repository navigation
Commit 74dbbdd
Al Viro
New helper: deactivate_locked_super()
Does equivalent of up_write(&s->s_umount); deactivate_super(s);
However, it does not does not unlock it until it's all over.
As the result, it's safe to use to dispose of new superblock on ->get_sb()
failure exits - nobody will see the sucker until it's all over.
Equivalent using up_write/deactivate_super is safe for that purpose
if superblock is either safe to use or has NULL ->s_root when we unlock.
Normally filesystems take the required precautions, but
a) we do have bugs in that area in some of them.
b) up_write/deactivate_super sequence is extremely common,
so the helper makes sense anyway.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>1 parent 677c9b2 commit 74dbbdd
2 files changed
Lines changed: 35 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
210 | 238 | | |
211 | 239 | | |
212 | 240 | | |
| |||
797 | 825 | | |
798 | 826 | | |
799 | 827 | | |
800 | | - | |
801 | | - | |
| 828 | + | |
802 | 829 | | |
803 | 830 | | |
804 | 831 | | |
| |||
854 | 881 | | |
855 | 882 | | |
856 | 883 | | |
857 | | - | |
858 | | - | |
| 884 | + | |
859 | 885 | | |
860 | 886 | | |
861 | 887 | | |
| |||
870 | 896 | | |
871 | 897 | | |
872 | 898 | | |
873 | | - | |
874 | | - | |
| 899 | + | |
875 | 900 | | |
876 | 901 | | |
877 | 902 | | |
| |||
921 | 946 | | |
922 | 947 | | |
923 | 948 | | |
924 | | - | |
925 | | - | |
| 949 | + | |
926 | 950 | | |
927 | 951 | | |
928 | 952 | | |
| |||
952 | 976 | | |
953 | 977 | | |
954 | 978 | | |
955 | | - | |
956 | | - | |
| 979 | + | |
957 | 980 | | |
958 | 981 | | |
959 | 982 | | |
| |||
1006 | 1029 | | |
1007 | 1030 | | |
1008 | 1031 | | |
1009 | | - | |
1010 | | - | |
| 1032 | + | |
1011 | 1033 | | |
1012 | 1034 | | |
1013 | 1035 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1775 | 1775 | | |
1776 | 1776 | | |
1777 | 1777 | | |
| 1778 | + | |
1778 | 1779 | | |
1779 | 1780 | | |
1780 | 1781 | | |
| |||
0 commit comments