diff options
| author | Tor Egge <tegge@FreeBSD.org> | 2007-03-13 01:50:27 +0000 |
|---|---|---|
| committer | Tor Egge <tegge@FreeBSD.org> | 2007-03-13 01:50:27 +0000 |
| commit | 61b9d89ff0a7d4c7bcea7fd083db918e16de41a5 (patch) | |
| tree | 6dca3f2c99e6dcb6402e1486118e56eb8d5e871b /sys/gnu | |
| parent | 06e83c7e86824a2bf64e797dca3cf56e60ac3e85 (diff) | |
Notes
Diffstat (limited to 'sys/gnu')
| -rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 13 | ||||
| -rw-r--r-- | sys/gnu/fs/reiserfs/reiserfs_inode.c | 8 | ||||
| -rw-r--r-- | sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c | 5 |
3 files changed, 24 insertions, 2 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 7abcb7e62d00..3a362a49ddb8 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); diff --git a/sys/gnu/fs/reiserfs/reiserfs_inode.c b/sys/gnu/fs/reiserfs/reiserfs_inode.c index ece4a75d3251..3eddd840c024 100644 --- a/sys/gnu/fs/reiserfs/reiserfs_inode.c +++ b/sys/gnu/fs/reiserfs/reiserfs_inode.c @@ -815,6 +815,14 @@ reiserfs_iget( lockmgr(vp->v_vnlock, LK_EXCLUSIVE, (struct mtx *)0, td); #endif + lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL, td); + error = insmntque(vp, mp); + if (error != 0) { + free(ip, M_REISERFSNODE); + *vpp = NULL; + reiserfs_log(LOG_DEBUG, "insmntque FAILED\n"); + return (error); + } error = vfs_hash_insert(vp, key->on_disk_key.k_objectid, flags, td, vpp, NULL, NULL); if (error || *vpp != NULL) diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c b/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c index de5284c5747f..7145b9497a4b 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c @@ -391,6 +391,11 @@ xfs_vn_allocate(xfs_mount_t *mp, xfs_inode_t *ip, struct xfs_vnode **vpp) vp->v_vnlock->lk_flags |= LK_CANRECURSE; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curthread); + error = insmntque(vp, XVFSTOMNT(XFS_MTOVFS(mp))); + if (error != 0) { + kmem_free(vdata, sizeof(*vdata)); + return (error); + } vp->v_data = (void *)vdata; vdata->v_number= 0; |
