lseek(fd, n, SEEK_END) does *not* go to eof - n
[linux-2.6-microblaze.git] / drivers / scsi / fnic / fnic_debugfs.c
index adc1f7f..85e1ffd 100644 (file)
@@ -174,7 +174,7 @@ static loff_t fnic_trace_debugfs_lseek(struct file *file,
                pos = file->f_pos + offset;
                break;
        case 2:
-               pos = fnic_dbg_prt->buffer_len - offset;
+               pos = fnic_dbg_prt->buffer_len + offset;
        }
        return (pos < 0 || pos > fnic_dbg_prt->buffer_len) ?
                          -EINVAL : (file->f_pos = pos);