Source-Changes-HG archive

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

[src/trunk]: src/sys/kern extattr_set_vp(): properly handle XATTR_REPLACE fla...



details:   https://anonhg.NetBSD.org/src/rev/a552599a92bf
branches:  trunk
changeset: 374006:a552599a92bf
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri Mar 24 12:22:52 2023 +0000

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

 sys/kern/vfs_xattr.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 68c2fd990d37 -r a552599a92bf sys/kern/vfs_xattr.c
--- a/sys/kern/vfs_xattr.c      Fri Mar 24 07:26:21 2023 +0000
+++ b/sys/kern/vfs_xattr.c      Fri Mar 24 12:22:52 2023 +0000
@@ -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 att
 
                switch (error) {
                case ENODATA:
+               case ENOATTR:
                        if (flag & XATTR_REPLACE)
                                goto done;
                        break;



Home | Main Index | Thread Index | Old Index