* Lookup a mount point by filesystem identifier. */
| 834 | * Lookup a mount point by filesystem identifier. |
| 835 | */ |
| 836 | struct mount * |
| 837 | vfs_getvfs(fsid_t *fsid) |
| 838 | { |
| 839 | struct mount *mp; |
| 840 | |
| 841 | CTR2(KTR_VFS, "%s: fsid %p", __func__, fsid); |
| 842 | mtx_lock(&mountlist_mtx); |
| 843 | TAILQ_FOREACH(mp, &mountlist, mnt_list) { |
| 844 | if (fsidcmp(&mp->mnt_stat.f_fsid, fsid) == 0) { |
| 845 | vfs_ref(mp); |
| 846 | mtx_unlock(&mountlist_mtx); |
| 847 | return (mp); |
| 848 | } |
| 849 | } |
| 850 | mtx_unlock(&mountlist_mtx); |
| 851 | CTR2(KTR_VFS, "%s: lookup failed for %p id", __func__, fsid); |
| 852 | return ((struct mount *) 0); |
| 853 | } |
| 854 | |
| 855 | /* |
| 856 | * Lookup a mount point by filesystem identifier, busying it before |
no test coverage detected