diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-06-22 23:03:07 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-06-22 23:03:07 +0000 |
commit | 45b727fb419518245f31034506b46523e0be97ce (patch) | |
tree | affd6b23d626ba835f70f989f610ee811a3ab062 /sys/kern/vfs_syscalls.c | |
parent | eb83dc490d02342ca04aeac31e6a2333e01018fd (diff) | |
download | FreeBSD-src-45b727fb419518245f31034506b46523e0be97ce.zip FreeBSD-src-45b727fb419518245f31034506b46523e0be97ce.tar.gz |
Prefer the vop_rmextattr() vnode operation for removing extended
attributes from objects over vop_setextattr() with a NULL uio; if
the file system doesn't support the vop_rmextattr() method, fall
back to the vop_setextattr() method.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 3b45d43..000fa0a 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4245,8 +4245,10 @@ extattr_delete_vp(struct vnode *vp, int attrnamespace, const char *attrname, goto done; #endif - error = VOP_SETEXTATTR(vp, attrnamespace, attrname, NULL, td->td_ucred, - td); + error = VOP_RMEXTATTR(vp, attrnamespace, attrname, td->td_ucred, td); + if (error == EOPNOTSUPP) + error = VOP_SETEXTATTR(vp, attrnamespace, attrname, NULL, + td->td_ucred, td); #ifdef MAC done: #endif |