aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-12-26cifs: display addr and prefixpath options in /proc/mountsJeff Layton1-12/+32
Have cifs_show_options display the addr and prefixpath options in /proc/mounts. Reduce struct dereferencing by adding some local variables. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-12-26cifs: remove unused SMB session pointer from struct mid_q_entryJeff Layton2-10/+4
Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-12-25Merge branch 'next' into for-linusJames Morris7-17/+17
2008-12-17cifs: fix buffer overrun in parse_DFS_referralsJeff Layton1-1/+2
While testing a kernel with memory poisoning enabled, I saw some warnings about the redzone getting clobbered when chasing DFS referrals. The buffer allocation for the unicode converted version of the searchName is too small and needs to take null termination into account. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Steve French <sfrench@us.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-04Merge branch 'master' into nextJames Morris6-32/+92
Conflicts: fs/nfsd/nfs4recover.c Manually fixed above to use new creds API functions, e.g. nfs4_save_creds(). Signed-off-by: James Morris <jmorris@namei.org>
2008-12-02Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-21/+56
Conflicts: drivers/net/ixgbe/ixgbe_main.c drivers/net/smc91x.c
2008-11-26[CIFS] fix regression in cifs_write_begin/cifs_write_endJeff Layton1-21/+56
The conversion to write_begin/write_end interfaces had a bug where we were passing a bad parameter to cifs_readpage_worker. Rather than passing the page offset of the start of the write, we needed to pass the offset of the beginning of the page. This was reliably showing up as data corruption in the fsx-linux test from LTP. It also became evident that this code was occasionally doing unnecessary read calls. Optimize those away by using the PG_checked flag to indicate that the unwritten part of the page has been initialized. CC: Nick Piggin <npiggin@suse.de> Acked-by: Dave Kleikamp <shaggy@us.ibm.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-20Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller6-11/+36
Conflicts: drivers/net/ixgbe/ixgbe_main.c include/net/mac80211.h net/phonet/af_phonet.c
2008-11-20[CIFS] Do not attempt to close invalidated file handlesSteve French4-9/+30
If a connection with open file handles has gone down and come back up and reconnected without reopening the file handle yet, do not attempt to send an SMB close request for this handle in cifs_close. We were checking for the connection being invalid in cifs_close but since the connection may have been reconnected we also need to check whether the file handle was marked invalid (otherwise we could close the wrong file handle by accident). Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-18Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller9-716/+765
Conflicts: drivers/isdn/i4l/isdn_net.c fs/cifs/connect.c
2008-11-18[CIFS] fix check for dead tcon in smb_initSteve French2-2/+6
This was recently changed to check for need_reconnect, but should actually be a check for a tidStatus of CifsExiting. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-18Merge branch 'master' into nextJames Morris9-716/+765
Conflicts: fs/cifs/misc.c Merge to resolve above, per the patch below. Signed-off-by: James Morris <jmorris@namei.org> diff --cc fs/cifs/misc.c index ec36410,addd1dc..0000000 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c @@@ -347,13 -338,13 +338,13 @@@ header_assemble(struct smb_hdr *buffer /* BB Add support for establishing new tCon and SMB Session */ /* with userid/password pairs found on the smb session */ /* for other target tcp/ip addresses BB */ - if (current->fsuid != treeCon->ses->linux_uid) { + if (current_fsuid() != treeCon->ses->linux_uid) { cFYI(1, ("Multiuser mode and UID " "did not match tcon uid")); - read_lock(&GlobalSMBSeslock); - list_for_each(temp_item, &GlobalSMBSessionList) { - ses = list_entry(temp_item, struct cifsSesInfo, cifsSessionList); + read_lock(&cifs_tcp_ses_lock); + list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) { + ses = list_entry(temp_item, struct cifsSesInfo, smb_ses_list); - if (ses->linux_uid == current->fsuid) { + if (ses->linux_uid == current_fsuid()) { if (ses->server == treeCon->ses->server) { cFYI(1, ("found matching uid substitute right smb_uid")); buffer->Uid = ses->Suid;
2008-11-18prevent cifs_writepages() from skipping unwritten pagesDave Kleikamp1-1/+4
Fixes a data corruption under heavy stress in which pages could be left dirty after all open instances of a inode have been closed. In order to write contiguous pages whenever possible, cifs_writepages() asks pagevec_lookup_tag() for more pages than it may write at one time. Normally, it then resets index just past the last page written before calling pagevec_lookup_tag() again. If cifs_writepages() can't write the first page returned, it wasn't resetting index, and the next call to pagevec_lookup_tag() resulted in skipping all of the pages it previously returned, even though cifs_writepages() did nothing with them. This can result in data loss when the file descriptor is about to be closed. This patch ensures that index gets set back to the next returned page so that none get skipped. Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Acked-by: Jeff Layton <jlayton@redhat.com> Cc: Shirish S Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-18Fixed parsing of mount options when doing DFS submountIgor Mammedov2-27/+83
Since these hit the same routines, and are relatively small, it is easier to review them as one patch. Fixed incorrect handling of the last option in some cases Fixed prefixpath handling convert path_consumed into host depended string length (in bytes) Use non default separator if it is provided in the original mount options Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Igor Mammedov <niallain@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-17[CIFS] Fix check for tcon seal setting and fix oops on failed mount from earlier patchSteve French1-3/+4
set tcon->ses earlier If the inital tree connect fails, we'll end up calling cifs_put_smb_ses with a NULL pointer. Fix it by setting the tcon->ses earlier. Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-17[CIFS] Fix build breakSteve French1-2/+2
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-17cifs: reinstate sharing of tree connectionsJeff Layton6-218/+249
Use a similar approach to the SMB session sharing. Add a list of tcons attached to each SMB session. Move the refcount to non-atomic. Protect all of the above with the cifs_tcp_ses_lock. Add functions to properly find and put references to the tcons. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-15[CIFS] minor cleanup to cifs_mountSteve French1-40/+34
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-14cifs: reinstate sharing of SMB sessions sans racesJeff Layton7-166/+175
We do this by abandoning the global list of SMB sessions and instead moving to a per-server list. This entails adding a new list head to the TCP_Server_Info struct. The refcounting for the cifsSesInfo is moved to a non-atomic variable. We have to protect it by a lock anyway, so there's no benefit to making it an atomic. The list and refcount are protected by the global cifs_tcp_ses_lock. The patch also adds a new routines to find and put SMB sessions and that properly take and put references under the lock. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-14cifs: disable sharing session and tcon and add new TCP sharing codeJeff Layton6-150/+96
The code that allows these structs to be shared is extremely racy. Disable the sharing of SMB and tcon structs for now until we can come up with a way to do this that's race free. We want to continue to share TCP sessions, however since they are required for multiuser mounts. For that, implement a new (hopefully race-free) scheme. Add a new global list of TCP sessions, and take care to get a reference to it whenever we're dealing with one. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-14[CIFS] clean up server protocol handlingSteve French3-31/+33
We're currently declaring both a sockaddr_in and sockaddr6_in on the stack, but we really only need storage for one of them. Declare a sockaddr struct and cast it to the proper type. Also, eliminate the protocolType field in the TCP_Server_Info struct. It's redundant since we have a sa_family field in the sockaddr anyway. We may need to revisit this if SCTP is ever implemented, but for now this will simplify the code. CIFS over IPv6 also has a number of problems currently. This fixes all of them that I found. Eventually, it would be nice to move more of the code to be protocol independent, but this is a start. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-14CRED: Wrap task credential accesses in the CIFS filesystemDavid Howells7-17/+17
Wrap access to task credentials so that they can be separated more easily from the task_struct during the introduction of COW creds. Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id(). Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more sense to use RCU directly rather than a convenient wrapper; these will be addressed by later patches. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: James Morris <jmorris@namei.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Cc: Steve French <sfrench@samba.org> Cc: linux-cifs-client@lists.samba.org Signed-off-by: James Morris <jmorris@namei.org>
2008-11-13[CIFS] remove unused list, add new cifs sock list to prepare for mount/umount fixSteve French3-20/+13
Also adds two lines missing from the previous patch (for the need reconnect flag in the /proc/fs/cifs/DebugData handling) The new global_cifs_sock_list is added, and initialized in init_cifs but not used yet. Jeff Layton will be adding code in to use that and to remove the GlobalTcon and GlobalSMBSession lists. CC: Jeff Layton <jlayton@redhat.com> CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-13[CIFS] Fix cifs reconnection flagsSteve French5-151/+160
In preparation for Jeff's big umount/mount fixes to remove the possibility of various races in cifs mount and linked list handling of sessions, sockets and tree connections, this patch cleans up some repetitive code in cifs_mount, and addresses a problem with ses->status and tcon->tidStatus in which we were overloading the "need_reconnect" state with other status in that field. So the "need_reconnect" flag has been broken out from those two state fields (need reconnect was not mutually exclusive from some of the other possible tid and ses states). In addition, a few exit cases in cifs_mount were cleaned up, and a problem with a tcon flag (for lease support) was not being set consistently for the 2nd mount of the same share CC: Jeff Layton <jlayton@redhat.com> CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-06Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller8-30/+86
Conflicts: drivers/net/wireless/ath5k/base.c net/8021q/vlan_core.c
2008-11-03[CIFS] Can't rely on iov length and base when kernel_recvmsg returns errorSteve French1-2/+7
When retrying kernel_recvmsg, reset iov_base and iov_len. Note comment from Sridhar: "In the normal path, iov.iov_len is clearly set to 4. But i think you are running into a case where kernel_recvmsg() is called via 'goto incomplete_rcv' It happens if the previous call fails with EAGAIN. If you want to call recvmsg() after EAGAIN failure, you need to reset iov." Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-11-03cifs: fix renaming one hardlink on top of anotherJeff Layton1-1/+3
cifs: fix renaming one hardlink on top of another POSIX says that renaming one hardlink on top of another to the same inode is a no-op. We had the logic mostly right, but forgot to clear the return code. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-31fs: replace NIPQUAD()Harvey Harrison2-4/+3
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-30[CIFS] fix error in smb_send2Steve French3-4/+7
smb_send2 exit logic was strange, and with the previous change could cause us to fail large smb writes when all of the smb was not sent as one chunk. Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-29net: replace %#p6 format specifier with %pi6Harvey Harrison1-1/+1
gcc warns when using the # modifier with the %p format specifier, so we can't use this to omit the colons when needed, introduces %pi6 instead. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-29[CIFS] Reduce number of socket retries in large write pathSteve French5-25/+76
CIFS in some heavy stress conditions cifs could get EAGAIN repeatedly in smb_send2 which led to repeated retries and eventually failure of large writes which could lead to data corruption. There are three changes that were suggested by various network developers: 1) convert cifs from non-blocking to blocking tcp sendmsg (we left in the retry on failure) 2) change cifs to not set sendbuf and rcvbuf size for the socket (let tcp autotune the buffer sizes since that works much better in the TCP stack now) 3) if we have a partial frame sent in smb_send2, mark the tcp session as invalid (close the socket and reconnect) so we do not corrupt the remaining part of the SMB with the beginning of the next SMB. This does not appear to hurt performance measurably and has been run in various scenarios, but it definately removes a corruption that we were seeing in some high stress test cases. Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-28net: replace all current users of NIP6_SEQFMT with %#p6Harvey Harrison1-2/+1
The define in kernel.h can be done away with at a later time. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6Linus Torvalds9-125/+259
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: cifs: handle the TCP_Server_Info->tsk field more carefully cifs: fix unlinking of rename target when server doesn't support open file renames [CIFS] improve setlease handling [CIFS] fix saving of resume key before CIFSFindNext cifs: make cifs_rename handle -EACCES errors [CIFS] fix build error [CIFS] undo changes in cifs_rename_pending_delete if it errors out cifs: track DeletePending flag in cifsInodeInfo cifs: don't use CREATE_DELETE_ON_CLOSE in cifs_rename_pending_delete [CIFS] eliminate usage of kthread_stop for cifsd [CIFS] Add nodfs mount option
2008-10-23[PATCH] move executable checking into ->permission()Miklos Szeredi1-3/+6
For execute permission on a regular files we need to check if file has any execute bits at all, regardless of capabilites. This check is normally performed by generic_permission() but was also added to the case when the filesystem defines its own ->permission() method. In the latter case the filesystem should be responsible for performing this check. Move the check from inode_permission() inside filesystems which are not calling generic_permission(). Create a helper function execute_ok() that returns true if the inode is a directory or if any execute bits are present in i_mode. Also fix up the following code: - coda control file is never executable - sysctl files are never executable - hfs_permission seems broken on MAY_EXEC, remove - hfsplus_permission is eqivalent to generic_permission(), remove Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
2008-10-23[PATCH] fix ->llseek for more directoriesChristoph Hellwig1-0/+1
With this patch all directory fops instances that have a readdir that doesn't take the BKL are switched to generic_file_llseek. Signed-off-by: Christoph Hellwig <hch@lst.de>
2008-10-23cifs: handle the TCP_Server_Info->tsk field more carefullyJeff Layton1-13/+28
cifs: handle the TCP_Server_Info->tsk field more carefully We currently handle the TCP_Server_Info->tsk field without any locking, but with some half-measures to try and prevent races. These aren't really sufficient though. When taking down cifsd, use xchg() to swap the contents of the tsk field with NULL so we don't end up trying to send it more than one signal. Also, don't allow cifsd to exit until the signal is received if we expect one. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-23cifs: fix unlinking of rename target when server doesn't support open file renamesJeff Layton1-79/+8
cifs: fix unlinking of rename target when server doesn't support open file renames The patch to make cifs_rename undoable broke renaming one file on top of another when the server doesn't support busy file renames. Remove the code that uses busy file renames to unlink the target file, and just have it call cifs_unlink. If the rename of the source file fails, then the unlink won't be undoable, but hopefully that's rare enough that it won't be a problem. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-23[CIFS] improve setlease handlingSteve French5-2/+67
fcntl(F_SETLEASE) currently is not exported by cifs (nor by local file systems) so cifs grants leases based on how other local processes have opened the file not by whether the file is cacheable (oplocked). This adds the check to make sure that the file is cacheable on the client before checking whether we can grant the lease locally (generic_setlease). It also adds a mount option for cifs (locallease) if the user wants to override this and try to grant leases even if the server did not grant oplock. Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-21[CIFS] fix saving of resume key before CIFSFindNextJeff Layton1-1/+2
We recently fixed the cifs readdir code so that it saves the resume key before calling CIFSFindNext. Unfortunately, this assumes that we have just done a CIFSFindFirst (or FindNext) and have resume info to save. This isn't necessarily the case. Fix the code to save resume info if we had to reinitiate the search, and after a FindNext. This fixes connectathon basic test6 against NetApp filers. Signed-off-by: Jeff Layton <jlayton@redhat.com> CC: Stable <stable@kernel.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-20cifs: make cifs_rename handle -EACCES errorsJeff Layton1-52/+122
cifs: make cifs_rename handle -EACCES errors Some servers seem to return -EACCES when attempting to rename one open file on top of another. Refactor the cifs_rename logic to attempt to rename the target file out of the way in this situation. This also fixes the "unlink_target" logic to be undoable if the subsequent rename fails. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-20[CIFS] fix build errorSteve French1-1/+1
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-20fs/Kconfig: move CIFS outAlexey Dobriyan1-0/+142
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> 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>
2008-10-20vmscan: split LRU lists into anon & file setsRik van Riel1-2/+2
Split the LRU lists in two, one set for pages that are backed by real file systems ("file") and one for pages that are backed by memory and swap ("anon"). The latter includes tmpfs. The advantage of doing this is that the VM will not have to scan over lots of anonymous pages (which we generally do not want to swap out), just to find the page cache pages that it should evict. This patch has the infrastructure and a basic policy to balance how much we scan the anon lists and how much we scan the file lists. The big policy changes are in separate patches. [lee.schermerhorn@hp.com: collect lru meminfo statistics from correct offset] [kosaki.motohiro@jp.fujitsu.com: prevent incorrect oom under split_lru] [kosaki.motohiro@jp.fujitsu.com: fix pagevec_move_tail() doesn't treat unevictable page] [hugh@veritas.com: memcg swapbacked pages active] [hugh@veritas.com: splitlru: BDI_CAP_SWAP_BACKED] [akpm@linux-foundation.org: fix /proc/vmstat units] [nishimura@mxp.nes.nec.co.jp: memcg: fix handling of shmem migration] [kosaki.motohiro@jp.fujitsu.com: adjust Quicklists field of /proc/meminfo] [kosaki.motohiro@jp.fujitsu.com: fix style issue of get_scan_ratio()] Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Lee Schermerhorn <Lee.Schermerhorn@hp.com> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20[CIFS] undo changes in cifs_rename_pending_delete if it errors outSteve French3-33/+79
The cifs_rename_pending_delete process involves multiple steps. If it fails and we're going to return error, we don't want to leave things in a half-finished state. Add code to the function to undo changes if a call fails. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-20cifs: track DeletePending flag in cifsInodeInfoJeff Layton4-0/+5
cifs: track DeletePending flag in cifsInodeInfo The QPathInfo call returns a flag that indicates whether DELETE_ON_CLOSE is set. Track it in the cifsInodeInfo. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-17cifs: don't use CREATE_DELETE_ON_CLOSE in cifs_rename_pending_deleteJeff Layton1-5/+10
cifs: don't use CREATE_DELETE_ON_CLOSE in cifs_rename_pending_delete CREATE_DELETE_ON_CLOSE apparently has different semantics than when you set the DELETE_ON_CLOSE bit after opening the file. Setting it in the open says "delete this file as soon as this filehandle is closed". That's not what we want for cifs_rename_pending_delete. Don't set this bit in the CreateFlags. Experimentation shows that setting this flag in the SET_FILE_INFO call has no effect. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-16[CIFS] eliminate usage of kthread_stop for cifsdJeff Layton1-29/+15
When cifs_demultiplex_thread was converted to a kthread based kernel thread, great pains were taken to make it so that kthread_stop would be used to bring it down. This just added unnecessary complexity since we needed to use a signal anyway to break out of kernel_recvmsg. Also, cifs_demultiplex_thread does a bit of cleanup as it's exiting, and we need to be certain that this gets done. It's possible for a kthread to exit before its main function is ever run if kthread_stop is called soon after its creation. While I'm not sure that this is a real problem with cifsd now, it could be at some point in the future if cifs_mount is ever changed to bring down the thread quickly. The upshot here is that using kthread_stop to bring down the thread just adds extra complexity with no real benefit. This patch changes the code to use the original method to bring down the thread, but still leaves it so that the thread is actually started with kthread_run. This seems to fix the deadlock caused by the reproducer in this bug report: https://bugzilla.samba.org/show_bug.cgi?id=5720 Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-16[CIFS] Add nodfs mount optionSteve French2-0/+12
Older samba server (eg. 3.0.24 from Debian etch) don't work correctly, if DFS paths are used. Such server claim that they support DFS, but fail to process some requests with DFS paths. Starting with Linux 2.6.26, the cifs clients starts sending DFS paths in such situations, rendering it unuseable with older samba servers. The nodfs mount options forces a share to be used with non DFS paths, even if the server claims, that it supports it. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Acked-by: Jeff Layton <jlayton@redhat.com> Acked-by: Igor Mammedov <niallain@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-12[CIFS] cifs: remove pointless lock and unlock of GlobalMid_Lock in header_assembleJeff Layton1-2/+0
We lock GlobalMid_Lock in header_assemble and then immediately unlock it again without doing anything. Not sure what this was intended to do, but remove it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-10-08[CIFS] Check that last search entry resume key is validSteve French1-3/+24
Jeff's recent patch to add a last_entry field in the search structure to better construct resume keys did not validate that the server sent us a plausible pointer to the last entry. This adds that. Signed-off-by: Steve French <sfrench@us.ibm.com>