Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176553
b: refs/heads/master
c: 432a212
h: refs/heads/master
i:
  176551: d162fd5
v: v3
  • Loading branch information
Mike Anderson authored and Alasdair G Kergon committed Dec 10, 2009
1 parent 328b703 commit df2c416
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 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: 6df400ab64c68fc4072a13019fc20fd7e3d51303
refs/heads/master: 432a212c0dd0f4ca386cf37c5b740ac9dbda4479
9 changes: 7 additions & 2 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ static void __exit dm_exit(void)
/*
* Block device functions
*/
int dm_deleting_md(struct mapped_device *md)
{
return test_bit(DMF_DELETING, &md->flags);
}

static int dm_blk_open(struct block_device *bdev, fmode_t mode)
{
struct mapped_device *md;
Expand All @@ -340,7 +345,7 @@ static int dm_blk_open(struct block_device *bdev, fmode_t mode)
goto out;

if (test_bit(DMF_FREEING, &md->flags) ||
test_bit(DMF_DELETING, &md->flags)) {
dm_deleting_md(md)) {
md = NULL;
goto out;
}
Expand Down Expand Up @@ -2659,7 +2664,7 @@ struct mapped_device *dm_get_from_kobject(struct kobject *kobj)
return NULL;

if (test_bit(DMF_FREEING, &md->flags) ||
test_bit(DMF_DELETING, &md->flags))
dm_deleting_md(md))
return NULL;

dm_get(md);
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/md/dm.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ int dm_target_iterate(void (*iter_func)(struct target_type *tt,

int dm_split_args(int *argc, char ***argvp, char *input);

/*
* Is this mapped_device being deleted?
*/
int dm_deleting_md(struct mapped_device *md);

/*
* The device-mapper can be driven through one of two interfaces;
* ioctl or filesystem, depending which patch you have applied.
Expand Down

0 comments on commit df2c416

Please sign in to comment.