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/gfs2/file.c | |
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/gfs2/file.c')
-rw-r--r-- | fs/gfs2/file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index dfe2d8cb9b2c..991ab2d484dd 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -44,7 +44,7 @@ | |||
44 | * gfs2_llseek - seek to a location in a file | 44 | * gfs2_llseek - seek to a location in a file |
45 | * @file: the file | 45 | * @file: the file |
46 | * @offset: the offset | 46 | * @offset: the offset |
47 | * @origin: Where to seek from (SEEK_SET, SEEK_CUR, or SEEK_END) | 47 | * @whence: Where to seek from (SEEK_SET, SEEK_CUR, or SEEK_END) |
48 | * | 48 | * |
49 | * SEEK_END requires the glock for the file because it references the | 49 | * SEEK_END requires the glock for the file because it references the |
50 | * file's size. | 50 | * file's size. |
@@ -52,26 +52,26 @@ | |||
52 | * Returns: The new offset, or errno | 52 | * Returns: The new offset, or errno |
53 | */ | 53 | */ |
54 | 54 | ||
55 | static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin) | 55 | static loff_t gfs2_llseek(struct file *file, loff_t offset, int whence) |
56 | { | 56 | { |
57 | struct gfs2_inode *ip = GFS2_I(file->f_mapping->host); | 57 | struct gfs2_inode *ip = GFS2_I(file->f_mapping->host); |
58 | struct gfs2_holder i_gh; | 58 | struct gfs2_holder i_gh; |
59 | loff_t error; | 59 | loff_t error; |
60 | 60 | ||
61 | switch (origin) { | 61 | switch (whence) { |
62 | case SEEK_END: /* These reference inode->i_size */ | 62 | case SEEK_END: /* These reference inode->i_size */ |
63 | case SEEK_DATA: | 63 | case SEEK_DATA: |
64 | case SEEK_HOLE: | 64 | case SEEK_HOLE: |
65 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, | 65 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, |
66 | &i_gh); | 66 | &i_gh); |
67 | if (!error) { | 67 | if (!error) { |
68 | error = generic_file_llseek(file, offset, origin); | 68 | error = generic_file_llseek(file, offset, whence); |
69 | gfs2_glock_dq_uninit(&i_gh); | 69 | gfs2_glock_dq_uninit(&i_gh); |
70 | } | 70 | } |
71 | break; | 71 | break; |
72 | case SEEK_CUR: | 72 | case SEEK_CUR: |
73 | case SEEK_SET: | 73 | case SEEK_SET: |
74 | error = generic_file_llseek(file, offset, origin); | 74 | error = generic_file_llseek(file, offset, whence); |
75 | break; | 75 | break; |
76 | default: | 76 | default: |
77 | error = -EINVAL; | 77 | error = -EINVAL; |