summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorbouyer <bouyer@NetBSD.org>2023-03-24 12:22:52 +0000
committerbouyer <bouyer@NetBSD.org>2023-03-24 12:22:52 +0000
commitfeaf890f6ddfbb6f836e8501cebb3e83da2129da (patch)
tree3a744bf9024c42cc56d471f269088b2675be95b3 /sys
parent2b37664c43822ac0110686e7b3b12f72f5cd577a (diff)
extattr_set_vp(): properly handle XATTR_REPLACE flags, FFSv2ea will return
ENOATTR, not ENODATA if the attribute is missing. Makes glusterfs 10 run on a FFSv2ea file system.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_xattr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_xattr.c b/sys/kern/vfs_xattr.c
index 1c142ee2a5c..68324473727 100644
--- a/sys/kern/vfs_xattr.c
+++ b/sys/kern/vfs_xattr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_xattr.c,v 1.38 2022/10/25 23:22:36 riastradh Exp $ */
+/* $NetBSD: vfs_xattr.c,v 1.39 2023/03/24 12:22:52 bouyer Exp $ */
/*-
* Copyright (c) 2005, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_xattr.c,v 1.38 2022/10/25 23:22:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_xattr.c,v 1.39 2023/03/24 12:22:52 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -231,6 +231,7 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, const char *attrname,
switch (error) {
case ENODATA:
+ case ENOATTR:
if (flag & XATTR_REPLACE)
goto done;
break;