diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2013-06-16 21:06:06 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-16 22:10:53 +0400 |
commit | 8177a9d79c0e942dcac3312f15585d0344d505a5 (patch) | |
tree | cef7a714336504ee41924e984fe3b0e721af23d1 /drivers/scsi/lpfc | |
parent | 7d132055814ef17a6c7b69f342244c410a5e000f (diff) | |
download | linux-8177a9d79c0e942dcac3312f15585d0344d505a5.tar.xz |
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/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_debugfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index f63f5ff7f274..f525ecb7a9c6 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c @@ -1178,7 +1178,7 @@ lpfc_debugfs_lseek(struct file *file, loff_t off, int whence) pos = file->f_pos + off; break; case 2: - pos = debug->len - off; + pos = debug->len + off; } return (pos < 0 || pos > debug->len) ? -EINVAL : (file->f_pos = pos); } |