Commit 5d132cf
Al Viro
setup_mnt(): primitive for connecting a mount to filesystem
Take the identical logics in vfs_create_mount() and clone_mnt() into
a new helper that takes an empty struct mount and attaches it to
given dentry (sub)tree.
Should be called once in the lifetime of every mount, prior to making
it visible in any data structures.
After that point ->mnt_root and ->mnt_sb never change; ->mnt_root
is a counting reference to dentry and ->mnt_sb - an active reference
to superblock.
Mount remains associated with that dentry tree all the way until
the call of cleanup_mnt(), when the refcount eventually drops
to zero.
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>1 parent 7f954a6 commit 5d132cf
1 file changed
Lines changed: 17 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1196 | 1196 | | |
1197 | 1197 | | |
1198 | 1198 | | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
1199 | 1214 | | |
1200 | 1215 | | |
1201 | 1216 | | |
| |||
1219 | 1234 | | |
1220 | 1235 | | |
1221 | 1236 | | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
| 1237 | + | |
1227 | 1238 | | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | 1239 | | |
1232 | 1240 | | |
1233 | 1241 | | |
| |||
1285 | 1293 | | |
1286 | 1294 | | |
1287 | 1295 | | |
1288 | | - | |
1289 | 1296 | | |
1290 | 1297 | | |
1291 | 1298 | | |
| |||
1310 | 1317 | | |
1311 | 1318 | | |
1312 | 1319 | | |
1313 | | - | |
1314 | 1320 | | |
1315 | 1321 | | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
| 1322 | + | |
1323 | 1323 | | |
1324 | 1324 | | |
1325 | 1325 | | |
| |||
0 commit comments