summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAnh Tuan Phan <tuananhlfc@gmail.com>2023-08-17 23:31:42 +0700
committerChristian Brauner <brauner@kernel.org>2023-08-19 13:41:11 +0200
commit8c8e7dba1032c6054540ab6f59ce3f3b9f3c6105 (patch)
tree84ff84de9e00c5d22235386d0e955bde9571c211 /fs/dcache.c
parentfbaa530e28afd203b0dc6605c7ecc584952bd606 (diff)
downloadlinux-8c8e7dba1032c6054540ab6f59ce3f3b9f3c6105.tar.gz
linux-8c8e7dba1032c6054540ab6f59ce3f3b9f3c6105.tar.bz2
linux-8c8e7dba1032c6054540ab6f59ce3f3b9f3c6105.zip
fs/dcache: Replace printk and WARN_ON by WARN
Use WARN instead of printk + WARN_ON as reported from coccinelle: ./fs/dcache.c:1667:1-7: SUGGESTION: printk + WARN_ON can be just WARN Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com> Message-Id: <20230817163142.117706-1-tuananhlfc@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 3aaf2c7ba110..25ac74d30bff 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1664,7 +1664,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;
- printk(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 ?
@@ -1673,7 +1673,6 @@ static enum d_walk_ret umount_check(void *_data, struct dentry *dentry)
dentry->d_lockref.count,
dentry->d_sb->s_type->name,
dentry->d_sb->s_id);
- WARN_ON(1);
return D_WALK_CONTINUE;
}