summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fnic
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2013-06-16 18:06:06 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-16 08:10:53 -1000
commit8177a9d79c0e942dcac3312f15585d0344d505a5 (patch)
treecef7a714336504ee41924e984fe3b0e721af23d1 /drivers/scsi/fnic
parent7d132055814ef17a6c7b69f342244c410a5e000f (diff)
downloadtalos-obmc-linux-8177a9d79c0e942dcac3312f15585d0344d505a5.tar.gz
talos-obmc-linux-8177a9d79c0e942dcac3312f15585d0344d505a5.zip
lseek(fd, n, SEEK_END) does *not* go to eof - n
When you copy some code, you are supposed to read it. If nothing else, there's a chance to spot and fix an obvious bug instead of sharing it... X-Song: "I Got It From Agnes", by Tom Lehrer Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> [ Tom Lehrer? You're dating yourself, Al ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi/fnic')
-rw-r--r--drivers/scsi/fnic/fnic_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index adc1f7f471f5..85e1ffd0e5c5 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -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);
OpenPOWER on IntegriCloud