summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/ext4_write.c')
-rw-r--r--fs/ext4/ext4_write.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c
index 9200c4727e..a52804e8e1 100644
--- a/fs/ext4/ext4_write.c
+++ b/fs/ext4/ext4_write.c
@@ -907,7 +907,9 @@ int ext4fs_write(const char *fname, unsigned char *buffer,
goto fail;
}
- ext4fs_update_parent_dentry(filename, &inodeno, FILETYPE_REG);
+ inodeno = ext4fs_update_parent_dentry(filename, FILETYPE_REG);
+ if (inodeno == -1)
+ goto fail;
/* prepare file inode */
inode_buffer = zalloc(fs->inodesz);
if (!inode_buffer)