aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-04-12 09:13:44 -0400
committerSteve French <sfrench@us.ibm.com>2011-04-12 10:19:55 -0400
commitca83ce3d5b9ad321ee24f5870a77f0b21ac5a5de (patch)
tree7added4d982e03c89599ef7c78c9b69845a7504d /fs/cifs/cifsfs.c
parentd9b942013730c38ac83564d6669c6d0ecf6d754d (diff)
cifs: don't allow mmap'ed pages to be dirtied while under writeback (try #3)
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: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index e3352a1ac47..5c412b33cd7 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -81,10 +81,6 @@ module_param(echo_retries, ushort, 0644);
81MODULE_PARM_DESC(echo_retries, "Number of echo attempts before giving up and " 81MODULE_PARM_DESC(echo_retries, "Number of echo attempts before giving up and "
82 "reconnecting server. Default: 5. 0 means " 82 "reconnecting server. Default: 5. 0 means "
83 "never reconnect."); 83 "never reconnect.");
84bool sign_zero_copy; /* globals init to false automatically */
85module_param(sign_zero_copy, bool, 0644);
86MODULE_PARM_DESC(sign_zero_copy, "Don't copy pages on write with signing "
87 "enabled. Default: N");
88extern mempool_t *cifs_sm_req_poolp; 84extern mempool_t *cifs_sm_req_poolp;
89extern mempool_t *cifs_req_poolp; 85extern mempool_t *cifs_req_poolp;
90extern mempool_t *cifs_mid_poolp; 86extern mempool_t *cifs_mid_poolp;