summaryrefslogtreecommitdiff
path: root/fs/cifs
AgeCommit message (Collapse)Author
2007-02-13Fix up CIFS for "test_clear_page_dirty()" removalLinus Torvalds
This also adds he required page "writeback" flag handling, that cifs hasn't been doing and that the page dirty flag changes made obvious. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Acked-by: Steve French <smfltc@us.ibm.com>
2006-11-25CIFS: report rename failure when target file is locked by WindowsSteve French
Fixes Samba bugzilla bug # 4182 Rename by handle failures (retry after rename by path) were not being returned back. Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-14[CIFS] Allow cifsd to suspend if connection is lostRafael J. Wysocki
Make cifsd allow us to suspend if it has lost the connection with a server Ref: http://bugzilla.kernel.org/show_bug.cgi?id=6811 Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-14[CIFS] Fix typo in earlier cifs_unlink change and protect one extra path.Steve French
Since cifs_unlink can also be called from rename path and there was one report of oops am making the extra check for null inode. Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-14[CIFS] Fix unlink oops when indirectly called in rename error path under ↵Steve French
heavy stress. Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-14[CIFS] fs/cifs/dir.c: fix possible NULL dereferenceSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-04-24[PATCH] Don't allow a backslash in a path component (CVE-2006-1863)Steve French
Unless Posix paths have been negotiated, the backslash, "\", is not a valid character in a path component. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-17[PATCH] Incorrect signature sent on SMB ReadSteve French
Fixes Samba bug 3621 and kernel.org bug 6147 For servers which require SMB/CIFS packet signing, we were sending the wrong signature (all zeros) on SMB Read request. The new cifs routine to do signatures across an iovec was not complete - and SMB Read, unlike the new SMBWrite2, did not fall back to the older routine (ie use SendReceive vs. the more efficient SendReceive2 ie used the older cifs_sign_smb vs. the disabled cifs_sign_smb2) for calculating signatures. This finishes up cifs_sign_smb2/cifs_calc_signature2 so that the callers of SendReceive2 can get SMB/CIFS packet signatures. Now that cifs_sign_smb2 is supported, we could start using it in the write path but this smaller fix does not include the change to use SMBWrite2 when signatures are required (which when enabled will make more Writes more efficient and alloc less memory). Currently Write2 is only used when signatures are not required at the moment but after more testing we will enable that as well). Thanks to James Slepicka and Sam Flory for initial investigation. Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-05[CIFS] Always match oplock break (cache notification) to the right tcpSteve French
session when multiply mounted. Fixes slow response when cifs client is mounted to shares on multiple servers and oplock break occurs (usually due to attempt to multiply open a file). When treeids on mutiple mounted shares match and we find the wrong match first, we searched for the wrong cached files to send oplock break response for which usually meant that no matching file was found and thus the server would have to timeout the notification. Oplock break timeout is about 20 seconds on some servers so this could cause significantly slower performance on file open calls in a few cases (in particular when multiple shares are mounted from multiple servers, tree ids match, and we have a cached file which is later opened multiple times). This was the most important of the bugs that was found and fixed at Connectathon (interoperability testing event) this week. Acked-by: Shaggy (shaggy@austin.ibm.com) Signed-off-by: Steve French (sfrench@us.ibm.com)
2006-02-22[PATCH] CIFS: CIFSSMBRead was returning an invalid pointer in buf on socket ↵Steve French
error Thanks to Adrian Bunk for debugging the problem and to Shaggy for helping find the solution. Also added a fix for 64K pages we found in loosely-related testing Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-14[PATCH] CIFS: fix cifs_user_read oops when null SMB response on ↵Steve French
forcedirectio mount This patch fixes an oops reported by Adrian Bunk in cifs_user_read when a null read response is returned on a forcedirectio mount. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-27[CIFS] Remove compiler warningSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-27Signed-off-by: Steve French <sfrench@us.ibm.com>Steve French
2006-01-24[CIFS] Make cifs default wsize match what we actually want to send (52KSteve French
typically - header + 13 pages). Forgetting to set wsize on the mount command costs more than 10% on large write (can be much more) so this makes a saner default. We still shrink this default smaller if server can not support it. Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-23[CIFS] Do not zero non-existent iovec in SendReceive response processing.Steve French
Could cause memory leak in some readpaths depending on what junk followed it in the stack. Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-18[CIFS] Fix oops in cifs_readpages caused by not checking buf_type in anSteve French
error path of new cifs_readpages code. Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-17[CIFS] Remove compiler warningSteve French
Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-13[CIFS] Fix CIFS to recognize share mode securitySteve French
Fix Samba bugzilla bug 3301 In share mode encrypted password must be sent on tree connection (in our case only the NTLM password is sent, not the older LANMAN one). Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-12[CIFS] Fix typoSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-12[CIFS] Add worker function for Get ACL cifs styleSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-12Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.gitSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-12[CIFS] Allow local filesize for file that is open for write to be updatedSteve French
from server when mount forcedirectio. Allowing update of file size with non forcedirectio mounts should be allowed in the fiture but requires carefully writing out the last page in the local file if it is a partial page in order to avoid corruption and careful serialization Thanks to Maximiliano Curia who suggested similar changes and provided a testcase. Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-10[PATCH] turn "const static" into "static const"Jesper Juhl
ICC likes to complain about storage class not being first, GCC doesn't care much (except for cases like "inline static"). have a hard time seeing how it could break anything. Thanks to Gabriel A. Devenyi for pointing out http://linuxicc.sourceforge.net/ which is what made me create this patch. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-09[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_semJes Sorensen
This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar <mingo@elte.hu> (finished the conversion) Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2006-01-08[PATCH] Fix and add EXPORT_SYMBOL(filemap_write_and_wait)OGAWA Hirofumi
This patch add EXPORT_SYMBOL(filemap_write_and_wait) and use it. See mm/filemap.c: And changes the filemap_write_and_wait() and filemap_write_and_wait_range(). Current filemap_write_and_wait() doesn't wait if filemap_fdatawrite() returns error. However, even if filemap_fdatawrite() returned an error, it may have submitted the partially data pages to the device. (e.g. in the case of -ENOSPC) <quotation> Andrew Morton writes, If filemap_fdatawrite() returns an error, this might be due to some I/O problem: dead disk, unplugged cable, etc. Given the generally crappy quality of the kernel's handling of such exceptions, there's a good chance that the filemap_fdatawait() will get stuck in D state forever. </quotation> So, this patch doesn't wait if filemap_fdatawrite() returns the -EIO. Trond, could you please review the nfs part? Especially I'm not sure, nfs must use the "filemap_fdatawrite(inode->i_mapping) == 0", or not. Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08[CIFS] Fix cifs trying to write to f_opsSteve French
patch 2ea55c01e0c5dfead8699484b0bae2a375b1f61c fixed CIFS clobbering the global fops structure for some per mount setting, by duplicating and having 2 fops structs. However the write to the fops was left behind, which is a NOP in practice (due to the fact that we KNOW the fops has that field set to NULL already due to the duplication). So remove it... In addition, another instance of the same bug was forgotten in november. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-01-08[CIFS] Minor cleanup to new cifs acl header.Steve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-31[CIFS] Fix typos in rfc1002pdu.hSteve French
Pointed out by Leo Comitale Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-12[CIFS] Avoid extra large buffer allocation (and memcpy) in cifs_readpagesSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-03[CIFS] Display large/small total buffer allocations in /proc/fs/cifs/StatsSteve French
when CONFIG_CIFS_STATS2 is on (helps in debugging performance) Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-03[CIFS] Add extended stats (STATS2) for total buffer allocations forSteve French
better performance debugging. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-02[CIFS] Readpages and readir performance improvements - eliminate extraSteve French
memcpy. Part 1 Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-01[CIFS] Kerberos and CIFS ACL support part 1Steve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-12-01[CIFS] Use fsuid (fsgid) more consistently instead of uid/gid inSteve French
assembling smb requests when setuids and Linux protocol extensions enabled and in checking more matching sessions in multiuser mount mode. Pointed out by Shaggy. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-29[CIFS] For previous fix, mode on mkdir needed S_IFDIR left out.Steve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-29[CIFS] Missing parenthesis and typo in previous fixSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-29[CIFS] Fix umount --force to wake up the pending response queue, not justSteve French
the request queue. Also periodically wakeup response_q so threads can check if stuck requests have timed out. Workaround Windows server illegal smb length on transact2 findfirst response. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-29[CIFS] Fix missing permission check on setattr when noperm mount option isSteve French
disabled. Also set mode, uid, gid better on mkdir and create for the case when Unix Extensions is not enabled and setuids is enabled. This is necessary to fix the hole in which chown could be allowed for non-root users in some cases if root mounted, and also to display the mode and uid properly in some cases. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-28[CIFS] When file is deleted locally but later recreated on the serverSteve French
fix cifs negative dentries so they are freed faster (not requiring umount or readdir e.g.) so the client recognizes the new file on the server more quickly. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-19[CIFS] Fix setattr of mode only (e.g. in some chmod cases) to WindowsSteve French
so it does not return EACCESS (unless server really returns that). Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-18[CIFS] Fix mknod of block and chardev over SFU mountsSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-18[CIFS] Missing part of previous patchSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-18[CIFS] Fix scheduling while atomic when pending writes at file close timeSteve French
Fix the case in which readdir reset file type when SFU mount option specified. Also fix sfu related functions to not request EAs (xattrs) when not configured in Kconfig Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-17[CIFS] Vectored and async i/o turned on and correct theSteve French
writev and aio_write to flush properly. This is Christoph's patch merged with the new nobrl file operations Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> From: Christoph Hellwig <hch@lst.de> - support vectored and async aio ops unconditionally - this is above the pagecache and transparent to the fs - remove cifs_read_wrapper. it was only doing silly checks and calling generic_file_write in all cases. - use do_sync_read/do_sync_write as read/write operations. They call ->readv/->writev which we now always implemente. - add the filemap_fdatawrite calls to writev/aio_write which were missing previously compared to plain write. no idea what the point behind them is, but let's be consistent at least.. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-11-17[CIFS] Recognize properly symlinks and char/blk devices (not justSteve French
FIFOs) created by SFU (part 2 of 2). Thanks to Martin Koeppe for useful analysis. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-16[CIFS] Fix sparse warnings on smb bcc (byte count)Steve French
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-15[CIFS] Fix endian errors (setfacl/getfacl failures) in handling ACLsSteve French
(and a ppc64 compiler warning) Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-15[CIFS] Recognize properly symlinks and char/blk devices (not just FIFOs)Steve French
created by SFU (part 1 of 2). Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-11[CIFS] Cleanup sparse warnings for unicode little endian castsSteve French
Following Shaggy's suggestion, do a better job on the unicode string handling routines in cifs in specifying that the wchar_t are really little endian widechars (__le16). Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-11[CIFS] Fix CIFS "nobrl" mount option so does not disable sending brl requestsSteve French
for all mounts just that particular mount. Found by Arjan Vand de Ven Signed-off-by: Steve French <sfrench@us.ibm.com>