DragonFly BSD
DragonFly kernel List (threaded) for 2013-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Remove duplicated code in tmpfs_chflags()


From: Antonio Huete Jimenez <ahuete.devel@xxxxxxxxx>
Date: Sat, 29 Jun 2013 13:28:35 +0200

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]