summaryrefslogtreecommitdiffstats
path: root/fs/ext2/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2022-12-14 02:31:39 +0100
committerJan Kara <jack@suse.cz>2023-05-29 11:03:28 +0200
commitdae42837ba6dd441e4a569996d5f62986ffe01ed (patch)
tree8cfd1c8bf958322fe1389aba4acf67970aa6e87a /fs/ext2/namei.c
parentext2_put_page(): accept any pointer within the page (diff)
downloadlinux-dae42837ba6dd441e4a569996d5f62986ffe01ed.tar.xz
linux-dae42837ba6dd441e4a569996d5f62986ffe01ed.zip
ext2_{set_link,delete_entry}(): don't bother with page_addr
ext2_set_link() simply doesn't use it anymore and ext2_delete_entry() can easily obtain it from the directory entry pointer... 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.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index 50105d50c48a..3e7f895ac2da 100644
--- a/fs/ext2/namei.c
+++ b/fs/ext2/namei.c
@@ -287,7 +287,7 @@ static int ext2_unlink(struct inode * dir, struct dentry *dentry)
goto out;
}
- err = ext2_delete_entry (de, page, page_addr);
+ err = ext2_delete_entry(de, page);
ext2_put_page(page, de);
if (err)
goto out;
@@ -368,8 +368,7 @@ static int ext2_rename (struct mnt_idmap * idmap,
err = PTR_ERR(new_de);
goto out_dir;
}
- err = ext2_set_link(new_dir, new_de, new_page, page_addr,
- old_inode, true);
+ err = ext2_set_link(new_dir, new_de, new_page, old_inode, true);
ext2_put_page(new_page, new_de);
if (err)
goto out_dir;
@@ -392,11 +391,11 @@ static int ext2_rename (struct mnt_idmap * idmap,
old_inode->i_ctime = current_time(old_inode);
mark_inode_dirty(old_inode);
- err = ext2_delete_entry(old_de, old_page, old_page_addr);
+ err = ext2_delete_entry(old_de, old_page);
if (!err && dir_de) {
if (old_dir != new_dir)
err = ext2_set_link(old_inode, dir_de, dir_page,
- dir_page_addr, new_dir, false);
+ new_dir, false);
inode_dec_link_count(old_dir);
}