aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/read_write.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index 1f8dc373ede7..0642a1691d15 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -37,10 +37,10 @@ loff_t generic_file_llseek(struct file *file, loff_t offset, int origin)
37 37
38 mutex_lock(&inode->i_mutex); 38 mutex_lock(&inode->i_mutex);
39 switch (origin) { 39 switch (origin) {
40 case 2: 40 case SEEK_END:
41 offset += inode->i_size; 41 offset += inode->i_size;
42 break; 42 break;
43 case 1: 43 case SEEK_CUR:
44 offset += file->f_pos; 44 offset += file->f_pos;
45 } 45 }
46 retval = -EINVAL; 46 retval = -EINVAL;
@@ -63,10 +63,10 @@ loff_t remote_llseek(struct file *file, loff_t offset, int origin)
63 63
64 lock_kernel(); 64 lock_kernel();
65 switch (origin) { 65 switch (origin) {
66 case 2: 66 case SEEK_END:
67 offset += i_size_read(file->f_path.dentry->d_inode); 67 offset += i_size_read(file->f_path.dentry->d_inode);
68 break; 68 break;
69 case 1: 69 case SEEK_CUR:
70 offset += file->f_pos; 70 offset += file->f_pos;
71 } 71 }
72 retval = -EINVAL; 72 retval = -EINVAL;
@@ -94,10 +94,10 @@ loff_t default_llseek(struct file *file, loff_t offset, int origin)
94 94
95 lock_kernel(); 95 lock_kernel();
96 switch (origin) { 96 switch (origin) {
97 case 2: 97 case SEEK_END:
98 offset += i_size_read(file->f_path.dentry->d_inode); 98 offset += i_size_read(file->f_path.dentry->d_inode);
99 break; 99 break;
100 case 1: 100 case SEEK_CUR:
101 offset += file->f_pos; 101 offset += file->f_pos;
102 } 102 }
103 retval = -EINVAL; 103 retval = -EINVAL;