summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/ufs/ufs_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/fs/ufs/ufs_inode.c')
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_inode.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/ufs/ufs_inode.c b/usr/src/uts/common/fs/ufs/ufs_inode.c
index 76db353cca..09f0d70648 100644
--- a/usr/src/uts/common/fs/ufs/ufs_inode.c
+++ b/usr/src/uts/common/fs/ufs/ufs_inode.c
@@ -622,9 +622,15 @@ again:
}
/*
- * finish initializing the vnode
+ * Finish initializing the vnode, special handling for shadow inodes
+ * because IFTOVT() will produce a v_type of VNON which is not what we
+ * want, set v_type to VREG explicitly in that case.
*/
- vp->v_type = IFTOVT((mode_t)ip->i_mode);
+ if (ftype == IFSHAD) {
+ vp->v_type = VREG;
+ } else {
+ vp->v_type = IFTOVT((mode_t)ip->i_mode);
+ }
ufs_reset_vnode(vp);