aboutsummaryrefslogtreecommitdiff
path: root/fs/cifs
AgeCommit message (Collapse)Author
2008-05-13[CIFS] cleanup old checkpatch warningsSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-13[CIFS] CIFSSMBPosixLock should return -EINVAL on errorMarcin Slusarz
all other codepaths in this function return negative values on errors Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-13fix memory leak in CIFSFindNextJeff Layton
When CIFSFindNext gets back an -EBADF from a call, it sets the return code of the function to 0 and eventually exits. Doing this makes the cleanup at the end of the function skip freeing the SMB buffer, so we need to make sure we free the buffer explicitly when doing this. If we don't you end up with errors like this when unplugging the cifs kernel module: slab error in kmem_cache_destroy(): cache `cifs_request': Can't free all objects [<c046bdbf>] kmem_cache_destroy+0x61/0xf3 [<e0f03045>] cifs_destroy_request_bufs+0x14/0x28 [cifs] [<e0f2016e>] exit_cifs+0x1e/0x80 [cifs] [<c043aeae>] sys_delete_module+0x192/0x1b8 [<c04451fd>] audit_syscall_entry+0x14b/0x17d [<c0405413>] syscall_call+0x7/0xb ======================= Signed-off-by: Jeff Layton <jlayton@redhat.com>
2008-05-12[CIFS] CIFS currently allows for permissions to be changed on files, evenJeff Layton
when unix extensions and cifsacl support are disabled. These permissions changes are "ephemeral" however. They are lost whenever a share is mounted and unmounted, or when memory pressure forces the inode out of the cache. Because of this, we'd like to introduce a behavior change to make CIFS behave more like local DOS/Windows filesystems. When unix extensions and cifsacl support aren't enabled, then don't silently ignore changes to permission bits that can't be reflected on the server. Still, there may be people relying on the current behavior for certain applications. This patch adds a new "dynperm" (and a corresponding "nodynperm") mount option that will be intended to make the client fall back to legacy behavior when setting these modes. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-11[CIFS] don't allow demultiplex thread to exit until kthread_stop is calledSteve French
cifs_demultiplex_thread can exit under several conditions: 1) if it's signaled 2) if there's a problem with session setup 3) if kthread_stop is called on it The first two are problems. If kthread_stop is called on the thread, there is no guarantee that it will still be up. We need to have the thread stay up until kthread_stop is called on it. One option would be to not even try to tear things down until after kthread_stop is called. However, in the case where there is a problem setting up the session, there's no real reason to try continuing the loop. This patch allows the thread to clean up and prepare for exit under all three conditions, but it has the thread go to sleep until kthread_stop is called. This allows us to simplify the shutdown code somewhat since we can be reasonably sure that the thread won't exit after being signaled but before kthread_stop is called. It also removes the places where the thread itself set the tsk variable since it appeared that it could have a potential race where the thread might never be shut down. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-11[CIFS] when not using unix extensions, check for and set ATTR_READONLY on ↵Jeff Layton
create and mkdir When creating a directory on a CIFS share without POSIX extensions, and the given mode has no write bits set, set the ATTR_READONLY bit. When creating a file, set ATTR_READONLY if the create mode has no write bits set and we're not using unix extensions. There are some comments about this being problematic due to the VFS splitting creates into 2 parts. I'm not sure what that's actually talking about, but I'm assuming that it has something to do with how mknod is implemented. In the simple case where we have no unix extensions and we're just creating a regular file, there's no reason we can't set ATTR_READONLY. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-11[CIFS] add local struct inode pointer to cifs_setattrJeff Layton
Clean up cifs_setattr a bit by adding a local inode pointer, and changing all of the direntry->d_inode references to it. This also adds a bit of micro-optimization. d_inode shouldn't change over the life of this function, so we only need to dereference it once. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-11[CIFS] cifs_find_tcp_session cleanupCyrill Gorcunov
This patch cleans up cifs_find_tcp_session so it become less indented. Also the error of skipping IPv6 matched addresses fixed. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-09[CIFS] fix build warningSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-08[CIFS] Fixed build warning in is_ipIgor Mammedov
Signed-off-by: Igor Mammedov <niallain@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-06[CIFS] cleanup cifsd completionSteve French
Was a holdover from the old kernel_thread based cifsd code. We needed to know that the thread had set the task variable before proceeding. Now that kthread_run returns the new task, this doesn't appear to be needed anymore. As best I can tell, this sleep was intended to try to prevent cifs_umount from freeing the cifsSesInfo struct before cifsd had exited. Now that cifsd is using the kthread API, we know that when kthread_stop returns that cifsd has exited, so I don't think this is needed any longer. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Christop Hellwig <hch@infradead.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-06[CIFS] Remove over-indented code in find_unc().Steve French
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-06Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6Steve French
2008-05-02[CIFS] fix typoSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-29[CIFS] Remove duplicate call to mode_to_aclSteve French
The current logic in cifs_setattr calls mode_to_acl twice on mode changes if cifsacl is enabled. Remove the duplicate call. Signed-off-by: Jeff Layton <jlayton@redhat.com> CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-29proc: remove proc_root_fsAlexey Dobriyan
Use creation by full path instead: "fs/foo". Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29[CIFS] convert usage of implicit booleans to boolSteve French
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-28[CIFS] fixed compatibility issue with samba refferal requestIgor Mammedov
treeName part is canonicalized to '/' path separator Signed-off-by: Igor Mammedov <niallain@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-28[CIFS] Fix statfs formattingSteve French
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-28Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6Steve French
2008-04-26[CIFS] Adds to dns_resolver checking if the server name is an IP addr and ↵Steve French
skipping upcall in this case. Signed-off-by: Igor Mammedov <niallain@gmail.com> Signed-off-by: sfrench@us.ibm.com
2008-04-25[CIFS] Fix spelling mistakeSteve French
Noticed by Joe Perches Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-25[PATCH] restore sane ->umount_begin() APIAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-04-25cifs: timeout dfs automounts +little fix.Igor Mammedov
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-04-25[CIFS] Update cifs version numberSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-24[CIFS] Fix typo in previous commitSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-24[CIFS] Fix define for new proxy cap to match documentationSteve French
The transport encryption capability and new SetFSInfo level were missing, and the new proxy capability (which Samba server is implementing) and proxy setfsinfo needed to be moved down to not collide with Samba's transport encryption capability. CC: Jeremy Allison <jra@samba.org> CC: Sam Liddicott <sam@lidicott.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-18[CIFS] Fix UNC path prefix on QueryUnixPathInfo to have correct slashSteve French
When a share was in DFS and the server was Unix/Linux, we were sending paths of the form \\server\share/dir/file rather than //server/share/dir/file There was some discussion between me and jra over whether we should use /server/share/dir/file as MS sometimes says - but the documentation for this claims it should be doubleslash for this type of UNC-like path format and that works, so leaving it as doubleslash but converting the \ to / in the the //server/share portion. This gets Samba to now correctly return STATUS_PATH_NOT_COVERED when it is supposed to (Windows already did since the direction of the slash was not an issue for them). Still need another minor change to fully enable DFS (need to finish some chages to SMBGetDFSRefer Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-18[CIFS] Reserve new proxy cap for WAFSSteve French
New WAFS filer uses ioctls which are shown to be available on a share by querying this info level Acked-by: Sam Liddicott <sam@liddicott.com> Signed-off-by: Stevef French <sfrench@us.ibm.com>
2008-04-17[CIFS] Add various missing flags and defintionsSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-16[CIFS] make cifs_dfs_automount_list_staticSteve French
This patch makes the needlessly global cifs_dfs_automount_list static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-15[CIFS] Fix oops when slow oplock process races with unmountSteve French
If a tcon is being freed in call tconInfoFree, clean up any entries that may exist in global oplock queue as the tcon structure hanging off of those entries will be invalid and can cause oops while accesing any elements in the tcon structure. Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-09[CIFS] Fix acl length when very short ACL being modified by chmodSteve French
Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-09[CIFS] Fix looping on reconnect to Samba when unexpected tree connect fail ↵Steve French
on reconnect Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-04[CIFS] minor update to change logSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-03-30cifs: fix misannotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-27[PATCH] do shrink_submounts() for all fs typesAl Viro
... and take it out of ->umount_begin() instances. Call with all locks already taken (by do_umount()) and leave calling release_mounts() to caller (it will do release_mounts() anyway, so we can just put into the same list). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-03-22[CIFS] Fix mem leak on dfs referralSteve French
Signed-off-by: Igor Mammedov <niallain@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-03-14[CIFS] file create with acl support enabled is slowSteve French
Shirish Pargaonkar noted: With cifsacl mount option, when a file is created on the Windows server, exclusive oplock is broken right away because the get cifs acl code again opens the file to obtain security descriptor. The client does not have the newly created file handle or inode in any of its lists yet so it does not respond to oplock break and server waits for its duration and then responds to the second open. This slows down file creation signficantly. The fix is to pass the file descriptor to the get cifsacl code wherever available so that get cifs acl code does not send second open (NT Create ANDX) and oplock is not broken. CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-03-14[CIFS] Fix mtime on cp -p when file data cached but written out too lateSteve French
Kukks noticed that cp -p can write out file data too late, after the timestamp is already set. This was introduced as an unintentional sideeffect of the change in an earlier patch (see below) which fixed some delayed return code propagation. cea218054ad277d6c126890213afde07b4eb1602 Author: Jeff Layton <jlayton@redhat.com> Date: Tue Nov 20 23:19:03 2007 +0000 Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-03-11[CIFS] Fix build problemSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-03-10[CIFS] cifs: replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-03-09[CIFS] DFS patch that connects inode with dfs handling opsIgor Mammedov
if DFS junction point Signed-off-by: Igor Mammedov <niallain@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-26[CIFS] remove unused variableSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-25[CIFS] consolidate duplicate code in posix/unix inode handlingChristoph Hellwig
Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-18[CIFS] fix build break when proc disabledSteve French
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-15Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6Steve French
2008-02-15[CIFS] factoring out common code in get_inode_info functionsChristoph Hellwig
Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-15[CIFS] fix prepath conversion when server supports posix pathsSteve French
Jeff Layton that we were converting \ to / in the posix path case which is not always right (depends on what the old delim was). CC: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-15[CIFS] Only convert / when server does not support posix pathsIgor Mammedov
Also add warning if posix path setting changes on reconnect Signed-off-by: Steve French <sfrench@us.ibm.com>