* [PATCH v1] fs/dcache: Replace printk and WARN_ON by WARN
@ 2023-08-17 16:31 Anh Tuan Phan
2023-08-19 11:48 ` Christian Brauner
0 siblings, 1 reply; 2+ messages in thread
From: Anh Tuan Phan @ 2023-08-17 16:31 UTC (permalink / raw)
To: viro, brauner
Cc: Anh Tuan Phan, linux-fsdevel, linux-kernel-mentees, linux-kernel
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>
---
fs/dcache.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 52e6d5fdab6b..fd5f133b180e 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;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] fs/dcache: Replace printk and WARN_ON by WARN
2023-08-17 16:31 [PATCH v1] fs/dcache: Replace printk and WARN_ON by WARN Anh Tuan Phan
@ 2023-08-19 11:48 ` Christian Brauner
0 siblings, 0 replies; 2+ messages in thread
From: Christian Brauner @ 2023-08-19 11:48 UTC (permalink / raw)
To: Anh Tuan Phan
Cc: Christian Brauner, linux-fsdevel, linux-kernel-mentees,
linux-kernel, viro
On Thu, 17 Aug 2023 23:31:42 +0700, Anh Tuan Phan wrote:
> 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
>
>
Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc
[1/1] fs/dcache: Replace printk and WARN_ON by WARN
https://git.kernel.org/vfs/vfs/c/7fbf9abcc77f
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-19 11:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 16:31 [PATCH v1] fs/dcache: Replace printk and WARN_ON by WARN Anh Tuan Phan
2023-08-19 11:48 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).