Skip to content

Commit 0d0b864

Browse files
author
Al Viro
committed
ufs_rename(): fix bogus argument of folio_release_kmap()
new_dir does *NOT* point into dir_folio - it's an inode, not a pointer to ufs directory entry. Fixes: 516b97c "ufs: Convert directory handling to kmap_local" Acked-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 9852d85 commit 0d0b864

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ufs/namei.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ static int ufs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
307307
if (old_dir != new_dir)
308308
ufs_set_link(old_inode, dir_de, dir_folio, new_dir, 0);
309309
else
310-
folio_release_kmap(dir_folio, new_dir);
310+
folio_release_kmap(dir_folio, dir_de);
311311
inode_dec_link_count(old_dir);
312312
}
313313
return 0;

0 commit comments

Comments
 (0)