]> git.baikalelectronics.ru Git - kernel.git/commit
[CIFS] fix regression in cifs_write_begin/cifs_write_end
authorJeff Layton <jlayton@redhat.com>
Wed, 26 Nov 2008 19:32:33 +0000 (19:32 +0000)
committerSteve French <sfrench@us.ibm.com>
Wed, 26 Nov 2008 19:32:33 +0000 (19:32 +0000)
commit233ca2356dd2f14c282323cec70b6ec33f95ae97
treeed8557a1755d4e924643cbaf75bb04511f69b3a6
parent6a7f399dc7dd413e6c12303f3fa8e11caf2c9817
[CIFS] fix regression in cifs_write_begin/cifs_write_end

The conversion to write_begin/write_end interfaces had a bug where we
were passing a bad parameter to cifs_readpage_worker. Rather than
passing the page offset of the start of the write, we needed to pass the
offset of the beginning of the page. This was reliably showing up as
data corruption in the fsx-linux test from LTP.

It also became evident that this code was occasionally doing unnecessary
read calls. Optimize those away by using the PG_checked flag to indicate
that the unwritten part of the page has been initialized.

CC: Nick Piggin <npiggin@suse.de>
Acked-by: Dave Kleikamp <shaggy@us.ibm.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/file.c