Commit graph

570 commits

Author SHA1 Message Date
Igor Mammedov 7c5e628f95 [CIFS] Fixed build warning in is_ip
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-08 20:48:42 +00:00
Steve French cf432eb50f [CIFS] cleanup cifsd completion
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 22:27:16 +00:00
Steve French dea570e08a [CIFS] Remove over-indented code in find_unc().
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-06 22:05:51 +00:00
Steve French a815752ac0 Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-05-06 17:55:32 +00:00
Steve French 5ade9deaaa [CIFS] fix typo
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-05-02 20:56:23 +00:00
Steve French 9b1ec9ecea [CIFS] Remove duplicate call to mode_to_acl
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-29 20:15:43 +00:00
Alexey Dobriyan 36a5aeb878 proc: remove proc_root_fs
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 08:06:18 -07:00
Steve French 4b18f2a9c3 [CIFS] convert usage of implicit booleans to bool
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-29 00:06:05 +00:00
Igor Mammedov bf62fd887c [CIFS] fixed compatibility issue with samba refferal request
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 23:05:58 +00:00
Steve French 39da984711 [CIFS] Fix statfs formatting
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-28 04:04:34 +00:00
Steve French 1dbbb60774 Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-28 04:01:34 +00:00
Steve French d09e860cf0 [CIFS] Adds to dns_resolver checking if the server name is an IP addr and skipping upcall in this case.
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Signed-off-by: sfrench@us.ibm.com
2008-04-26 00:22:23 +00:00
Steve French 0206e61b46 [CIFS] Fix spelling mistake
Noticed by Joe Perches

Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-25 18:19:40 +00:00
Al Viro 42faad9965 [PATCH] restore sane ->umount_begin() API
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-04-25 09:23:25 -04:00
Igor Mammedov 78d31a3a87 cifs: timeout dfs automounts +little fix.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-04-25 09:15:26 -04:00
Steve French 47df179317 [CIFS] Update cifs version number
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-25 02:01:44 +00:00
Steve French a7f796a60b [CIFS] Fix typo in previous commit
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-24 16:39:07 +00:00
Steve French ee4987ab5c [CIFS] Fix define for new proxy cap to match documentation
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-24 16:31:12 +00:00
Steve French 076d8423a9 [CIFS] Fix UNC path prefix on QueryUnixPathInfo to have correct slash
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 23:26:26 +00:00
Steve French 2302aca850 [CIFS] Reserve new proxy cap for WAFS
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-18 16:40:32 +00:00
Steve French 675c46796d [CIFS] Add various missing flags and defintions
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-17 23:41:01 +00:00
Steve French 8d142137b4 [CIFS] make cifs_dfs_automount_list_static
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-16 03:56:51 +00:00
Steve French 5d941ca628 [CIFS] Fix oops when slow oplock process races with unmount
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-15 18:40:48 +00:00
Steve French cce246ee5f [CIFS] Fix acl length when very short ACL being modified by chmod
Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-09 20:55:31 +00:00
Steve French 35028d7111 [CIFS] Fix looping on reconnect to Samba when unexpected tree connect fail on reconnect
Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-09 20:32:42 +00:00
Steve French 932e2d23c8 [CIFS] minor update to change log
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-04-04 21:59:35 +00:00
Al Viro 2b210adcb0 cifs: fix misannotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-30 14:20:23 -07:00
Al Viro c35038beca [PATCH] do shrink_submounts() for all fs types
... 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-27 20:47:58 -04:00
Steve French 04b6e6ec1a [CIFS] Fix mem leak on dfs referral
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-03-22 22:57:44 +00:00
Steve French 8b1327f6ed [CIFS] file create with acl support enabled is slow
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 22:37:16 +00:00
Steve French 50531444fa [CIFS] Fix mtime on cp -p when file data cached but written out too late
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.

cea218054a
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-14 19:21:31 +00:00
Steve French bc5b6e24a1 [CIFS] Fix build problem
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-03-11 21:07:48 +00:00
Harvey Harrison 55f78e1771 [CIFS] cifs: replace remaining __FUNCTION__ occurrences
__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-10 17:14:34 +00:00
Igor Mammedov 7962670e64 [CIFS] DFS patch that connects inode with dfs handling ops
if DFS junction point

