Skip to content

File tree

4 files changed

+244
-202
lines changed

4 files changed

+244
-202
lines changed

fs/afs/dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,6 +2083,6 @@ static void afs_dir_invalidatepage(struct page *page, unsigned int offset,
20832083
afs_stat_v(dvnode, n_inval);
20842084

20852085
/* we clean up only if the entire page is being invalidated */
2086-
if (offset == 0 && length == PAGE_SIZE)
2086+
if (offset == 0 && length == thp_size(page))
20872087
detach_page_private(page);
20882088
}

fs/afs/file.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ static int afs_page_filler(struct key *key, struct page *page)
329329
req->vnode = vnode;
330330
req->key = key_get(key);
331331
req->pos = (loff_t)page->index << PAGE_SHIFT;
332-
req->len = PAGE_SIZE;
333-
req->nr_pages = 1;
332+
req->len = thp_size(page);
333+
req->nr_pages = thp_nr_pages(page);
334334
req->done = afs_file_read_done;
335335
req->cleanup = afs_file_read_cleanup;
336336

@@ -574,8 +574,8 @@ static void afs_invalidate_dirty(struct page *page, unsigned int offset,
574574
trace_afs_page_dirty(vnode, tracepoint_string("undirty"), page);
575575
clear_page_dirty_for_io(page);
576576
full_invalidate:
577-
detach_page_private(page);
578577
trace_afs_page_dirty(vnode, tracepoint_string("inval"), page);
578+
detach_page_private(page);
579579
}
580580

581581
/*
@@ -620,8 +620,8 @@ static int afs_releasepage(struct page *page, gfp_t gfp_flags)
620620
#endif
621621

622622
if (PagePrivate(page)) {
623-
detach_page_private(page);
624623
trace_afs_page_dirty(vnode, tracepoint_string("rel"), page);
624+
detach_page_private(page);
625625
}
626626

627627
/* indicate that the page can be released */

fs/afs/internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,6 @@ struct afs_operation {
815815
loff_t pos;
816816
loff_t size;
817817
loff_t i_size;
818-
pgoff_t first; /* first page in mapping to deal with */
819-
pgoff_t last; /* last page in mapping to deal with */
820818
bool laundering; /* Laundering page, PG_writeback not set */
821819
} store;
822820
struct {

0 commit comments

Comments
 (0)