Thread (4 messages) 4 messages, 3 authors, 2018-01-20

[PATCH v2] bdi: show error log when fail to create bdi debugfs entry

STALE3177d

From: weiping zhang <hidden>
Date: 2018-01-10 16:36:37
Subsystem: memory management, memory management - misc, the rest · Maintainers: Andrew Morton, David Hildenbrand, Linus Torvalds

bdi debugfs dir/file may create fail, add error log here.

Signed-off-by: weiping zhang <redacted>
---
V1->V2:
fix indentation and make log message more clear

 mm/backing-dev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index b5f940c..0a49665 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -885,7 +885,9 @@ int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, va_list args)
 	cgwb_bdi_register(bdi);
 	bdi->dev = dev;
 
-	bdi_debug_register(bdi, dev_name(dev));
+	if (bdi_debug_register(bdi, dev_name(dev)))
+		pr_warn("blkdev %s: creation of bdi debugfs entries failed.\n",
+			dev_name(dev));
 	set_bit(WB_registered, &bdi->wb.state);
 
 	spin_lock_bh(&bdi_lock);
-- 
2.9.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help