Explorar o código

Fix adfs GET_FRAG_ID() on big-endian

Missing conversion to host-endian before doing shifts

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro %!s(int64=16) %!d(string=hai) anos
pai
achega
224c886643
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      fs/adfs/map.c

+ 1 - 1
fs/adfs/map.c

@@ -62,7 +62,7 @@ static DEFINE_RWLOCK(adfs_map_lock);
 #define GET_FRAG_ID(_map,_start,_idmask)				\
 	({								\
 		unsigned char *_m = _map + (_start >> 3);		\
-		u32 _frag = get_unaligned((u32 *)_m);			\
+		u32 _frag = get_unaligned_le32(_m);			\
 		_frag >>= (_start & 7);					\
 		_frag & _idmask;					\
 	})