ovl: remove unneeded check for IS_ERR()
authorAmir Goldstein <amir73il@gmail.com>
Tue, 11 Jul 2017 12:58:37 +0000 (15:58 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 13 Jul 2017 20:06:46 +0000 (22:06 +0200)
ovl_workdir_create() returns a valid index dentry or NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/super.c

index 1cf5d3538309a8d6182f4eaf3c9d9a0932f6e26e..c88493b01d8dbd2b28ef38a411de7b53f29a7766 100644 (file)
@@ -1058,10 +1058,6 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
 
                ufs->indexdir = ovl_workdir_create(sb, ufs, workpath.dentry,
                                                   OVL_INDEXDIR_NAME, true);
-               err = PTR_ERR(ufs->indexdir);
-               if (IS_ERR(ufs->indexdir))
-                       goto out_put_lower_mnt;
-
                if (ufs->indexdir) {
                        /* Verify upper root is index dir origin */
                        err = ovl_verify_origin(ufs->indexdir, ufs->upper_mnt,