Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60765
b: refs/heads/master
c: f448024
h: refs/heads/master
i:
  60763: 04a52aa
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Jul 17, 2007
1 parent 405bc64 commit 07cb7af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 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: c6d4d63489f2e3ce38c80e7073952f0c58d4c2bc
refs/heads/master: f4480240f700587c15507b7815e75989b16825b2
7 changes: 1 addition & 6 deletions trunk/block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,29 +108,24 @@ int register_blkdev(unsigned int major, const char *name)

EXPORT_SYMBOL(register_blkdev);

/* todo: make void - error printk here */
int unregister_blkdev(unsigned int major, const char *name)
void unregister_blkdev(unsigned int major, const char *name)
{
struct blk_major_name **n;
struct blk_major_name *p = NULL;
int index = major_to_index(major);
int ret = 0;

mutex_lock(&block_subsys_lock);
for (n = &major_names[index]; *n; n = &(*n)->next)
if ((*n)->major == major)
break;
if (!*n || strcmp((*n)->name, name)) {
WARN_ON(1);
ret = -EINVAL;
} else {
p = *n;
*n = p->next;
}
mutex_unlock(&block_subsys_lock);
kfree(p);

return ret;
}

EXPORT_SYMBOL(unregister_blkdev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ extern void putname(const char *name);

#ifdef CONFIG_BLOCK
extern int register_blkdev(unsigned int, const char *);
extern int unregister_blkdev(unsigned int, const char *);
extern void unregister_blkdev(unsigned int, const char *);
extern struct block_device *bdget(dev_t);
extern void bd_set_size(struct block_device *, loff_t size);
extern void bd_forget(struct inode *inode);
Expand Down

0 comments on commit 07cb7af

Please sign in to comment.