diff options
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; |