Merge branch 'stable/for-linus-fixes-3.3' of git://git.kernel.org/pub/scm/linux/kerne...
[firefly-linux-kernel-4.4.55.git] / fs / exofs / super.c
index 8addfe314dc7cc386948d6fac8dc8f8210a61a7a..d22cd168c6ee9738ed554474e7a9995e94df8059 100644 (file)
@@ -838,6 +838,8 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
        ret = bdi_setup_and_register(&sbi->bdi, "exofs", BDI_CAP_MAP_COPY);
        if (ret) {
                EXOFS_DBGMSG("Failed to bdi_setup_and_register\n");
+               dput(sb->s_root);
+               sb->s_root = NULL;
                goto free_sbi;
        }