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>
This commit is contained in:
committed by
Christian Brauner
parent
fbaa530e28
commit
8c8e7dba10
@ -1664,7 +1664,7 @@ static enum d_walk_ret umount_check(void *_data, struct dentry *dentry)
|
|||||||
if (dentry == _data && dentry->d_lockref.count == 1)
|
if (dentry == _data && dentry->d_lockref.count == 1)
|
||||||
return D_WALK_CONTINUE;
|
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",
|
" still in use (%d) [unmount of %s %s]\n",
|
||||||
dentry,
|
dentry,
|
||||||
dentry->d_inode ?
|
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_lockref.count,
|
||||||
dentry->d_sb->s_type->name,
|
dentry->d_sb->s_type->name,
|
||||||
dentry->d_sb->s_id);
|
dentry->d_sb->s_id);
|
||||||
WARN_ON(1);
|
|
||||||
return D_WALK_CONTINUE;
|
return D_WALK_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user