diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2023-11-27 23:30:22 +0900 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-12-10 17:21:45 -0800 |
commit | 6bb09fa1b44f8634e7091d6186bcba80edebfce7 (patch) | |
tree | d845b84e6f662ecd81b2949f15191891c965f466 /fs/nilfs2 | |
parent | 8cf57c6df818f58fdad16a909506be213623a88e (diff) |
nilfs2: remove page_address() from nilfs_set_link
In preparation for removing kmap from directory handling, use
offset_in_page() to calculate 'from'. Matches ext2.
Link: https://lkml.kernel.org/r/20231127143036.2425-4-konishi.ryusuke@gmail.com
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2')
-rw-r--r-- | fs/nilfs2/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c index b9f13bdf8fba..9c0513245a3b 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c @@ -410,7 +410,7 @@ ino_t nilfs_inode_by_name(struct inode *dir, const struct qstr *qstr) void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de, struct page *page, struct inode *inode) { - unsigned int from = (char *)de - (char *)page_address(page); + unsigned int from = offset_in_page(de); unsigned int to = from + nilfs_rec_len_from_disk(de->rec_len); struct address_space *mapping = page->mapping; int err; |