hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/fs/reiserfs/xattr.c
....@@ -454,6 +454,15 @@
454454
455455 static inline __u32 xattr_hash(const char *msg, int len)
456456 {
457
+ /*
458
+ * csum_partial() gives different results for little-endian and
459
+ * big endian hosts. Images created on little-endian hosts and
460
+ * mounted on big-endian hosts(and vice versa) will see csum mismatches
461
+ * when trying to fetch xattrs. Treating the hash as __wsum_t would
462
+ * lower the frequency of mismatch. This is an endianness bug in
463
+ * reiserfs. The return statement would result in a sparse warning. Do
464
+ * not fix the sparse warning so as to not hide a reminder of the bug.
465
+ */
457466 return csum_partial(msg, len, 0);
458467 }
459468