diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/dir.c | 6 | ||||
-rw-r--r-- | fs/ext4/file.c | 22 |
2 files changed, 14 insertions, 14 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index b8d877f6c1fa..80a28b297279 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c | |||
@@ -333,17 +333,17 @@ static inline loff_t ext4_get_htree_eof(struct file *filp) | |||
333 | * | 333 | * |
334 | * For non-htree, ext4_llseek already chooses the proper max offset. | 334 | * For non-htree, ext4_llseek already chooses the proper max offset. |
335 | */ | 335 | */ |
336 | loff_t ext4_dir_llseek(struct file *file, loff_t offset, int origin) | 336 | loff_t ext4_dir_llseek(struct file *file, loff_t offset, int whence) |
337 | { | 337 | { |
338 | struct inode *inode = file->f_mapping->host; | 338 | struct inode *inode = file->f_mapping->host; |
339 | int dx_dir = is_dx_dir(inode); | 339 | int dx_dir = is_dx_dir(inode); |
340 | loff_t htree_max = ext4_get_htree_eof(file); | 340 | loff_t htree_max = ext4_get_htree_eof(file); |
341 | 341 | ||
342 | if (likely(dx_dir)) | 342 | if (likely(dx_dir)) |
343 | return generic_file_llseek_size(file, offset, origin, | 343 | return generic_file_llseek_size(file, offset, whence, |
344 | htree_max, htree_max); | 344 | htree_max, htree_max); |
345 | else | 345 | else |
346 | return ext4_llseek(file, offset, origin); | 346 | return ext4_llseek(file, offset, whence); |
347 | } | 347 | } |
348 | 348 | ||
349 | /* | 349 | /* |
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index b64a60bf105a..d07c27ca594a 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c | |||
@@ -303,7 +303,7 @@ static int ext4_file_open(struct inode * inode, struct file * filp) | |||
303 | * page cache has data or not. | 303 | * page cache has data or not. |
304 | */ | 304 | */ |
305 | static int ext4_find_unwritten_pgoff(struct inode *inode, | 305 | static int ext4_find_unwritten_pgoff(struct inode *inode, |
306 | int origin, | 306 | int whence, |
307 | struct ext4_map_blocks *map, | 307 | struct ext4_map_blocks *map, |
308 | loff_t *offset) | 308 | loff_t *offset) |
309 | { | 309 | { |
@@ -333,10 +333,10 @@ static int ext4_find_unwritten_pgoff(struct inode *inode, | |||
333 | nr_pages = pagevec_lookup(&pvec, inode->i_mapping, index, | 333 | nr_pages = pagevec_lookup(&pvec, inode->i_mapping, index, |
334 | (pgoff_t)num); | 334 | (pgoff_t)num); |
335 | if (nr_pages == 0) { | 335 | if (nr_pages == 0) { |
336 | if (origin == SEEK_DATA) | 336 | if (whence == SEEK_DATA) |
337 | break; | 337 | break; |
338 | 338 | ||
339 | BUG_ON(origin != SEEK_HOLE); | 339 | BUG_ON(whence != SEEK_HOLE); |
340 | /* | 340 | /* |
341 | * If this is the first time to go into the loop and | 341 | * If this is the first time to go into the loop and |
342 | * offset is not beyond the end offset, it will be a | 342 | * offset is not beyond the end offset, it will be a |
@@ -352,7 +352,7 @@ static int ext4_find_unwritten_pgoff(struct inode *inode, | |||
352 | * offset is smaller than the first page offset, it will be a | 352 | * offset is smaller than the first page offset, it will be a |
353 | * hole at this offset. | 353 | * hole at this offset. |
354 | */ | 354 | */ |
355 | if (lastoff == startoff && origin == SEEK_HOLE && | 355 | if (lastoff == startoff && whence == SEEK_HOLE && |
356 | lastoff < page_offset(pvec.pages[0])) { | 356 | lastoff < page_offset(pvec.pages[0])) { |
357 | found = 1; | 357 | found = 1; |
358 | break; | 358 | break; |
@@ -366,7 +366,7 @@ static int ext4_find_unwritten_pgoff(struct inode *inode, | |||
366 | * If the current offset is not beyond the end of given | 366 | * If the current offset is not beyond the end of given |
367 | * range, it will be a hole. | 367 | * range, it will be a hole. |
368 | */ | 368 | */ |
369 | if (lastoff < endoff && origin == SEEK_HOLE && | 369 | if (lastoff < endoff && whence == SEEK_HOLE && |
370 | page->index > end) { | 370 | page->index > end) { |
371 | found = 1; | 371 | found = 1; |
372 | *offset = lastoff; | 372 | *offset = lastoff; |
@@ -391,10 +391,10 @@ static int ext4_find_unwritten_pgoff(struct inode *inode, | |||
391 | do { | 391 | do { |
392 | if (buffer_uptodate(bh) || | 392 | if (buffer_uptodate(bh) || |
393 | buffer_unwritten(bh)) { | 393 | buffer_unwritten(bh)) { |
394 | if (origin == SEEK_DATA) | 394 | if (whence == SEEK_DATA) |
395 | found = 1; | 395 | found = 1; |
396 | } else { | 396 | } else { |
397 | if (origin == SEEK_HOLE) | 397 | if (whence == SEEK_HOLE) |
398 | found = 1; | 398 | found = 1; |
399 | } | 399 | } |
400 | if (found) { | 400 | if (found) { |
@@ -416,7 +416,7 @@ static int ext4_find_unwritten_pgoff(struct inode *inode, | |||
416 | * The no. of pages is less than our desired, that would be a | 416 | * The no. of pages is less than our desired, that would be a |
417 | * hole in there. | 417 | * hole in there. |
418 | */ | 418 | */ |
419 | if (nr_pages < num && origin == SEEK_HOLE) { | 419 | if (nr_pages < num && whence == SEEK_HOLE) { |
420 | found = 1; | 420 | found = 1; |
421 | *offset = lastoff; | 421 | *offset = lastoff; |
422 | break; | 422 | break; |
@@ -609,7 +609,7 @@ static loff_t ext4_seek_hole(struct file *file, loff_t offset, loff_t maxsize) | |||
609 | * by calling generic_file_llseek_size() with the appropriate maxbytes | 609 | * by calling generic_file_llseek_size() with the appropriate maxbytes |
610 | * value for each. | 610 | * value for each. |
611 | */ | 611 | */ |
612 | loff_t ext4_llseek(struct file *file, loff_t offset, int origin) | 612 | loff_t ext4_llseek(struct file *file, loff_t offset, int whence) |
613 | { | 613 | { |
614 | struct inode *inode = file->f_mapping->host; | 614 | struct inode *inode = file->f_mapping->host; |
615 | loff_t maxbytes; | 615 | loff_t maxbytes; |
@@ -619,11 +619,11 @@ loff_t ext4_llseek(struct file *file, loff_t offset, int origin) | |||
619 | else | 619 | else |
620 | maxbytes = inode->i_sb->s_maxbytes; | 620 | maxbytes = inode->i_sb->s_maxbytes; |
621 | 621 | ||
622 | switch (origin) { | 622 | switch (whence) { |
623 | case SEEK_SET: | 623 | case SEEK_SET: |
624 | case SEEK_CUR: | 624 | case SEEK_CUR: |
625 | case SEEK_END: | 625 | case SEEK_END: |
626 | return generic_file_llseek_size(file, offset, origin, | 626 | return generic_file_llseek_size(file, offset, whence, |
627 | maxbytes, i_size_read(inode)); | 627 | maxbytes, i_size_read(inode)); |
628 | case SEEK_DATA: | 628 | case SEEK_DATA: |
629 | return ext4_seek_data(file, offset, maxbytes); | 629 | return ext4_seek_data(file, offset, maxbytes); |