diff options
Diffstat (limited to 'sys/gnu/fs/ext2fs/ext2_vfsops.c')
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 7abcb7e..3a362a4 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -954,8 +954,10 @@ ext2_vget(mp, ino, flags, vpp) struct cdev *dev; int i, error; int used_blocks; + struct thread *td; - error = vfs_hash_get(mp, ino, flags, curthread, vpp, NULL, NULL); + td = curthread; + error = vfs_hash_get(mp, ino, flags, td, vpp, NULL, NULL); if (error || *vpp != NULL) return (error); @@ -982,7 +984,14 @@ ext2_vget(mp, ino, flags, vpp) ip->i_e2fs = fs = ump->um_e2fs; ip->i_number = ino; - error = vfs_hash_insert(vp, ino, flags, curthread, vpp, NULL, NULL); + lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL, td); + error = insmntque(vp, mp); + if (error != 0) { + free(ip, M_EXT2NODE); + *vpp = NULL; + return (error); + } + error = vfs_hash_insert(vp, ino, flags, td, vpp, NULL, NULL); if (error || *vpp != NULL) return (error); |