fnic: switch to fixed_size_llseek()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Родитель
65004276fc
Коммит
eb5881d37f
|
@ -164,20 +164,8 @@ static loff_t fnic_trace_debugfs_lseek(struct file *file,
|
||||||
int howto)
|
int howto)
|
||||||
{
|
{
|
||||||
fnic_dbgfs_t *fnic_dbg_prt = file->private_data;
|
fnic_dbgfs_t *fnic_dbg_prt = file->private_data;
|
||||||
loff_t pos = -1;
|
return fixed_size_llseek(file, offset, howto,
|
||||||
|
fnic_dbg_prt->buffer_len);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче