diff options
Diffstat (limited to 'fs/hfsplus/wrapper.c')
-rw-r--r-- | fs/hfsplus/wrapper.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c index c89e198e8a2a..8972c20b3216 100644 --- a/fs/hfsplus/wrapper.c +++ b/fs/hfsplus/wrapper.c | |||
@@ -123,7 +123,7 @@ int hfsplus_read_wrapper(struct super_block *sb) | |||
123 | if (vhdr->signature == cpu_to_be16(HFSPLUS_VOLHEAD_SIG)) | 123 | if (vhdr->signature == cpu_to_be16(HFSPLUS_VOLHEAD_SIG)) |
124 | break; | 124 | break; |
125 | if (vhdr->signature == cpu_to_be16(HFSPLUS_VOLHEAD_SIGX)) { | 125 | if (vhdr->signature == cpu_to_be16(HFSPLUS_VOLHEAD_SIGX)) { |
126 | sbi->flags |= HFSPLUS_SB_HFSX; | 126 | set_bit(HFSPLUS_SB_HFSX, &sbi->flags); |
127 | break; | 127 | break; |
128 | } | 128 | } |
129 | brelse(bh); | 129 | brelse(bh); |
@@ -169,10 +169,14 @@ int hfsplus_read_wrapper(struct super_block *sb) | |||
169 | return -EIO; | 169 | return -EIO; |
170 | 170 | ||
171 | /* should still be the same... */ | 171 | /* should still be the same... */ |
172 | if (vhdr->signature != (sbi->flags & HFSPLUS_SB_HFSX ? | 172 | if (test_bit(HFSPLUS_SB_HFSX, &sbi->flags)) { |
173 | cpu_to_be16(HFSPLUS_VOLHEAD_SIGX) : | 173 | if (vhdr->signature != cpu_to_be16(HFSPLUS_VOLHEAD_SIGX)) |
174 | cpu_to_be16(HFSPLUS_VOLHEAD_SIG))) | 174 | goto error; |
175 | goto error; | 175 | } else { |
176 | if (vhdr->signature != cpu_to_be16(HFSPLUS_VOLHEAD_SIG)) | ||
177 | goto error; | ||
178 | } | ||
179 | |||
176 | sbi->s_vhbh = bh; | 180 | sbi->s_vhbh = bh; |
177 | sbi->s_vhdr = vhdr; | 181 | sbi->s_vhdr = vhdr; |
178 | 182 | ||