summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fnic
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-06-17 17:44:23 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-06-29 12:57:31 +0400
commiteb5881d37fe2c8c43c92bb7f2c87fba90a2103f2 (patch)
treed9c6b6835d28be4856342fd65df14d4d3699954c /drivers/scsi/fnic
parent65004276fc45a37c133f09a86712e6f2daede342 (diff)
downloadlinux-eb5881d37fe2c8c43c92bb7f2c87fba90a2103f2.tar.bz2
fnic: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/scsi/fnic')
-rw-r--r--drivers/scsi/fnic/fnic_debugfs.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index 85e1ffd0e5c5..cbcb0121c84d 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -164,20 +164,8 @@ static loff_t fnic_trace_debugfs_lseek(struct file *file,
int howto)
{
fnic_dbgfs_t *fnic_dbg_prt = file->private_data;
- loff_t pos = -1;
-
- switch (howto) {
- case 0:
- pos = offset;
- break;
- case 1:
- pos = file->f_pos + offset;
- break;
- case 2:
- pos = fnic_dbg_prt->buffer_len + offset;
- }
- return (pos < 0 || pos > fnic_dbg_prt->buffer_len) ?
- -EINVAL : (file->f_pos = pos);
+ return fixed_size_llseek(file, offset, howto,
+ fnic_dbg_prt->buffer_len);
}
/*