fs: Use WARN(1,...)
diff mbox series

Message ID 20210226094949.49372-1-vulab@iscas.ac.cn
State New, archived
Headers show
Series
  • fs: Use WARN(1,...)
Related show

Commit Message

Xu Wang Feb. 26, 2021, 9:49 a.m. UTC
Use WARN(1,...) rather than printk followed by WARN_ON(1).

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 fs/dcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matthew Wilcox Feb. 26, 2021, 12:10 p.m. UTC | #1
On Fri, Feb 26, 2021 at 09:49:49AM +0000, Xu Wang wrote:
> Use WARN(1,...) rather than printk followed by WARN_ON(1).

This description doesn't match the patch.

> -	WARN(1, KERN_ERR "BUG: Dentry %p{i=%lx,n=%pd} "
> +	WARN(1, "BUG: Dentry %p{i=%lx,n=%pd} "

Patch
diff mbox series

diff --git a/fs/dcache.c b/fs/dcache.c
index 2cdfdcd4276b..1dad7069dfe5 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1637,7 +1637,7 @@  static enum d_walk_ret umount_check(void *_data, struct dentry *dentry)
 	if (dentry == _data && dentry->d_lockref.count == 1)
 		return D_WALK_CONTINUE;
 
-	WARN(1, KERN_ERR "BUG: Dentry %p{i=%lx,n=%pd} "
+	WARN(1, "BUG: Dentry %p{i=%lx,n=%pd} "
 			" still in use (%d) [unmount of %s %s]\n",
 		       dentry,
 		       dentry->d_inode ?