From 2cb6a44220b974a7832d1a09630b4cee870b023a Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 19 Jan 2023 19:29:26 -0500 Subject: [PATCH] minix_rename(): minix_delete_entry() might fail Signed-off-by: Al Viro --- fs/minix/namei.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/minix/namei.c b/fs/minix/namei.c index 382ead9..b99696b 100644 --- a/fs/minix/namei.c +++ b/fs/minix/namei.c @@ -230,7 +230,10 @@ static int minix_rename(struct user_namespace *mnt_userns, inode_inc_link_count(new_dir); } - minix_delete_entry(old_de, old_page); + err = minix_delete_entry(old_de, old_page); + if (err) + goto out_dir; + mark_inode_dirty(old_inode); if (dir_de) { -- 2.7.4