Commit a80f2d22 authored by Fabian Frederick's avatar Fabian Frederick Committed by Al Viro

fs/affs: bugfix: Write files greater than page size on OFS

Previous AFFS patch fixed OFS write operations but unveiled
another bug: files greater than 4KB are being created with a wrong
size resulting in errors like the following:

dd if=/dev/zero of=file bs=4097 count=1
cp file /mnt/affs/
cp: error writing '/mnt/affs/file': Bad address
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 077e073e
...@@ -679,7 +679,7 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping, ...@@ -679,7 +679,7 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping,
int written; int written;
from = pos & (PAGE_SIZE - 1); from = pos & (PAGE_SIZE - 1);
to = pos + len; to = from + len;
/* /*
* XXX: not sure if this can handle short copies (len < copied), but * XXX: not sure if this can handle short copies (len < copied), but
* we don't have to, because the page should always be uptodate here, * we don't have to, because the page should always be uptodate here,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment