git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
fs
/
adfs
/
dir_f.c
diff --git
a/fs/adfs/dir_f.c
b/fs/adfs/dir_f.c
index
1c60626
..
b61648b
100644
(file)
--- a/
fs/adfs/dir_f.c
+++ b/
fs/adfs/dir_f.c
@@
-93,7
+93,7
@@
static inline void adfs_writename(char *to, char *from, int maxlen)
#define dir_u32(idx) \
({ int _buf = idx >> blocksize_bits; \
int _off = idx - (_buf << blocksize_bits);\
#define dir_u32(idx) \
({ int _buf = idx >> blocksize_bits; \
int _off = idx - (_buf << blocksize_bits);\
- *(
u32 *)(bh[_buf]->b_data + _off);
\
+ *(
__le32 *)(bh[_buf]->b_data + _off);
\
})
#define bufoff(_bh,_idx) \
})
#define bufoff(_bh,_idx) \
@@
-112,7
+112,7
@@
adfs_dir_checkbyte(const struct adfs_dir *dir)
{
struct buffer_head * const *bh = dir->bh;
const int blocksize_bits = dir->sb->s_blocksize_bits;
{
struct buffer_head * const *bh = dir->bh;
const int blocksize_bits = dir->sb->s_blocksize_bits;
- union {
u
32 *ptr32; u8 *ptr8; } ptr, end;
+ union {
__le
32 *ptr32; u8 *ptr8; } ptr, end;
u32 dircheck = 0;
int last = 5 - 26;
int i = 0;
u32 dircheck = 0;
int last = 5 - 26;
int i = 0;
@@
-125,7
+125,7
@@
adfs_dir_checkbyte(const struct adfs_dir *dir)
do {
last += 26;
do {
do {
last += 26;
do {
- dircheck =
cpu_to_le32
(dir_u32(i)) ^ ror13(dircheck);
+ dircheck =
le32_to_cpu
(dir_u32(i)) ^ ror13(dircheck);
i += sizeof(u32);
} while (i < (last & ~3));
i += sizeof(u32);
} while (i < (last & ~3));
@@
-155,8
+155,8
@@
adfs_dir_checkbyte(const struct adfs_dir *dir)
end.ptr8 = ptr.ptr8 + 36;
do {
end.ptr8 = ptr.ptr8 + 36;
do {
-
unsigned int
v = *ptr.ptr32++;
- dircheck =
cpu_to_le32
(v) ^ ror13(dircheck);
+
__le32
v = *ptr.ptr32++;
+ dircheck =
le32_to_cpu
(v) ^ ror13(dircheck);
} while (ptr.ptr32 < end.ptr32);
return (dircheck ^ (dircheck >> 8) ^ (dircheck >> 16) ^ (dircheck >> 24)) & 0xff;
} while (ptr.ptr32 < end.ptr32);
return (dircheck ^ (dircheck >> 8) ^ (dircheck >> 16) ^ (dircheck >> 24)) & 0xff;
@@
-165,7
+165,7
@@
adfs_dir_checkbyte(const struct adfs_dir *dir)
/*
* Read and check that a directory is valid
*/
/*
* Read and check that a directory is valid
*/
-int
+
static
int
adfs_dir_read(struct super_block *sb, unsigned long object_id,
unsigned int size, struct adfs_dir *dir)
{
adfs_dir_read(struct super_block *sb, unsigned long object_id,
unsigned int size, struct adfs_dir *dir)
{
@@
-260,7
+260,7
@@
adfs_obj2dir(struct adfs_direntry *de, struct object_info *obj)
* get a directory entry. Note that the caller is responsible
* for holding the relevant locks.
*/
* get a directory entry. Note that the caller is responsible
* for holding the relevant locks.
*/
-int
+
static
int
__adfs_dir_get(struct adfs_dir *dir, int pos, struct object_info *obj)
{
struct super_block *sb = dir->sb;
__adfs_dir_get(struct adfs_dir *dir, int pos, struct object_info *obj)
{
struct super_block *sb = dir->sb;
@@
-290,7
+290,7
@@
__adfs_dir_get(struct adfs_dir *dir, int pos, struct object_info *obj)
return 0;
}
return 0;
}
-int
+
static
int
__adfs_dir_put(struct adfs_dir *dir, int pos, struct object_info *obj)
{
struct super_block *sb = dir->sb;
__adfs_dir_put(struct adfs_dir *dir, int pos, struct object_info *obj)
{
struct super_block *sb = dir->sb;