diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index d6e60a7156a1933d79ac03acb92ca0d8d1ddcd0c..2d028c02621fa82ea7bb819d3aa5886014d8e7cc 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -996,8 +996,8 @@ static int ovl_setup_trap(struct super_block *sb, struct dentry *dir, int err; trap = ovl_get_trap_inode(sb, dir); - err = PTR_ERR(trap); - if (IS_ERR(trap)) { + err = PTR_ERR_OR_ZERO(trap); + if (err) { if (err == -ELOOP) pr_err("overlayfs: conflicting %s path\n", name); return err;