Skip to content

Commit eb5881d

Browse files
author
Al Viro
committed
fnic: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 6500427 commit eb5881d

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

‎drivers/scsi/fnic/fnic_debugfs.c‎

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,20 +164,8 @@ static loff_t fnic_trace_debugfs_lseek(struct file *file,
164164
int howto)
165165
{
166166
fnic_dbgfs_t *fnic_dbg_prt = file->private_data;
167-
loff_t pos = -1;
168-
169-
switch (howto) {
170-
case 0:
171-
pos = offset;
172-
break;
173-
case 1:
174-
pos = file->f_pos + offset;
175-
break;
176-
case 2:
177-
pos = fnic_dbg_prt->buffer_len + offset;
178-
}
179-
return (pos < 0 || pos > fnic_dbg_prt->buffer_len) ?
180-
-EINVAL : (file->f_pos = pos);
167+
return fixed_size_llseek(file, offset, howto,
168+
fnic_dbg_prt->buffer_len);
181169
}
182170

183171
/*

0 commit comments

Comments
 (0)