1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

tmpfs: remove duplicate flags check in tmpfs_rmdir

MFC after:	2 weeks
Reviewed By:	asomers
Differential Revision: https://reviews.freebsd.org/D47100
This commit is contained in:
Claudiu 2024-10-13 14:00:42 -06:00 committed by Alan Somers
parent c0e0e530ce
commit ec22e705c2

View File

@ -1344,6 +1344,7 @@ tmpfs_rmdir(struct vop_rmdir_args *v)
goto out;
}
/* Check flags to see if we are allowed to remove the directory. */
if ((dnode->tn_flags & APPEND)
|| (node->tn_flags & (NOUNLINK | IMMUTABLE | APPEND))) {
error = EPERM;
@ -1361,13 +1362,6 @@ tmpfs_rmdir(struct vop_rmdir_args *v)
cnp->cn_nameptr,
cnp->cn_namelen));
/* Check flags to see if we are allowed to remove the directory. */
if ((dnode->tn_flags & APPEND) != 0 ||
(node->tn_flags & (NOUNLINK | IMMUTABLE | APPEND)) != 0) {
error = EPERM;
goto out;
}
/* Detach the directory entry from the directory (dnode). */
tmpfs_dir_detach(dvp, de);