Merge branch 'sendmsg.cifs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 May 2016 17:17:56 +0000 (10:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 May 2016 17:17:56 +0000 (10:17 -0700)
Pull cifs iovec cleanups from Al Viro.

* 'sendmsg.cifs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  cifs: don't bother with kmap on read_pages side
  cifs_readv_receive: use cifs_read_from_socket()
  cifs: no need to wank with copying and advancing iovec on recvmsg side either
  cifs: quit playing games with draining iovecs
  cifs: merge the hash calculation helpers

1  2 
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/file.c

Simple merge
Simple merge
Simple merge
diff --cc fs/cifs/file.c
index f3a90298dfe2108a8540937c5bfedb100f29c1e9,0f718679186e17577800404ba4bb2212b5d84c00..9793ae0bcaa2bc678f9a688c167ef2b091cc858f
@@@ -3308,26 -3302,17 +3299,17 @@@ cifs_readpages_read_into_pages(struct T
        cifs_dbg(FYI, "eof=%llu eof_index=%lu\n", eof, eof_index);
  
        rdata->got_bytes = 0;
 -      rdata->tailsz = PAGE_CACHE_SIZE;
 +      rdata->tailsz = PAGE_SIZE;
        for (i = 0; i < nr_pages; i++) {
                struct page *page = rdata->pages[i];
 -              size_t n = PAGE_CACHE_SIZE;
++              size_t n = PAGE_SIZE;
  
 -              if (len >= PAGE_CACHE_SIZE) {
 -                      len -= PAGE_CACHE_SIZE;
 +              if (len >= PAGE_SIZE) {
-                       /* enough data to fill the page */
-                       iov.iov_base = kmap(page);
-                       iov.iov_len = PAGE_SIZE;
-                       cifs_dbg(FYI, "%u: idx=%lu iov_base=%p iov_len=%zu\n",
-                                i, page->index, iov.iov_base, iov.iov_len);
 +                      len -= PAGE_SIZE;
                } else if (len > 0) {
                        /* enough for partial page, fill and zero the rest */
-                       iov.iov_base = kmap(page);
-                       iov.iov_len = len;
-                       cifs_dbg(FYI, "%u: idx=%lu iov_base=%p iov_len=%zu\n",
-                                i, page->index, iov.iov_base, iov.iov_len);
-                       memset(iov.iov_base + len,
-                               '\0', PAGE_SIZE - len);
-                       rdata->tailsz = len;
 -                      zero_user(page, len, PAGE_CACHE_SIZE - len);
++                      zero_user(page, len, PAGE_SIZE - len);
+                       n = rdata->tailsz = len;
                        len = 0;
                } else if (page->index > eof_index) {
                        /*