diff options
-rw-r--r-- | fs/ext4/namei.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 5861d64929f6..a9fd5f48f3bf 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1612,11 +1612,8 @@ static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry, de = de1; } de->file_type = EXT4_FT_UNKNOWN; - if (inode) { - de->inode = cpu_to_le32(inode->i_ino); - ext4_set_de_type(dir->i_sb, de, inode->i_mode); - } else - de->inode = 0; + de->inode = cpu_to_le32(inode->i_ino); + ext4_set_de_type(dir->i_sb, de, inode->i_mode); de->name_len = namelen; memcpy(de->name, name, namelen); /* |