Hi, Please see attached patch:
http://leaf.dragonflybsd.org/~tuxillo/archive/patches/tmpfs_chflags01.diff The code that was removed seems duplicated to me as vop_helper_setattr_flags function already does the trick. Also SF_NOCACHE is set on VOP_MOUNT, see http://bxr.su/DragonFly/sys/vfs/tmpfs/tmpfs_vfsops.c#267. There is no need for a check to VROOT in every single chflags call either IMO. The patch has been tested with schg/noschg: -rw-r--r-- 1 root wheel schg 0 Jun 29 13:05 e vkernel64 # rm e override rw-r--r-- root/wheel schg for e? y rm: e: Operation not permitted vkernel64 # chflags noschg e vkernel64 # rm e Cheers, Antonio Huete
