summaryrefslogtreecommitdiffstats
path: root/fs/hpfs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-13 01:24:37 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-29 23:28:36 -0400
commitde5e2b36289e6c81c3f7dcb9eef38d78de1f8b5c (patch)
tree074deb87c58dcbbcf8b78745ced87bf7349bc706 /fs/hpfs/super.c
parent528c032764f4d3c6cb5f5ece090d9d5882655982 (diff)
downloadblackbird-obmc-linux-de5e2b36289e6c81c3f7dcb9eef38d78de1f8b5c.tar.gz
blackbird-obmc-linux-de5e2b36289e6c81c3f7dcb9eef38d78de1f8b5c.zip
hpfs: endianness bugs
a couple of le32 and le16 used with wrong le..._to_cpu(), plus idiotic use of le32_to_cpu() on 1-bit bitfield Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hpfs/super.c')
-rw-r--r--fs/hpfs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index 54f6eccb79d9..08e85b019131 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -572,7 +572,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
mark_buffer_dirty(bh2);
}
- if (le32_to_cpu(spareblock->hotfixes_used) || le32_to_cpu(spareblock->n_spares_used)) {
+ if (spareblock->hotfixes_used || le32_to_cpu(spareblock->n_spares_used)) {
if (errs >= 2) {
printk("HPFS: Hotfixes not supported here, try chkdsk\n");
mark_dirty(s, 0);
@@ -645,7 +645,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
root->i_mtime.tv_nsec = 0;
root->i_ctime.tv_sec = local_to_gmt(s, le32_to_cpu(de->creation_date));
root->i_ctime.tv_nsec = 0;
- hpfs_i(root)->i_ea_size = le16_to_cpu(de->ea_size);
+ hpfs_i(root)->i_ea_size = le32_to_cpu(de->ea_size);
hpfs_i(root)->i_parent_dir = root->i_ino;
if (root->i_size == -1)
root->i_size = 2048;
OpenPOWER on IntegriCloud