summaryrefslogtreecommitdiffstats
path: root/fs/minix/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2023-01-19 19:29:26 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2023-01-19 19:29:26 -0500
commit2cb6a44220b974a7832d1a09630b4cee870b023a (patch)
treed690438a52c87022c060cec5aa7894b12094a377 /fs/minix/namei.c
parentf556e776b14ae4f853147705603d263bfa20ecd1 (diff)
downloadlinux-2cb6a44220b974a7832d1a09630b4cee870b023a.tar.gz
linux-2cb6a44220b974a7832d1a09630b4cee870b023a.tar.bz2
linux-2cb6a44220b974a7832d1a09630b4cee870b023a.zip
minix_rename(): minix_delete_entry() might fail
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/minix/namei.c')
-rw-r--r--fs/minix/namei.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/minix/namei.c b/fs/minix/namei.c
index 382ead96bf54..b99696b90b42 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) {