diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-12-13 20:14:50 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2023-05-29 11:03:25 +0200 |
commit | 91f646fb971f4401216a2dff5c568bcbce79a923 (patch) | |
tree | 97e6eac0e81885499e3b6ffd592ab38f5c002690 /fs/ext2/namei.c | |
parent | 46022375abe8160b6c952a2ca0ea7988be6b888d (diff) |
ext2_put_page(): accept any pointer within the page
eliminates the need to keep the pointer to the first byte within
the page if we are guaranteed to have pointers to some byte
in the same page at hand.
Don't backport without commit 88d7b12068b9 ("highmem: round down the
address passed to kunmap_flush_on_unmap()").
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reviewed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Tested-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext2/namei.c')
-rw-r--r-- | fs/ext2/namei.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index dafdd2d41876..50105d50c48a 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c @@ -288,7 +288,7 @@ static int ext2_unlink(struct inode * dir, struct dentry *dentry) } err = ext2_delete_entry (de, page, page_addr); - ext2_put_page(page, page_addr); + ext2_put_page(page, de); if (err) goto out; @@ -370,7 +370,7 @@ static int ext2_rename (struct mnt_idmap * idmap, } err = ext2_set_link(new_dir, new_de, new_page, page_addr, old_inode, true); - ext2_put_page(new_page, page_addr); + ext2_put_page(new_page, new_de); if (err) goto out_dir; new_inode->i_ctime = current_time(new_inode); @@ -402,9 +402,9 @@ static int ext2_rename (struct mnt_idmap * idmap, } out_dir: if (dir_de) - ext2_put_page(dir_page, dir_page_addr); + ext2_put_page(dir_page, dir_de); out_old: - ext2_put_page(old_page, old_page_addr); + ext2_put_page(old_page, old_de); return err; } |