summaryrefslogtreecommitdiff
path: root/fs/cifs
Commit message (Collapse)AuthorAgeFilesLines
* [CIFS] fix build break when lanman not enabledSteve French2007-10-121-0/+3
| | | | | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] remove two sparse warningsSteve French2007-10-122-5/+5
| | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] remove compile warnings when debug disabledSteve French2007-10-121-2/+2
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] CIFS ACL support part 3Steve French2007-10-127-22/+141
| | | | | Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix cifsd so shuts down when signing fails during mountSteve French2007-10-044-8/+42
| | | | | | | | | | | | | | | | | | Fixes two problems: 1) we dropped down to negotiating lanman if we did not recognize the mechanism (krb5 e.g.) 2) we did not stop cifsd (thus will fail when doing rmod cifs with slab free errors) when we fail tcon but have a bad session (which is the case in which signing is required but we don't allow signing on the client) It also turns on extended security flag in the header when passing "sec=krb5" on mount command (although kerberos support is not done of course) Acked-by: Jeff Layton <jlayton@redhat.com> CC: Shaggy <shaggy@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Cleanup formattingSteve French2007-10-032-46/+51
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] CIFS ACL support (part 2)Shirish Pargaonkar2007-10-034-60/+151
| | | | | Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] remove some redundant argument checksMariusz Kozlowski2007-10-031-14/+8
| | | | | | | | | This patch does kmalloc + memset conversion to kzalloc and removes some redundant argument checks. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Reduce chance of list corruption in find_writable_fileSteve French2007-10-021-15/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | When find_writable_file is racing with close and the session to the server goes down, Shaggy noticed that there was a chance that an open file in the list of files off the inode could have been freed by close since cifs_reconnect can block (the spinlock thus not held). This means that we have to start over at the beginning of the list in some cases. There is a 2nd change that needs to be made later (pointed out by Jeremy Allison and Shaggy) in order to prevent cifs_close ever freeing the cifs per file info when a write is pending. Although we delay close from freeing this memory for sufficiently long for all known cases, ultimately on a very, very slow write overlapping a close pending we need to allow close to return (without freeing the cifs file info) and defer freeing the memory to be the responsibility of the (sloooow) write thread (presumably have to look at every place wrtPending is decremented - and add a flag for deferred free for after wrtPending goes to zero). Acked-by: Shaggy <shaggy@us.ibm.com> Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] change misleading field nameSteve French2007-10-012-8/+6
| | | | | | num_auth is really num_subauth in ACL terminology Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] named pipe support (part 2)Steve French2007-09-294-5/+17
| | | | | | Also fixes typo which could cause build break Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] CIFS support for named pipes (part 1)Steve French2007-09-285-8/+37
| | | | | | | | | | | | This allows cifs to mount to ipc shares (IPC$) which will allow user space applications to layer over authenticated cifs connections (useful for Wine and others that would want to put DCE/RPC over CIFS or run CIFS named pipes) Acked-by: Rob Shearman <rob@codeweavers.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix memory leak in statfs to very old serversSteve French2007-09-282-4/+5
| | | | | | | We were allocating request buffers twice in the statfs path when mounted to very old (Windows 9x) servers. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] fix cut and paste error - missing defines cause cifsacl build errorSteve French2007-09-251-1/+8
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] move cifs acl code to new file and fix build breakSteve French2007-09-255-109/+137
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Support for CIFS ACLs (part 1)Steve French2007-09-244-8/+143
| | | | | | | | Add code to be able to dump CIFS ACL information when Query Posix ACL with cifsacl mount parm enabled. Signed-off-by: Shirish Pargoankar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] fix typo in previous commitSteve French2007-09-201-1/+1
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Print better error when server returns malformed QueryUnixInfo responseSteve French2007-09-201-0/+3
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Add warning message when broken server fails SetFSInfo callSteve French2007-09-201-1/+10
| | | | | | | | | | | | | A reasonably common NAS server returns an error on the SetFSInfo of the Unix capabilities. Log a message for this alerting the user that the server may have problems with the Unix extensions, and telling them what they can do to workaround it. Unfortunately the server does not return other clues that we could easily use to turn the Unix Extension support off automatically in this case (since they claim to support it). Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fallback to standard mkdir if server incorrectly claims support forSteve French2007-09-172-3/+6
| | | | | | posix ops Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] fix small memory leak in an error path in new posix mkdirSteve French2007-09-161-2/+6
| | | | | | | | | | | | | There is a small memory leak in fs/cifs/inode.c::cifs_mkdir(). Storage for 'pInfo' is allocated with kzalloc(), but if the call to CIFSPOSIXCreate(...) happens to return 0 and pInfo->Type == -1, then we'll jump to the 'mkdir_get_info' label without freeing the storage allocated for 'pInfo'. This patch adds a kfree() call to free the storage just before jumping to the label, thus getting rid of the leak. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] missing field in debug output from previous fixSteve French2007-09-151-1/+2
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix potential NULL pointer usage if kzalloc failsSteve French2007-09-152-12/+17
| | | | | | | Potential problem was noticed by Cyrill Gorcunov CC: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] typo in earlier cifs_reconnect fixSteve French2007-09-151-1/+0
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Respect umask when using POSIX mkdirJeff2007-09-131-0/+1
| | | | | | | | | When making a directory with POSIX mkdir calls, cifs_mkdir does not respect the umask. This patch causes the new POSIX mkdir to create with the right mode Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] lock inode open file list in close in case racing with openSteve French2007-09-111-0/+2
| | | | | | | | | | Harmless since it only protected turning off caching for the inode, but cleaner to lock around this in case we have a close racing with open. Signed-off-by: Shaggy <shaggy@us.ibm.com> CC: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix oops in find_writable_fileSteve French2007-09-071-9/+28
| | | | | | | | There was a case in which find_writable_file was not waiting long enough under heavy stress when writepages was racing with close of the file handle being used by the write. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix warnings shown by newer version of sparseSteve French2007-08-314-37/+32
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] formatting cleanup found by checkpatchSteve French2007-08-3010-105/+80
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] fix for incorrect session reconnectsSteve French2007-08-301-6/+7
| | | | | | | | | | | | | | cifs reconnect could end up happening incorrectly due to the small initial tcp recvmsg response. When the socket was within three bytes of being full and the recvmsg returned only 1 to 3 bytes of the initial 4 byte read of the RFC1001 length field. Fortunately this seems to be less common on more current kernels, but this fixes it so cifs tries to retrieve all 4 bytes of the initial tcp read. Signed-off-by: Shirish Pargoankar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS][KJ] use abs() from kernel.h where appropriateAndre Haupt2007-08-301-1/+1
| | | | | Signed-off-by: Andrew Haupt <andre@finow14.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] fix typo in previousSteve French2007-08-241-1/+1
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Byte range unlock request to non-Unix server can unlock too muchJeff Layton2007-08-242-2/+6
| | | | | | | | | | | | | | | | | On a mount without posix extensions enabled, when an unlock request is made, the client can release more than is intended. To reproduce, on a CIFS mount without posix extensions enabled: 1) open file 2) do fcntl lock: start=0 len=1 3) do fcntl lock: start=2 len=1 4) do fcntl unlock: start=0 len=1 ...on the unlock call the client sends an unlock request to the server for both locks. The problem is a bad test in cifs_lock. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix unbalanced call to GetXid/FreeXidCyrill Gorcunov2007-08-241-1/+1
| | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] cifs truncate missing a fix for private map COW raceSteve French2007-08-221-0/+9
| | | | | | | vmtruncate had added the same fix to handle the case of private pages being Copy on writed while truncate_inode_pages is going on Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Check return code on failed allocCyrill Gorcunov2007-08-182-0/+10
| | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix hang in find_writable_fileSteve French2007-07-264-13/+35
| | | | | | | | | | | | Caused by unneeded reopen during reconnect while spinlock held. Fixes kernel bugzilla bug #7903 Thanks to Lin Feng Shen for testing this, and Amit Arora for some nice problem determination to narrow this down. Acked-by: Dave Kleikamp <shaggy@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* mm: Remove slab destructors from kmem_cache_create().Paul Mundt2007-07-201-5/+5
| | | | | | | | | | | | | | Slab destructors were no longer supported after Christoph's c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6Steve French2007-07-193-6/+6
|\ | | | | | | | | | | Conflicts: fs/cifs/export.c
| * knfsd: exportfs: add exportfs.h headerChristoph Hellwig2007-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | currently the export_operation structure and helpers related to it are in fs.h. fs.h is already far too large and there are very few places needing the export bits, so split them off into a separate header. [akpm@linux-foundation.org: fix cifs build] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Neil Brown <neilb@suse.de> Cc: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * Freezer: make kernel threads nonfreezable by defaultRafael J. Wysocki2007-07-172-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the freezer treats all tasks as freezable, except for the kernel threads that explicitly set the PF_NOFREEZE flag for themselves. This approach is problematic, since it requires every kernel thread to either set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't care for the freezing of tasks at all. It seems better to only require the kernel threads that want to or need to be frozen to use some freezer-related code and to remove any freezer-related code from the other (nonfreezable) kernel threads, which is done in this patch. The patch causes all kernel threads to be nonfreezable by default (ie. to have PF_NOFREEZE set by default) and introduces the set_freezable() function that should be called by the freezable kernel threads in order to unset PF_NOFREEZE. It also makes all of the currently freezable kernel threads call set_freezable(), so it shouldn't cause any (intentional) change of behaviour to appear. Additionally, it updates documentation to describe the freezing of tasks more accurately. [akpm@linux-foundation.org: build fixes] Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Nigel Cunningham <nigel@nigel.suspend2.net> Cc: Pavel Machek <pavel@ucw.cz> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Gautham R Shenoy <ego@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * sendfile: remove .sendfile from filesystems that use generic_file_sendfile()Jens Axboe2007-07-101-4/+4
| | | | | | | | | | | | | | They can use generic_file_splice_read() instead. Since sys_sendfile() now prefers that, there should be no change in behaviour. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* | [CIFS] merge conflict in fs/cifs/export.cSteve French2007-07-191-0/+1
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Allow disabling CIFS Unix Extensions as mount optionSteve French2007-07-189-46/+65
| | | | | | | | | | | | | | | | | | Previously the only way to do this was to umount all mounts to that server, turn off a proc setting (/proc/fs/cifs/LinuxExtensionsEnabled). Fixes Samba bugzilla bug number: 4582 (and also 2008) Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] More whitespace/formatting fixes (noticed by checkpatch)Steve French2007-07-1710-46/+88
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Typo in previous patchSteve French2007-07-161-2/+1
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] zero_user_page() conversionsEric2007-07-161-4/+1
| | | | | | | | | | | | Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] use simple_prepare_write to zero page dataNate2007-07-161-8/+1
| | | | | | | | | | | | | | | | | | | | | | It's common for file systems to need to zero data on either side of a write, if a page is not Uptodate during prepare_write. It just so happens that simple_prepare_write() in libfs.c does exactly that, so we can avoid duplication and just call that function to zero page data. Signed-off-by: Nate Diller <nate.diller@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Fix build break - inet.h not included when experimental ifdef offSteve French2007-07-151-2/+0
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Add support for new POSIX unlinkSteve French2007-07-155-11/+103
| | | | | | | | | | | | | | | | | | | | In the cleanup phase of the dbench test, we were noticing sharing violation followed by failed directory removals when dbench did not close the test files before the cleanup phase started. Using the new POSIX unlink, which Samba has supported for a few months, avoids this. Signed-off-by: Steve French <sfrench@us.ibm.com>