• Jeff Layton's avatar
    cifs: don't allow mmap'ed pages to be dirtied while under writeback (try #3) · ca83ce3d
    Jeff Layton authored
    This is more or less the same patch as before, but with some merge
    conflicts fixed up.
    
    If a process has a dirty page mapped into its page tables, then it has
    the ability to change it while the client is trying to write the data
    out to the server. If that happens after the signature has been
    calculated then that signature will then be wrong, and the server will
    likely reset the TCP connection.
    
    This patch adds a page_mkwrite handler for CIFS that simply takes the
    page lock. Because the page lock is held over the life of writepage and
    writepages, this prevents the page from becoming writeable until
    the write call has completed.
    
    With this, we can also remove the "sign_zero_copy" module option and
    always inline the pages when writing.
    Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
    Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
    ca83ce3d
cifsfs.c 29 KB