X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fadfs%2Fmap.c;h=92ab4fbc2031f6eaaff492954e84fb3d4ca93957;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=7c59ca701a369c181df86b5328135877e1e841da;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/adfs/map.c b/fs/adfs/map.c index 7c59ca701..92ab4fbc2 100644 --- a/fs/adfs/map.c +++ b/fs/adfs/map.c @@ -53,7 +53,7 @@ /* * For the future... */ -static rwlock_t adfs_map_lock = RW_LOCK_UNLOCKED; +static DEFINE_RWLOCK(adfs_map_lock); /* * This is fun. We need to load up to 19 bits from the map at an @@ -92,9 +92,8 @@ lookup_zone(const struct adfs_discmap *dm, const unsigned int idlen, * find end of fragment */ { - u32 v, *_map = (u32 *)map; - - v = le32_to_cpu(_map[mapptr >> 5]) >> (mapptr & 31); + __le32 *_map = (__le32 *)map; + u32 v = le32_to_cpu(_map[mapptr >> 5]) >> (mapptr & 31); while (v == 0) { mapptr = (mapptr & ~31) + 32; if (mapptr >= mapsize) @@ -171,9 +170,8 @@ scan_free_map(struct adfs_sb_info *asb, struct adfs_discmap *dm) * find end of fragment */ { - u32 v, *_map = (u32 *)map; - - v = le32_to_cpu(_map[mapptr >> 5]) >> (mapptr & 31); + __le32 *_map = (__le32 *)map; + u32 v = le32_to_cpu(_map[mapptr >> 5]) >> (mapptr & 31); while (v == 0) { mapptr = (mapptr & ~31) + 32; if (mapptr >= mapsize)