summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2009-07-22 15:15:58 +0000
committertrasz <trasz@FreeBSD.org>2009-07-22 15:15:58 +0000
commit0157e2f2cfc09080663511252b25c1803a58271a (patch)
treed6b987c66a98d37b6c8853eed9f0f7a2a5dac827 /sys/cddl
parentd00a1eab14e44b3e8b2d398cc1519dba8aa5ee68 (diff)
downloadFreeBSD-src-0157e2f2cfc09080663511252b25c1803a58271a.zip
FreeBSD-src-0157e2f2cfc09080663511252b25c1803a58271a.tar.gz
Fix extattr_list_file(2) on ZFS in case the attribute directory
doesn't exist and user doesn't have write access to the file. Without this fix, it returns bogus value instead of 0. For some reason this didn't manifest on my kernel compiled with -O0. PR: kern/136601 Submitted by: Jaakko Heinonen <jh at saunalahti dot fi> Approved by: re (kib)
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
index 3f0e808..8e2f337 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
@@ -4722,6 +4722,9 @@ vop_listextattr {
ZFS_ENTER(zfsvfs);
+ if (sizep != NULL)
+ *sizep = 0;
+
error = zfs_lookup(ap->a_vp, NULL, &xvp, NULL, 0, ap->a_cred, td,
LOOKUP_XATTR);
if (error != 0) {
@@ -4752,9 +4755,6 @@ vop_listextattr {
auio.uio_rw = UIO_READ;
auio.uio_offset = 0;
- if (sizep != NULL)
- *sizep = 0;
-
do {
u_char nlen;
OpenPOWER on IntegriCloud