summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-01-07 23:16:46 +0100
committerBrian Behlendorf <[email protected]>2014-01-09 15:50:11 -0800
commit7f89ae6ba0f4e3c1b3e62272bbaa8228afdb020d (patch)
treee3b2d224673f2c3def9bb795a41b55f0fd0bc217 /include/sys
parentd7ec8d4fd9b704f6bc1220e6a79472ad9b3af0c8 (diff)
Use local variable to read zp->z_mode
When accessing the zp->z_mode through the SA bulk interface we expect that 64-bits are available to hold the result. However, on 32-bit platforms mode_t will only be 32-bits so we cannot pass it to SA_ADD_BULK_ATTR(). Instead a local uint64_t variable must be used and the result assigned to zp->z_mode. This went unnoticed on 32-bit little endian platforms because the bytes happen to end up in the correct 32-bits. But on big endian platforms like Sparc the zp->z_mode will always end up set to zero. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Ned Bass <[email protected]> Signed-off-by: marku89 <[email protected]> Issue #1700
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/zfs_znode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/zfs_znode.h b/include/sys/zfs_znode.h
index 4b70f7d0c..a0200684e 100644
--- a/include/sys/zfs_znode.h
+++ b/include/sys/zfs_znode.h
@@ -205,8 +205,8 @@ typedef struct znode {
uint64_t z_pflags; /* pflags (cached) */
uint64_t z_uid; /* uid fuid (cached) */
uint64_t z_gid; /* gid fuid (cached) */
- mode_t z_mode; /* mode (cached) */
uint32_t z_sync_cnt; /* synchronous open count */
+ mode_t z_mode; /* mode (cached) */
kmutex_t z_acl_lock; /* acl data lock */
zfs_acl_t *z_acl_cached; /* cached acl */
krwlock_t z_xattr_lock; /* xattr data lock */