diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/fs/tmpfs/tmp_vnops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/tmpfs/tmp_vnops.c b/usr/src/uts/common/fs/tmpfs/tmp_vnops.c index 3c251df0cc..82195e6742 100644 --- a/usr/src/uts/common/fs/tmpfs/tmp_vnops.c +++ b/usr/src/uts/common/fs/tmpfs/tmp_vnops.c @@ -27,6 +27,7 @@ /* * Copyright (c) 2015, Joyent, Inc. All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + * Copyright 2016 RackTop Systems. */ #include <sys/types.h> @@ -1104,7 +1105,8 @@ tmp_remove( if (tp->tn_type != VDIR || (error = secpolicy_fs_linkdir(cred, dvp->v_vfsp)) == 0) - error = tdirdelete(parent, tp, nm, DR_REMOVE, cred); + error = tdirdelete(parent, tp, nm, tp->tn_type == VDIR ? + DR_RMDIR : DR_REMOVE, cred); rw_exit(&tp->tn_rwlock); rw_exit(&parent->tn_rwlock); |