diff options
-rw-r--r-- | fs/bfs/dir.c | 2 | ||||
-rw-r--r-- | fs/bfs/inode.c | 2 | ||||
-rw-r--r-- | include/linux/bfs_fs.h | 42 |
3 files changed, 23 insertions, 23 deletions
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index e240c335eb23..5af928fa0449 100644 --- a/fs/bfs/dir.c +++ b/fs/bfs/dir.c | |||
@@ -108,7 +108,7 @@ static int bfs_create(struct inode * dir, struct dentry * dentry, int mode, | |||
108 | inode->i_mapping->a_ops = &bfs_aops; | 108 | inode->i_mapping->a_ops = &bfs_aops; |
109 | inode->i_mode = mode; | 109 | inode->i_mode = mode; |
110 | inode->i_ino = ino; | 110 | inode->i_ino = ino; |
111 | BFS_I(inode)->i_dsk_ino = cpu_to_le16(ino); | 111 | BFS_I(inode)->i_dsk_ino = ino; |
112 | BFS_I(inode)->i_sblock = 0; | 112 | BFS_I(inode)->i_sblock = 0; |
113 | BFS_I(inode)->i_eblock = 0; | 113 | BFS_I(inode)->i_eblock = 0; |
114 | insert_inode_hash(inode); | 114 | insert_inode_hash(inode); |
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index c7b39aa279d7..868af0f224fb 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c | |||
@@ -357,7 +357,7 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent) | |||
357 | } | 357 | } |
358 | 358 | ||
359 | info->si_blocks = (le32_to_cpu(bfs_sb->s_end) + 1)>>BFS_BSIZE_BITS; /* for statfs(2) */ | 359 | info->si_blocks = (le32_to_cpu(bfs_sb->s_end) + 1)>>BFS_BSIZE_BITS; /* for statfs(2) */ |
360 | info->si_freeb = (le32_to_cpu(bfs_sb->s_end) + 1 - cpu_to_le32(bfs_sb->s_start))>>BFS_BSIZE_BITS; | 360 | info->si_freeb = (le32_to_cpu(bfs_sb->s_end) + 1 - le32_to_cpu(bfs_sb->s_start))>>BFS_BSIZE_BITS; |
361 | info->si_freei = 0; | 361 | info->si_freei = 0; |
362 | info->si_lf_eblk = 0; | 362 | info->si_lf_eblk = 0; |
363 | info->si_lf_sblk = 0; | 363 | info->si_lf_sblk = 0; |
diff --git a/include/linux/bfs_fs.h b/include/linux/bfs_fs.h index c1237aa92e38..8ed6dfdcd783 100644 --- a/include/linux/bfs_fs.h +++ b/include/linux/bfs_fs.h | |||
@@ -20,19 +20,19 @@ | |||
20 | 20 | ||
21 | /* BFS inode layout on disk */ | 21 | /* BFS inode layout on disk */ |
22 | struct bfs_inode { | 22 | struct bfs_inode { |
23 | __u16 i_ino; | 23 | __le16 i_ino; |
24 | __u16 i_unused; | 24 | __u16 i_unused; |
25 | __u32 i_sblock; | 25 | __le32 i_sblock; |
26 | __u32 i_eblock; | 26 | __le32 i_eblock; |
27 | __u32 i_eoffset; | 27 | __le32 i_eoffset; |
28 | __u32 i_vtype; | 28 | __le32 i_vtype; |
29 | __u32 i_mode; | 29 | __le32 i_mode; |
30 | __s32 i_uid; | 30 | __le32 i_uid; |
31 | __s32 i_gid; | 31 | __le32 i_gid; |
32 | __u32 i_nlink; | 32 | __le32 i_nlink; |
33 | __u32 i_atime; | 33 | __le32 i_atime; |
34 | __u32 i_mtime; | 34 | __le32 i_mtime; |
35 | __u32 i_ctime; | 35 | __le32 i_ctime; |
36 | __u32 i_padding[4]; | 36 | __u32 i_padding[4]; |
37 | }; | 37 | }; |
38 | 38 | ||
@@ -41,17 +41,17 @@ struct bfs_inode { | |||
41 | #define BFS_DIRS_PER_BLOCK 32 | 41 | #define BFS_DIRS_PER_BLOCK 32 |
42 | 42 | ||
43 | struct bfs_dirent { | 43 | struct bfs_dirent { |
44 | __u16 ino; | 44 | __le16 ino; |
45 | char name[BFS_NAMELEN]; | 45 | char name[BFS_NAMELEN]; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* BFS superblock layout on disk */ | 48 | /* BFS superblock layout on disk */ |
49 | struct bfs_super_block { | 49 | struct bfs_super_block { |
50 | __u32 s_magic; | 50 | __le32 s_magic; |
51 | __u32 s_start; | 51 | __le32 s_start; |
52 | __u32 s_end; | 52 | __le32 s_end; |
53 | __s32 s_from; | 53 | __le32 s_from; |
54 | __s32 s_to; | 54 | __le32 s_to; |
55 | __s32 s_bfrom; | 55 | __s32 s_bfrom; |
56 | __s32 s_bto; | 56 | __s32 s_bto; |
57 | char s_fsname[6]; | 57 | char s_fsname[6]; |
@@ -66,15 +66,15 @@ struct bfs_super_block { | |||
66 | #define BFS_INO2OFF(ino) \ | 66 | #define BFS_INO2OFF(ino) \ |
67 | ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE) | 67 | ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE) |
68 | #define BFS_NZFILESIZE(ip) \ | 68 | #define BFS_NZFILESIZE(ip) \ |
69 | ((cpu_to_le32((ip)->i_eoffset) + 1) - cpu_to_le32((ip)->i_sblock) * BFS_BSIZE) | 69 | ((le32_to_cpu((ip)->i_eoffset) + 1) - le32_to_cpu((ip)->i_sblock) * BFS_BSIZE) |
70 | 70 | ||
71 | #define BFS_FILESIZE(ip) \ | 71 | #define BFS_FILESIZE(ip) \ |
72 | ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip)) | 72 | ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip)) |
73 | 73 | ||
74 | #define BFS_FILEBLOCKS(ip) \ | 74 | #define BFS_FILEBLOCKS(ip) \ |
75 | ((ip)->i_sblock == 0 ? 0 : (cpu_to_le32((ip)->i_eblock) + 1) - cpu_to_le32((ip)->i_sblock)) | 75 | ((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock)) |
76 | #define BFS_UNCLEAN(bfs_sb, sb) \ | 76 | #define BFS_UNCLEAN(bfs_sb, sb) \ |
77 | ((cpu_to_le32(bfs_sb->s_from) != -1) && (cpu_to_le32(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY)) | 77 | ((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY)) |
78 | 78 | ||
79 | 79 | ||
80 | #endif /* _LINUX_BFS_FS_H */ | 80 | #endif /* _LINUX_BFS_FS_H */ |