Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
"Four cifs fixes (including for kernel bug #53221 and samba bug #9519)"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
cifs: bugfix for unreclaimed writeback pages in cifs_writev_requeue()
cifs: set MAY_SIGN when sec=krb5
POSIX extensions disabled on client due to illegal O_EXCL flag sent to Samba
cifs: ensure that cifs_get_root() only traverses directories

+19 -5
+5
fs/cifs/cifsfs.c
··· 564 564 dentry = ERR_PTR(-ENOENT); 565 565 break; 566 566 } 567 + if (!S_ISDIR(dir->i_mode)) { 568 + dput(dentry); 569 + dentry = ERR_PTR(-ENOTDIR); 570 + break; 571 + } 567 572 568 573 /* skip separators */ 569 574 while (*s == sep)
+4 -1
fs/cifs/cifssmb.c
··· 1909 1909 } while (rc == -EAGAIN); 1910 1910 1911 1911 for (i = 0; i < wdata->nr_pages; i++) { 1912 - if (rc != 0) 1912 + if (rc != 0) { 1913 1913 SetPageError(wdata->pages[i]); 1914 + end_page_writeback(wdata->pages[i]); 1915 + page_cache_release(wdata->pages[i]); 1916 + } 1914 1917 unlock_page(wdata->pages[i]); 1915 1918 } 1916 1919
+1 -1
fs/cifs/connect.c
··· 1031 1031 1032 1032 switch (match_token(value, cifs_secflavor_tokens, args)) { 1033 1033 case Opt_sec_krb5: 1034 - vol->secFlg |= CIFSSEC_MAY_KRB5; 1034 + vol->secFlg |= CIFSSEC_MAY_KRB5 | CIFSSEC_MAY_SIGN; 1035 1035 break; 1036 1036 case Opt_sec_krb5i: 1037 1037 vol->secFlg |= CIFSSEC_MAY_KRB5 | CIFSSEC_MUST_SIGN;
+9 -3
fs/cifs/file.c
··· 43 43 #include "cifs_fs_sb.h" 44 44 #include "fscache.h" 45 45 46 + 46 47 static inline int cifs_convert_flags(unsigned int flags) 47 48 { 48 49 if ((flags & O_ACCMODE) == O_RDONLY) ··· 73 72 else if ((flags & O_ACCMODE) == O_RDWR) 74 73 posix_flags = SMB_O_RDWR; 75 74 76 - if (flags & O_CREAT) 75 + if (flags & O_CREAT) { 77 76 posix_flags |= SMB_O_CREAT; 78 - if (flags & O_EXCL) 79 - posix_flags |= SMB_O_EXCL; 77 + if (flags & O_EXCL) 78 + posix_flags |= SMB_O_EXCL; 79 + } else if (flags & O_EXCL) 80 + cFYI(1, "Application %s pid %d has incorrectly set O_EXCL flag" 81 + "but not O_CREAT on file open. Ignoring O_EXCL", 82 + current->comm, current->tgid); 83 + 80 84 if (flags & O_TRUNC) 81 85 posix_flags |= SMB_O_TRUNC; 82 86 /* be safe and imply O_SYNC for O_DSYNC */