Skip to content

Commit 1f2bf70

Browse files
Matthew Wilcox (Oracle)aalexandrovich
authored andcommitted
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) <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 40384c8 commit 1f2bf70

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/ntfs3/frecord.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2726,9 +2726,10 @@ int ni_write_frame(struct ntfs_inode *ni, struct page **pages,
27262726
{
27272727
int err;
27282728
struct ntfs_sb_info *sbi = ni->mi.sbi;
2729+
struct folio *folio = page_folio(pages[0]);
27292730
u8 frame_bits = NTFS_LZNT_CUNIT + sbi->cluster_bits;
27302731
u32 frame_size = sbi->cluster_size << NTFS_LZNT_CUNIT;
2731-
u64 frame_vbo = (u64)pages[0]->index << PAGE_SHIFT;
2732+
u64 frame_vbo = folio_pos(folio);
27322733
CLST frame = frame_vbo >> frame_bits;
27332734
char *frame_ondisk = NULL;
27342735
struct page **pages_disk = NULL;

0 commit comments

Comments
 (0)