Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54284
b: refs/heads/master
c: b47d2de
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed May 7, 2007
1 parent d2195e2 commit 1472f7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 1d94cda04eb82feb87c932ac3d4aef1e9dc78a43
refs/heads/master: b47d2debf229469c78af4145ee7ad35a0f21b67f
13 changes: 7 additions & 6 deletions trunk/arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,14 +788,12 @@ static int ubd_id(char **str, int *start_out, int *end_out)

static int ubd_remove(int n, char **error_out)
{
struct gendisk *disk;
struct ubd *ubd_dev;
int err = -ENODEV;

mutex_lock(&ubd_lock);

if(ubd_gendisk[n] == NULL)
goto out;

ubd_dev = &ubd_devs[n];

if(ubd_dev->file == NULL)
Expand All @@ -806,9 +804,12 @@ static int ubd_remove(int n, char **error_out)
if(ubd_dev->count > 0)
goto out;

del_gendisk(ubd_gendisk[n]);
put_disk(ubd_gendisk[n]);
ubd_gendisk[n] = NULL;
disk = ubd_gendisk[n];
ubd_gendisk[n] = NULL;
if(disk != NULL){
del_gendisk(disk);
put_disk(disk);
}

if(fake_gendisk[n] != NULL){
del_gendisk(fake_gendisk[n]);
Expand Down

0 comments on commit 1472f7a

Please sign in to comment.