summaryrefslogtreecommitdiff
path: root/fs/f2fs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r--fs/f2fs/dir.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 6da77e5c753b..f815ca0c5819 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -342,11 +342,11 @@ static struct page *init_inode_metadata(struct inode *inode,
err = f2fs_init_acl(inode, dir, page);
if (err)
- goto error;
+ goto put_error;
err = f2fs_init_security(inode, dir, name, page);
if (err)
- goto error;
+ goto put_error;
wait_on_page_writeback(page);
} else {
@@ -370,8 +370,9 @@ static struct page *init_inode_metadata(struct inode *inode,
}
return page;
-error:
+put_error:
f2fs_put_page(page, 1);
+error:
remove_inode_page(inode);
return ERR_PTR(err);
}