summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/brocade/bna/bnad_debugfs.c
diff options
context:
space:
mode:
authorAl Viro2013-06-16 19:06:06 +0200
committerLinus Torvalds2013-06-16 20:10:53 +0200
commit8177a9d79c0e942dcac3312f15585d0344d505a5 (patch)
treecef7a714336504ee41924e984fe3b0e721af23d1 /drivers/net/ethernet/brocade/bna/bnad_debugfs.c
parentLinux 3.10-rc6 (diff)
downloadkernel-qcow2-linux-8177a9d79c0e942dcac3312f15585d0344d505a5.tar.gz
kernel-qcow2-linux-8177a9d79c0e942dcac3312f15585d0344d505a5.tar.xz
kernel-qcow2-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/net/ethernet/brocade/bna/bnad_debugfs.c')
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c
index 6e8bc9d88c41..94d957d203a6 100644
--- a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c
+++ b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c
@@ -244,7 +244,7 @@ bnad_debugfs_lseek(struct file *file, loff_t offset, int orig)
file->f_pos += offset;
break;
case 2:
- file->f_pos = debug->buffer_len - offset;
+ file->f_pos = debug->buffer_len + offset;
break;
default:
return -EINVAL;