Signed-off-by: Igor Mammedov <niallain@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-03-09 03:44:18 +00:00
Steve French 0b442d2c28 [CIFS] remove unused variable
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-26 03:44:02 +00:00
Christoph Hellwig 75f12983d9 [CIFS] consolidate duplicate code in posix/unix inode handling
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-25 20:25:21 +00:00
Steve French e086fcea86 [CIFS] fix build break when proc disabled
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-18 04:03:58 +00:00
Steve French 0a3abcf75b Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-02-15 21:06:08 +00:00
Christoph Hellwig 70eff55d2d [CIFS] factoring out common code in get_inode_info functions
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-15 20:55:05 +00:00
Steve French c2d68ea65b [CIFS] fix prepath conversion when server supports posix paths
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 19:20:18 +00:00
Igor Mammedov 11b6d6450c [CIFS] Only convert / when server does not support posix paths
Also add warning if posix path setting changes on reconnect

Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-15 19:06:04 +00:00
Igor Mammedov 8aad018b6c [CIFS] Fix mixed case name in structure dfs_info3_param
Signed-off-by: Igor Mammedov <niallain@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-15 18:21:49 +00:00
Jan Blunck 1d957f9bf8 Introduce path_put()
* Add path_put() functions for releasing a reference to the dentry and
  vfsmount of a struct path in the right order

* Switch from path_release(nd) to path_put(&nd->path)

* Rename dput_path() to path_put_conditional()

[akpm@linux-foundation.org: fix cifs]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: <linux-fsdevel@vger.kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
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-02-14 21:13:33 -08:00
Jan Blunck 4ac9137858 Embed a struct path into struct nameidata instead of nd->{dentry,mnt}
This is the central patch of a cleanup series. In most cases there is no good
reason why someone would want to use a dentry for itself. This series reflects
that fact and embeds a struct path into nameidata.

Together with the other patches of this series
- it enforced the correct order of getting/releasing the reference count on
  <dentry,vfsmount> pairs
- it prepares the VFS for stacking support since it is essential to have a
  struct path in every place where the stack can be traversed
- it reduces the overall code size:

without patch series:
   text    data     bss     dec     hex filename
5321639  858418  715768 6895825  6938d1 vmlinux

with patch series:
   text    data     bss     dec     hex filename
5320026  858418  715768 6894212  693284 vmlinux

This patch:

Switch from nd->{dentry,mnt} to nd->path.{dentry,mnt} everywhere.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix cifs]
[akpm@linux-foundation.org: fix smack]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 21:13:33 -08:00
Steve French 03a143c909 [CIFS] fixup prefixpaths which contain multiple path components
Currently, when we get a prefixpath as part of mount, the kernel only
changes the first character to be a '/' or '\' depending on whether
posix extensions are enabled. This is problematic as it expects
mount.cifs to pass in the correct delimiter in the rest of the
prefixpath. But, mount.cifs may not know *what* the correct delimiter
is. It's a chicken and egg problem.

Note that mount.cifs should not do conversion of the
prefixpath - if we want posix behavior then '\' is legal in a path
(and we have had bugs in the distant path to prove to me that
customers sometimes have apps that require '\').  The kernel code
assumes that the path passed in is posix (and current code will handle
the first path component fine but was broken for Windows mounts
for "deep" prefixpaths unless the user specified a prefixpath with '\'
deep in it.   So e.g. with current kernel code:

1) mount to //server/share/dir1 will work to all server types
2) mount to //server/share/dir1/subdir1 will work to Samba
3) mount to //server/share/dir1\\subdir1 will work to Windows

But case two would fail to Windows without the fix.
With the kernel cifs module fix case two now works.

First analyzed by Jeff Layton and Simo Sorce

CC: Jeff Layton <jlayton@redhat.com>
CC: Simo Sorce <simo@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-14 06:38:30 +00:00
Steve French c1ce264470 [CIFS] fix typo
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-13 02:59:36 +00:00
Shirish Pargaonkar d9f382eff6 [CIFS] patch to fix incorrect encoding of number of aces on set mode
This patch fixes an error in the experimental cifs acl code. During chmod,
set security descriptor data (num aces) is not sent with little-endian encoding.

Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-12 20:46:26 +00:00
Roel Kluin 6f7e8f3763 [CIFS] Fix typo in quota operations
Although these experimental operations are not fully implemented, fix the
typo in the definition of the quotactl operations for cifs.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-12 20:38:10 +00:00
Steve French 90c81e0b0e [CIFS] clean up some hard to read ifdefs
Christoph had noticed too many ifdefs in the CIFS code making it
hard to read.  This patch removes about a quarter of them from
the C files in cifs by improving a few key ifdefs in the .h files.

Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-12 20:32:36 +00:00
Steve French ad7a2926b9 [CIFS] reduce checkpatch warnings
Signed-off-by: Steve French <sfrench@us.ibm.com>
2008-02-07 23:25:02 +00:00