drbd: switch to proc_create_single

And stop messing with try_module_get on THIS_MODULE, which doesn't make
any sense here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Christoph Hellwig
2018-04-11 16:46:11 +02:00
parent 4e292a9667
commit 004fd11db1
3 changed files with 4 additions and 35 deletions

View File

@@ -3010,7 +3010,8 @@ static int __init drbd_init(void)
goto fail;
err = -ENOMEM;
drbd_proc = proc_create_data("drbd", S_IFREG | S_IRUGO , NULL, &drbd_proc_fops, NULL);
drbd_proc = proc_create_single("drbd", S_IFREG | S_IRUGO , NULL,
drbd_seq_show);
if (!drbd_proc) {
pr_err("unable to register proc file\n");
goto fail;