Scott Mayhew 263b4509ec nfs: always make sure page is up-to-date before extending a write to cover the entire page
We should always make sure the cached page is up-to-date when we're
determining whether we can extend a write to cover the full page -- even
if we've received a write delegation from the server.

Commit c7559663 added logic to skip this check if we have a write
delegation, which can lead to data corruption such as the following
scenario if client B receives a write delegation from the NFS server:

Client A:
    # echo 123456789 > /mnt/file

Client B:
    # echo abcdefghi >> /mnt/file
    # cat /mnt/file
    0�D0�abcdefghi

Just because we hold a write delegation doesn't mean that we've read in
the entire page contents.

Cc: <stable@vger.kernel.org> # v3.11+
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2014-01-17 15:37:15 -05:00
..
2013-06-08 16:20:18 -04:00
2014-01-13 17:29:50 -05:00
2013-11-15 13:41:43 -05:00
2012-10-02 08:17:02 -07:00
2012-07-30 19:06:41 -04:00
2012-07-30 19:06:46 -04:00
2012-07-30 19:06:52 -04:00
2014-01-13 13:34:36 -05:00