Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154239
b: refs/heads/master
c: 5657e8f
h: refs/heads/master
i:
  154237: bb6e2f0
  154235: 72040fe
  154231: ccc3322
  154223: 59b8192
  154207: 25a0816
  154175: dced0a7
  154111: 51a4ebf
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Jun 22, 2009
1 parent bbea2be commit f0a9820
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8cbeb67ad50f7d68e5e83be2cb2284de8f9c03b5
refs/heads/master: 5657e8fa45cf230df278040c420fb80e06309d8f
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-exception-store.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static inline void dm_consecutive_chunk_count_inc(struct dm_snap_exception *e)
*/
static inline sector_t get_dev_size(struct block_device *bdev)
{
return bdev->bd_inode->i_size >> SECTOR_SHIFT;
return i_size_read(bdev->bd_inode) >> SECTOR_SHIFT;
}

static inline chunk_t sector_to_chunk(struct dm_exception_store *store,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ static int create_log_context(struct dm_dirty_log *log, struct dm_target *ti,
bitset_size,
ti->limits.logical_block_size);

if (buf_size > dev->bdev->bd_inode->i_size) {
if (buf_size > i_size_read(dev->bdev->bd_inode)) {
DMWARN("log device %s too small: need %llu bytes",
dev->name, (unsigned long long)buf_size);
kfree(lc);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ static void close_dev(struct dm_dev_internal *d, struct mapped_device *md)
static int check_device_area(struct dm_dev_internal *dd, sector_t start,
sector_t len)
{
sector_t dev_size = dd->dm_dev.bdev->bd_inode->i_size >> SECTOR_SHIFT;
sector_t dev_size = i_size_read(dd->dm_dev.bdev->bd_inode) >>
SECTOR_SHIFT;

if (!dev_size)
return 1;
Expand Down

0 comments on commit f0a9820

Please sign in to comment.