summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/exofs/super.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 8addfe314dc7..d22cd168c6ee 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -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;
}