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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull CIFS fixes from Steve French:
"Two low risk, small fixes, that fix cifs regressions introduced in
3.7."

* 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
CIFS: Fix wrong buffer pointer usage in smb_set_file_info
cifs: fix writeback race with file that is growing

+4 -5
+3 -3
fs/cifs/file.c
··· 1794 1794 struct TCP_Server_Info *server; 1795 1795 struct page *page; 1796 1796 int rc = 0; 1797 - loff_t isize = i_size_read(mapping->host); 1798 1797 1799 1798 /* 1800 1799 * If wsize is smaller than the page cache size, default to writing ··· 1898 1899 */ 1899 1900 set_page_writeback(page); 1900 1901 1901 - if (page_offset(page) >= isize) { 1902 + if (page_offset(page) >= i_size_read(mapping->host)) { 1902 1903 done = true; 1903 1904 unlock_page(page); 1904 1905 end_page_writeback(page); ··· 1931 1932 wdata->offset = page_offset(wdata->pages[0]); 1932 1933 wdata->pagesz = PAGE_CACHE_SIZE; 1933 1934 wdata->tailsz = 1934 - min(isize - page_offset(wdata->pages[nr_pages - 1]), 1935 + min(i_size_read(mapping->host) - 1936 + page_offset(wdata->pages[nr_pages - 1]), 1935 1937 (loff_t)PAGE_CACHE_SIZE); 1936 1938 wdata->bytes = ((nr_pages - 1) * PAGE_CACHE_SIZE) + 1937 1939 wdata->tailsz;
+1 -2
fs/cifs/smb1ops.c
··· 766 766 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 767 767 struct tcon_link *tlink = NULL; 768 768 struct cifs_tcon *tcon; 769 - FILE_BASIC_INFO info_buf; 770 769 771 770 /* if the file is already open for write, just use that fileid */ 772 771 open_file = find_writable_file(cinode, true); ··· 816 817 netpid = current->tgid; 817 818 818 819 set_via_filehandle: 819 - rc = CIFSSMBSetFileInfo(xid, tcon, &info_buf, netfid, netpid); 820 + rc = CIFSSMBSetFileInfo(xid, tcon, buf, netfid, netpid); 820 821 if (!rc) 821 822 cinode->cifsAttrs = le32_to_cpu(buf->Attributes); 822 823