@@ -303,7 +303,7 @@ static int ext4_file_open(struct inode * inode, struct file * filp)
303303 * page cache has data or not.
304304 */
305305static int ext4_find_unwritten_pgoff (struct inode * inode ,
306- int origin ,
306+ int whence ,
307307 struct ext4_map_blocks * map ,
308308 loff_t * offset )
309309{
@@ -333,10 +333,10 @@ static int ext4_find_unwritten_pgoff(struct inode *inode,
333333 nr_pages = pagevec_lookup (& pvec , inode -> i_mapping , index ,
334334 (pgoff_t )num );
335335 if (nr_pages == 0 ) {
336- if (origin == SEEK_DATA )
336+ if (whence == SEEK_DATA )
337337 break ;
338338
339- BUG_ON (origin != SEEK_HOLE );
339+ BUG_ON (whence != SEEK_HOLE );
340340 /*
341341 * If this is the first time to go into the loop and
342342 * offset is not beyond the end offset, it will be a
@@ -352,7 +352,7 @@ static int ext4_find_unwritten_pgoff(struct inode *inode,
352352 * offset is smaller than the first page offset, it will be a
353353 * hole at this offset.
354354 */
355- if (lastoff == startoff && origin == SEEK_HOLE &&
355+ if (lastoff == startoff && whence == SEEK_HOLE &&
356356 lastoff < page_offset (pvec .pages [0 ])) {
357357 found = 1 ;
358358 break ;
@@ -366,7 +366,7 @@ static int ext4_find_unwritten_pgoff(struct inode *inode,
366366 * If the current offset is not beyond the end of given
367367 * range, it will be a hole.
368368 */
369- if (lastoff < endoff && origin == SEEK_HOLE &&
369+ if (lastoff < endoff && whence == SEEK_HOLE &&
370370 page -> index > end ) {
371371 found = 1 ;
372372 * offset = lastoff ;
@@ -391,10 +391,10 @@ static int ext4_find_unwritten_pgoff(struct inode *inode,
391391 do {
392392 if (buffer_uptodate (bh ) ||
393393 buffer_unwritten (bh )) {
394- if (origin == SEEK_DATA )
394+ if (whence == SEEK_DATA )
395395 found = 1 ;
396396 } else {
397- if (origin == SEEK_HOLE )
397+ if (whence == SEEK_HOLE )
398398 found = 1 ;
399399 }
400400 if (found ) {
@@ -416,7 +416,7 @@ static int ext4_find_unwritten_pgoff(struct inode *inode,
416416 * The no. of pages is less than our desired, that would be a
417417 * hole in there.
418418 */
419- if (nr_pages < num && origin == SEEK_HOLE ) {
419+ if (nr_pages < num && whence == SEEK_HOLE ) {
420420 found = 1 ;
421421 * offset = lastoff ;
422422 break ;
@@ -609,7 +609,7 @@ static loff_t ext4_seek_hole(struct file *file, loff_t offset, loff_t maxsize)
609609 * by calling generic_file_llseek_size() with the appropriate maxbytes
610610 * value for each.
611611 */
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 )
613613{
614614 struct inode * inode = file -> f_mapping -> host ;
615615 loff_t maxbytes ;
@@ -619,11 +619,11 @@ loff_t ext4_llseek(struct file *file, loff_t offset, int origin)
619619 else
620620 maxbytes = inode -> i_sb -> s_maxbytes ;
621621
622- switch (origin ) {
622+ switch (whence ) {
623623 case SEEK_SET :
624624 case SEEK_CUR :
625625 case SEEK_END :
626- return generic_file_llseek_size (file , offset , origin ,
626+ return generic_file_llseek_size (file , offset , whence ,
627627 maxbytes , i_size_read (inode ));
628628 case SEEK_DATA :
629629 return ext4_seek_data (file , offset , maxbytes );
0 commit comments