Skip to content

Commit

Permalink
Revert "ubifs: ubifs_symlink: Fix memleak of inode->i_link in error p…
Browse files Browse the repository at this point in the history
…ath"

commit 7bed61a1cf166b5c113047fc8f60ff22dcb04893 upstream.

This reverts commit 6379b44. Commit
1e02221 ("ubifs: ubifs_symlink: Fix memleak of inode->i_link in
error path") is applied again in commit 6379b44 ("ubifs:
ubifs_symlink: Fix memleak of inode->i_link in error path"), which
changed ubifs_mknod (It won't become a real problem). Just revert it.

Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Zhihao Cheng authored and opsiff committed Oct 11, 2024
1 parent b7848e1 commit 1d573f9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/ubifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,8 +1126,6 @@ static int ubifs_mknod(struct mnt_idmap *idmap, struct inode *dir,
dir_ui->ui_size = dir->i_size;
mutex_unlock(&dir_ui->ui_mutex);
out_inode:
/* Free inode->i_link before inode is marked as bad. */
fscrypt_free_inode(inode);
make_bad_inode(inode);
iput(inode);
out_fname:
Expand Down

0 comments on commit 1d573f9

Please sign in to comment.