Should VOP_RENAME fail if tdvp has an IMMUTABLE flag set?

From: Alan Somers <asomers_at_freebsd.org>
Date: Wed, 16 Oct 2024 22:11:28 UTC
ufs_rename and ext2_rename will both fail with EPERM if the
destination directory has an APPEND file flag set.  So will
tmpfs_rename.  However, tmpfs_rename will also fail if the destination
directory has an IMMUTABLE flag set.  That's inconsistent.  It seems
to me that tmpfs's behavior is more reasonable.  Does anybody know why
ufs and ext2 have always allowed rename even if the destination
directory is IMMUTABLE?  For that matter, does anybody know the
rationale for preventing it if the destination is APPEND?
Intuitively, I would think that an APPEND-only directory would allow
new entries.  And I don't see any checks for APPEND in ufs_mkdir,
ufs_link, or ufs_create.

-Alan