diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-03 14:55:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-03 14:55:55 -0400 |
commit | 824b005c86f91fe02eb2743a4526361f11786f70 (patch) | |
tree | 5e1834ed89f115f0e9ae4bfa1ebd8469140159b8 /fs/hpfs/map.c | |
parent | dd5cdb48edfd34401799056a9acf61078d773f90 (diff) | |
parent | f49a26e7718dd30b49e3541e3e25aecf5e7294e2 (diff) |
Merge branch 'hpfs' (patches from Mikulas)
Merge hpfs upddate from Mikulas Patocka.
* emailed patches from Mikulas Patocka <mikulas@twibright.com>:
hpfs: update ctime and mtime on directory modification
hpfs: support hotfixes
Diffstat (limited to 'fs/hpfs/map.c')
-rw-r--r-- | fs/hpfs/map.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/hpfs/map.c b/fs/hpfs/map.c index 442770edcdc7..a69bbc1e87f8 100644 --- a/fs/hpfs/map.c +++ b/fs/hpfs/map.c | |||
@@ -130,6 +130,32 @@ __le32 *hpfs_load_bitmap_directory(struct super_block *s, secno bmp) | |||
130 | return b; | 130 | return b; |
131 | } | 131 | } |
132 | 132 | ||
133 | void hpfs_load_hotfix_map(struct super_block *s, struct hpfs_spare_block *spareblock) | ||
134 | { | ||
135 | struct quad_buffer_head qbh; | ||
136 | u32 *directory; | ||
137 | u32 n_hotfixes, n_used_hotfixes; | ||
138 | unsigned i; | ||
139 | |||
140 | n_hotfixes = le32_to_cpu(spareblock->n_spares); | ||
141 | n_used_hotfixes = le32_to_cpu(spareblock->n_spares_used); | ||
142 | |||
143 | if (n_hotfixes > 256 || n_used_hotfixes > n_hotfixes) { | ||
144 | hpfs_error(s, "invalid number of hotfixes: %u, used: %u", n_hotfixes, n_used_hotfixes); | ||
145 | return; | ||
146 | } | ||
147 | if (!(directory = hpfs_map_4sectors(s, le32_to_cpu(spareblock->hotfix_map), &qbh, 0))) { | ||
148 | hpfs_error(s, "can't load hotfix map"); | ||
149 | return; | ||
150 | } | ||
151 | for (i = 0; i < n_used_hotfixes; i++) { | ||
152 | hpfs_sb(s)->hotfix_from[i] = le32_to_cpu(directory[i]); | ||
153 | hpfs_sb(s)->hotfix_to[i] = le32_to_cpu(directory[n_hotfixes + i]); | ||
154 | } | ||
155 | hpfs_sb(s)->n_hotfixes = n_used_hotfixes; | ||
156 | hpfs_brelse4(&qbh); | ||
157 | } | ||
158 | |||
133 | /* | 159 | /* |
134 | * Load fnode to memory | 160 | * Load fnode to memory |
135 | */ | 161 | */ |