提交 b5095f24 编写于 作者: F Fengguang Wu 提交者: Miklos Szeredi

ovl: fix ptr_ret.cocci warnings

fs/overlayfs/export.c:459:10-16: WARNING: PTR_ERR_OR_ZERO can be used

 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 4b91c30a ("ovl: lookup connected ancestor of dir in inode cache")
CC: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
上级 7168179f
......@@ -620,7 +620,7 @@ static struct dentry *ovl_lookup_real(struct super_block *sb,
if (err == -ECHILD) {
this = ovl_lookup_real_ancestor(sb, real,
layer);
err = IS_ERR(this) ? PTR_ERR(this) : 0;
err = PTR_ERR_OR_ZERO(this);
}
if (!err) {
dput(connected);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册