diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2012-12-17 18:59:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:12 -0500 |
commit | 965c8e59cfcf845ecde2265a1d1bfee5f011d302 (patch) | |
tree | 22758a99b4ecb475750966d5202200dc0e89876c /fs/ceph | |
parent | c0f041602c33bae10b8e321c49024490d03ced3d (diff) |
lseek: the "whence" argument is called "whence"
But the kernel decided to call it "origin" instead. Fix most of the
sites.
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/dir.c | 4 | ||||
-rw-r--r-- | fs/ceph/file.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index e5b77319c97b..8c1aabe93b67 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -454,7 +454,7 @@ static void reset_readdir(struct ceph_file_info *fi) | |||
454 | fi->flags &= ~CEPH_F_ATEND; | 454 | fi->flags &= ~CEPH_F_ATEND; |
455 | } | 455 | } |
456 | 456 | ||
457 | static loff_t ceph_dir_llseek(struct file *file, loff_t offset, int origin) | 457 | static loff_t ceph_dir_llseek(struct file *file, loff_t offset, int whence) |
458 | { | 458 | { |
459 | struct ceph_file_info *fi = file->private_data; | 459 | struct ceph_file_info *fi = file->private_data; |
460 | struct inode *inode = file->f_mapping->host; | 460 | struct inode *inode = file->f_mapping->host; |
@@ -463,7 +463,7 @@ static loff_t ceph_dir_llseek(struct file *file, loff_t offset, int origin) | |||
463 | 463 | ||
464 | mutex_lock(&inode->i_mutex); | 464 | mutex_lock(&inode->i_mutex); |
465 | retval = -EINVAL; | 465 | retval = -EINVAL; |
466 | switch (origin) { | 466 | switch (whence) { |
467 | case SEEK_END: | 467 | case SEEK_END: |
468 | offset += inode->i_size + 2; /* FIXME */ | 468 | offset += inode->i_size + 2; /* FIXME */ |
469 | break; | 469 | break; |
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 5840d2aaed15..d4dfdcf76d7f 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
@@ -797,7 +797,7 @@ out: | |||
797 | /* | 797 | /* |
798 | * llseek. be sure to verify file size on SEEK_END. | 798 | * llseek. be sure to verify file size on SEEK_END. |
799 | */ | 799 | */ |
800 | static loff_t ceph_llseek(struct file *file, loff_t offset, int origin) | 800 | static loff_t ceph_llseek(struct file *file, loff_t offset, int whence) |
801 | { | 801 | { |
802 | struct inode *inode = file->f_mapping->host; | 802 | struct inode *inode = file->f_mapping->host; |
803 | int ret; | 803 | int ret; |
@@ -805,7 +805,7 @@ static loff_t ceph_llseek(struct file *file, loff_t offset, int origin) | |||
805 | mutex_lock(&inode->i_mutex); | 805 | mutex_lock(&inode->i_mutex); |
806 | __ceph_do_pending_vmtruncate(inode); | 806 | __ceph_do_pending_vmtruncate(inode); |
807 | 807 | ||
808 | if (origin == SEEK_END || origin == SEEK_DATA || origin == SEEK_HOLE) { | 808 | if (whence == SEEK_END || whence == SEEK_DATA || whence == SEEK_HOLE) { |
809 | ret = ceph_do_getattr(inode, CEPH_STAT_CAP_SIZE); | 809 | ret = ceph_do_getattr(inode, CEPH_STAT_CAP_SIZE); |
810 | if (ret < 0) { | 810 | if (ret < 0) { |
811 | offset = ret; | 811 | offset = ret; |
@@ -813,7 +813,7 @@ static loff_t ceph_llseek(struct file *file, loff_t offset, int origin) | |||
813 | } | 813 | } |
814 | } | 814 | } |
815 | 815 | ||
816 | switch (origin) { | 816 | switch (whence) { |
817 | case SEEK_END: | 817 | case SEEK_END: |
818 | offset += inode->i_size; | 818 | offset += inode->i_size; |
819 | break; | 819 | break; |