Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176506
b: refs/heads/master
c: 94e7657
h: refs/heads/master
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Dec 10, 2009
1 parent 9d380a4 commit 514c977
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: d2bb7df8cac647b92f51fb84ae735771e7adbfa7
refs/heads/master: 94e76572b5dd37b1f0f4b3742ee8a565daead932
10 changes: 6 additions & 4 deletions trunk/drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,10 +1152,11 @@ static int snapshot_status(struct dm_target *ti, status_type_t type,
unsigned sz = 0;
struct dm_snapshot *snap = ti->private;

down_write(&snap->lock);

switch (type) {
case STATUSTYPE_INFO:

down_write(&snap->lock);

if (!snap->valid)
DMEMIT("Invalid");
else {
Expand All @@ -1171,6 +1172,9 @@ static int snapshot_status(struct dm_target *ti, status_type_t type,
else
DMEMIT("Unknown");
}

up_write(&snap->lock);

break;

case STATUSTYPE_TABLE:
Expand All @@ -1185,8 +1189,6 @@ static int snapshot_status(struct dm_target *ti, status_type_t type,
break;
}

up_write(&snap->lock);

return 0;
}

Expand Down

0 comments on commit 514c977

Please sign in to comment.