Skip to content

Commit c186afb

Browse files
author
Al Viro
committed
switch ->is_partially_uptodate() to saner arguments
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent fbb3275 commit c186afb

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎Documentation/filesystems/Locking‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ prototypes:
198198
unsigned long *);
199199
int (*migratepage)(struct address_space *, struct page *, struct page *);
200200
int (*launder_page)(struct page *);
201-
int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long);
201+
int (*is_partially_uptodate)(struct page *, unsigned long, unsigned long);
202202
int (*error_remove_page)(struct address_space *, struct page *);
203203
int (*swap_activate)(struct file *);
204204
int (*swap_deactivate)(struct file *);

‎Documentation/filesystems/vfs.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ struct address_space_operations {
580580
/* migrate the contents of a page to the specified target */
581581
int (*migratepage) (struct page *, struct page *);
582582
int (*launder_page) (struct page *);
583-
int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
583+
int (*is_partially_uptodate) (struct page *, unsigned long,
584584
unsigned long);
585585
void (*is_dirty_writeback) (struct page *, bool *, bool *);
586586
int (*error_remove_page) (struct mapping *mapping, struct page *page);

‎fs/buffer.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,8 +2114,8 @@ EXPORT_SYMBOL(generic_write_end);
21142114
* Returns true if all buffers which correspond to a file portion
21152115
* we want to read are uptodate.
21162116
*/
2117-
int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc,
2118-
unsigned long from)
2117+
int block_is_partially_uptodate(struct page *page, unsigned long from,
2118+
unsigned long count)
21192119
{
21202120
unsigned block_start, block_end, blocksize;
21212121
unsigned to;
@@ -2127,7 +2127,7 @@ int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc,
21272127

21282128
head = page_buffers(page);
21292129
blocksize = head->b_size;
2130-
to = min_t(unsigned, PAGE_CACHE_SIZE - from, desc->count);
2130+
to = min_t(unsigned, PAGE_CACHE_SIZE - from, count);
21312131
to = from + to;
21322132
if (from < blocksize && to > PAGE_CACHE_SIZE - blocksize)
21332133
return 0;

‎include/linux/buffer_head.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ int block_write_full_page(struct page *page, get_block_t *get_block,
210210
int block_write_full_page_endio(struct page *page, get_block_t *get_block,
211211
struct writeback_control *wbc, bh_end_io_t *handler);
212212
int block_read_full_page(struct page*, get_block_t*);
213-
int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc,
214-
unsigned long from);
213+
int block_is_partially_uptodate(struct page *page, unsigned long from,
214+
unsigned long count);
215215
int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len,
216216
unsigned flags, struct page **pagep, get_block_t *get_block);
217217
int __block_write_begin(struct page *page, loff_t pos, unsigned len,

‎include/linux/fs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ struct address_space_operations {
385385
int (*migratepage) (struct address_space *,
386386
struct page *, struct page *, enum migrate_mode);
387387
int (*launder_page) (struct page *);
388-
int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
388+
int (*is_partially_uptodate) (struct page *, unsigned long,
389389
unsigned long);
390390
void (*is_dirty_writeback) (struct page *, bool *, bool *);
391391
int (*error_remove_page)(struct address_space *, struct page *);

‎mm/filemap.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ static void do_generic_file_read(struct file *filp, loff_t *ppos,
11481148
if (!page->mapping)
11491149
goto page_not_up_to_date_locked;
11501150
if (!mapping->a_ops->is_partially_uptodate(page,
1151-
desc, offset))
1151+
offset, desc->count))
11521152
goto page_not_up_to_date_locked;
11531153
unlock_page(page);
11541154
}

0 commit comments

Comments
 (0)