lseek: the "whence" argument is called "whence"
[linux-block.git] / fs / ocfs2 / extent_map.c
index 70b5863a2d64e05cde6474bd387112f3b470b5e7..f487aa3434428d889fdcc3e7c8df0a54879c6b8b 100644 (file)
@@ -832,7 +832,7 @@ out:
        return ret;
 }
 
-int ocfs2_seek_data_hole_offset(struct file *file, loff_t *offset, int origin)
+int ocfs2_seek_data_hole_offset(struct file *file, loff_t *offset, int whence)
 {
        struct inode *inode = file->f_mapping->host;
        int ret;
@@ -843,7 +843,7 @@ int ocfs2_seek_data_hole_offset(struct file *file, loff_t *offset, int origin)
        struct buffer_head *di_bh = NULL;
        struct ocfs2_extent_rec rec;
 
-       BUG_ON(origin != SEEK_DATA && origin != SEEK_HOLE);
+       BUG_ON(whence != SEEK_DATA && whence != SEEK_HOLE);
 
        ret = ocfs2_inode_lock(inode, &di_bh, 0);
        if (ret) {
@@ -859,7 +859,7 @@ int ocfs2_seek_data_hole_offset(struct file *file, loff_t *offset, int origin)
        }
 
        if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
-               if (origin == SEEK_HOLE)
+               if (whence == SEEK_HOLE)
                        *offset = inode->i_size;
                goto out_unlock;
        }
@@ -888,8 +888,8 @@ int ocfs2_seek_data_hole_offset(struct file *file, loff_t *offset, int origin)
                        is_data = (rec.e_flags & OCFS2_EXT_UNWRITTEN) ?  0 : 1;
                }
 
-               if ((!is_data && origin == SEEK_HOLE) ||
-                   (is_data && origin == SEEK_DATA)) {
+               if ((!is_data && whence == SEEK_HOLE) ||
+                   (is_data && whence == SEEK_DATA)) {
                        if (extoff > *offset)
                                *offset = extoff;
                        goto out_unlock;
@@ -899,7 +899,7 @@ int ocfs2_seek_data_hole_offset(struct file *file, loff_t *offset, int origin)
                        cpos += clen;
        }
 
-       if (origin == SEEK_HOLE) {
+       if (whence == SEEK_HOLE) {
                extoff = cpos;
                extoff <<= cs_bits;
                extlen = clen;