diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-11-28 19:44:28 +0000 |
|---|---|---|
| committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2024-12-18 16:42:01 +0300 |
| commit | 1f2bf7049f6ef6048b56b18d0033d3e77b28f973 (patch) | |
| tree | bd7bf346bd59ef23fae4dd40250b70a71b27bab9 /fs/ntfs3 | |
| parent | Linux 6.13-rc1 (diff) | |
| download | linux-1f2bf7049f6ef6048b56b18d0033d3e77b28f973.tar.gz linux-1f2bf7049f6ef6048b56b18d0033d3e77b28f973.zip | |
ntfs3: Remove an access to page->index
Convert the first page passed to ni_write_frame() to a folio and use
folio_pos() on that instead of open-coding the access to folio->index,
cast & shift.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3')
| -rw-r--r-- | fs/ntfs3/frecord.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 8b39d0ce5f28..c57f0686b14b 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -2726,9 +2726,10 @@ int ni_write_frame(struct ntfs_inode *ni, struct page **pages, { int err; struct ntfs_sb_info *sbi = ni->mi.sbi; + struct folio *folio = page_folio(pages[0]); u8 frame_bits = NTFS_LZNT_CUNIT + sbi->cluster_bits; u32 frame_size = sbi->cluster_size << NTFS_LZNT_CUNIT; - u64 frame_vbo = (u64)pages[0]->index << PAGE_SHIFT; + u64 frame_vbo = folio_pos(folio); CLST frame = frame_vbo >> frame_bits; char *frame_ondisk = NULL; struct page **pages_disk = NULL; |
