diff options
author | Christoph Hellwig <hch@tuxera.com> | 2010-11-23 08:37:51 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2010-11-23 08:37:51 -0500 |
commit | 358f26d52680cb150907302d4334359de7dd2d59 (patch) | |
tree | 9348f861b49d5dd51049e31971cc09ab151388bc /fs/hfsplus/hfsplus_fs.h | |
parent | 52399b171dfaea02b6944cd6feba49b624147126 (diff) |
hfsplus: use raw bio access for partition tables
Switch the hfsplus partition table reding for cdroms to use our bio
helpers. Again we don't rely on any caching in the buffer_heads, and
this gets rid of the last buffer_head use in hfsplus.
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/hfsplus_fs.h')
-rw-r--r-- | fs/hfsplus/hfsplus_fs.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h index 276ddb0fd0fd..0d8532d96694 100644 --- a/fs/hfsplus/hfsplus_fs.h +++ b/fs/hfsplus/hfsplus_fs.h | |||
@@ -401,23 +401,6 @@ static inline struct hfsplus_inode_info *HFSPLUS_I(struct inode *inode) | |||
401 | return list_entry(inode, struct hfsplus_inode_info, vfs_inode); | 401 | return list_entry(inode, struct hfsplus_inode_info, vfs_inode); |
402 | } | 402 | } |
403 | 403 | ||
404 | #define sb_bread512(sb, sec, data) ({ \ | ||
405 | struct buffer_head *__bh; \ | ||
406 | sector_t __block; \ | ||
407 | loff_t __start; \ | ||
408 | int __offset; \ | ||
409 | \ | ||
410 | __start = (loff_t)(sec) << HFSPLUS_SECTOR_SHIFT;\ | ||
411 | __block = __start >> (sb)->s_blocksize_bits; \ | ||
412 | __offset = __start & ((sb)->s_blocksize - 1); \ | ||
413 | __bh = sb_bread((sb), __block); \ | ||
414 | if (likely(__bh != NULL)) \ | ||
415 | data = (void *)(__bh->b_data + __offset);\ | ||
416 | else \ | ||
417 | data = NULL; \ | ||
418 | __bh; \ | ||
419 | }) | ||
420 | |||
421 | /* time macros */ | 404 | /* time macros */ |
422 | #define __hfsp_mt2ut(t) (be32_to_cpu(t) - 2082844800U) | 405 | #define __hfsp_mt2ut(t) (be32_to_cpu(t) - 2082844800U) |
423 | #define __hfsp_ut2mt(t) (cpu_to_be32(t + 2082844800U)) | 406 | #define __hfsp_ut2mt(t) (cpu_to_be32(t + 2082844800U)) |