aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/super.c
diff options
context:
space:
mode:
authorSeth Forshee <seth.forshee@canonical.com>2011-07-18 11:06:23 -0400
committerChristoph Hellwig <hch@lst.de>2011-07-22 10:37:44 -0400
commit6596528e391ad978a6a120142cba97a1d7324cb6 (patch)
tree9f9ad6f52b9665074545639c54399e2680e6c889 /fs/hfsplus/super.c
parentaac4e4198eff7f9551d586c55342403d49249d95 (diff)
hfsplus: ensure bio requests are not smaller than the hardware sectors
Currently all bio requests are 512 bytes, which may fail for media whose physical sector size is larger than this. Ensure these requests are not smaller than the block device logical block size. BugLink: http://bugs.launchpad.net/bugs/734883 Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/hfsplus/super.c')
-rw-r--r--fs/hfsplus/super.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 84f56e1f6dac..c106ca22e812 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -203,17 +203,17 @@ int hfsplus_sync_fs(struct super_block *sb, int wait)
203 write_backup = 1; 203 write_backup = 1;
204 } 204 }
205 205
206 error2 = hfsplus_submit_bio(sb->s_bdev, 206 error2 = hfsplus_submit_bio(sb,
207 sbi->part_start + HFSPLUS_VOLHEAD_SECTOR, 207 sbi->part_start + HFSPLUS_VOLHEAD_SECTOR,
208 sbi->s_vhdr, WRITE_SYNC); 208 sbi->s_vhdr_buf, NULL, WRITE_SYNC);
209 if (!error) 209 if (!error)
210 error = error2; 210 error = error2;
211 if (!write_backup) 211 if (!write_backup)
212 goto out; 212 goto out;
213 213
214 error2 = hfsplus_submit_bio(sb->s_bdev, 214 error2 = hfsplus_submit_bio(sb,
215 sbi->part_start + sbi->sect_count - 2, 215 sbi->part_start + sbi->sect_count - 2,
216 sbi->s_backup_vhdr, WRITE_SYNC); 216 sbi->s_backup_vhdr_buf, NULL, WRITE_SYNC);
217 if (!error) 217 if (!error)
218 error2 = error; 218 error2 = error;
219out: 219out:
@@ -257,8 +257,8 @@ static void hfsplus_put_super(struct super_block *sb)
257 hfs_btree_close(sbi->ext_tree); 257 hfs_btree_close(sbi->ext_tree);
258 iput(sbi->alloc_file); 258 iput(sbi->alloc_file);
259 iput(sbi->hidden_dir); 259 iput(sbi->hidden_dir);
260 kfree(sbi->s_vhdr); 260 kfree(sbi->s_vhdr_buf);
261 kfree(sbi->s_backup_vhdr); 261 kfree(sbi->s_backup_vhdr_buf);
262 unload_nls(sbi->nls); 262 unload_nls(sbi->nls);
263 kfree(sb->s_fs_info); 263 kfree(sb->s_fs_info);
264 sb->s_fs_info = NULL; 264 sb->s_fs_info = NULL;