Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117456
b: refs/heads/master
c: 72e8264
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Oct 23, 2008
1 parent 261d012 commit 08ab56d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 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: 3516586a424ea5727be089da6541cbd5644f0497
refs/heads/master: 72e8264eda02b6ba85a222b9620802ebf23c6a10
21 changes: 6 additions & 15 deletions trunk/drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,19 +312,6 @@ static inline int check_space(struct dm_table *t)
return 0;
}

/*
* Convert a device path to a dev_t.
*/
static int lookup_device(const char *path, dev_t *dev)
{
struct block_device *bdev = lookup_bdev(path);
if (IS_ERR(bdev))
return PTR_ERR(bdev);
*dev = bdev->bd_dev;
bdput(bdev);
return 0;
}

/*
* See if we've already got a device in the list.
*/
Expand Down Expand Up @@ -437,8 +424,12 @@ static int __table_get_device(struct dm_table *t, struct dm_target *ti,
return -EOVERFLOW;
} else {
/* convert the path to a device */
if ((r = lookup_device(path, &dev)))
return r;
struct block_device *bdev = lookup_bdev(path);

if (IS_ERR(bdev))
return PTR_ERR(bdev);
dev = bdev->bd_dev;
bdput(bdev);
}

dd = find_device(&t->devices, dev);
Expand Down

0 comments on commit 08ab56d

Please sign in to comment.