diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-23 04:08:05 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 04:57:47 -0400 |
commit | 7233c774080820b611f85a0a057ff4b43e9276f2 (patch) | |
tree | d22c2f6e055c337922aca986c12a37b8e6d9b448 /drivers/scsi | |
parent | 7b2296afb392bc21a50f42e7c7f4b19d3fea8c6d (diff) |
lpfc: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_debugfs.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index f525ecb7a9c6..60084e6ad2f2 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c | |||
@@ -1165,22 +1165,8 @@ out: | |||
1165 | static loff_t | 1165 | static loff_t |
1166 | lpfc_debugfs_lseek(struct file *file, loff_t off, int whence) | 1166 | lpfc_debugfs_lseek(struct file *file, loff_t off, int whence) |
1167 | { | 1167 | { |
1168 | struct lpfc_debug *debug; | 1168 | struct lpfc_debug *debug = file->private_data; |
1169 | loff_t pos = -1; | 1169 | return fixed_size_llseek(file, off, whence, debug->len); |
1170 | |||
1171 | debug = file->private_data; | ||
1172 | |||
1173 | switch (whence) { | ||
1174 | case 0: | ||
1175 | pos = off; | ||
1176 | break; | ||
1177 | case 1: | ||
1178 | pos = file->f_pos + off; | ||
1179 | break; | ||
1180 | case 2: | ||
1181 | pos = debug->len + off; | ||
1182 | } | ||
1183 | return (pos < 0 || pos > debug->len) ? -EINVAL : (file->f_pos = pos); | ||
1184 | } | 1170 | } |
1185 | 1171 | ||
1186 | /** | 1172 | /** |