Remove duplicated code in tmpfs_chflags()

Antonio Huete Jimenez ahuete.devel at
Sat Jun 29 04:28:35 PDT 2013


Please see attached patch:

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 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

Antonio Huete

More information about the Kernel mailing list