summaryrefslogtreecommitdiffstats
path: root/fs/cifs
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | [CIFS] whitespace/formatting fixesSteve French2007-07-1327-1160/+1285
| | | | | | | | | | | | | | | | | | This should be the last big batch of whitespace/formatting fixes. checkpatch warnings for the cifs directory are down about 90% and many of the remaining ones are harder to remove or make the code harder to read. Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Fix oops in cifs_create when nfsd server exports cifs mountSteve French2007-07-116-14/+33
| | | | | | | | | | | | | | | | | | | | | | nfsd is passing null nameidata (probably the only one doing that) on call to create - cifs was missing one check for this. Note that running nfsd over a cifs mount requires specifying fsid on the nfs exports entry and requires mounting cifs with serverino mount option. Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] whitespace cleanupSteve French2007-07-1012-591/+610
| | | | | | | | | | | | More than halfway there Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Fix packet signatures for NTLMv2 caseSteve French2007-07-098-36/+71
| | | | | | | | | | Signed-off-by: Yehuda Sadeh Weinraub <Yehuda.Sadeh@expand.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] more whitespace fixesSteve French2007-07-084-137/+141
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] more whitespace cleanupSteve French2007-07-077-538/+544
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] whitespace cleanupSteve French2007-07-066-46/+48
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] whitespace cleanupSteve French2007-07-063-228/+232
| | | | | | | | | | | | checkpatch.pl redux Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] ipv6 support no longer experimentalJeff2007-07-062-62/+1
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Mount should fail if server signing off but client mount option ↵Jeff2007-07-062-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | requires it Currently, if mount with a signing-enabled sec= option (e.g. sec=ntlmi), the kernel does a warning printk if the server doesn't support signing, and then proceeds without signatures. This is probably OK for people that think to look at the ring buffer, but seems wrong to me. If someone explicitly requests signing, we should error out if that request can't be satisfied. They can then reattempt the mount without signing if that's ok. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] whitespace fixesSteve French2007-06-286-106/+108
| | | | | | | | | | | | This changeset brought to you ... by patchcheck.pl Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Fix sign mount option and sign proc config settingSteve French2007-06-282-95/+29
| | | | | | | | | | | | | | | | | | We were checking the wrong (old) global variable to determine whether to override server and force signing on the SMB connection. Acked-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] whitespace cleanupSteve French2007-06-271-26/+27
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Do not allow signals in cifs_demultiplex_threadJeff2007-06-251-6/+7
| | | | | | | | | | | | | | | | | | Switch from send_sig to force_sig and do not allow signal for this background thread (the signal is needed to wakeup the thread when blocked in the network stack). Signed-off-by: Jeff Layton <jlayton@readhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] fix whitespaceSteve French2007-06-242-56/+58
| | | | | | | | | | | | More whitespace problems found by checkpatch Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [CIFS] Add in some missing flags and cifs README and TODO correctionsSteve French2007-06-246-29/+80
|/ | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] CIFS should honour umaskSteve French2007-06-082-4/+7
| | | | | | | | | | | | | | | | | | | | This patch makes CIFS honour a process' umask like other filesystems. Of course the server is still free to munge the permissions if it wants to; but the client will send the "right" permissions to begin with. A few caveats: 1) It only applies to filesystems that have CAP_UNIX (aka support unix extensions) 2) It applies the correct mode to the follow up CIFSSMBUnixSetPerms() after remote creation When mode to CIFS/NTFS ACL mapping is complete we can do the same thing for that case for servers which do not support the Unix Extensions. Signed-off-by: Matt Keenen <matt@opcode-solutions.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Missing flag on negprot needed for some servers to force packet signingYehuda Sadeh Weinraub2007-06-051-2/+2
| | | | | | | | | | | A related signature issue that I came across. There's a bug in win2k that when NT error codes are not negotiated, the server doesn't response that signatures are mandatory. Since there's (currently) no way turn on signatures in such case, I had to force NT error codes, so that this bug will not occur Signed-off-by: Yehuda Sadeh Weinraub <Yehuda.Sadeh@expand.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] whitespace cleanup part 2Steve French2007-06-053-132/+138
| | | | | | | | Various coding style problems found by running the new checkpatch.pl script against fs/cifs. 3 more files fixed up. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] whitespace cleanupSteve French2007-06-054-125/+124
| | | | | | | | | Various coding style problems found by running fs/cifs against the new checkpatch.pl script. Since there were too many to fit in one patch. Updated the first four files. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] fix mempool destroy done in wrong order in cifs error pathAkinobu Mita2007-06-041-1/+1
| | | | | | | | | Slab cache used as memory pool can not be destroyed before the memory pool destruction. Because the memory pool still holds some objects and kmem_cache_destroy() says "Can't free all objects". Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] typo in previous patchSteve French2007-05-241-3/+3
| | | | | | (also fixed missing space after if) Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix oops on failed cifs mount (in kthread_stop)Steve French2007-05-231-2/+12
| | | | | | | | | | | | | | If the cifs demultiplex thread wakes up and exits (zeroing server->tsk) before kthread_stop is called, the cifs_mount code could pass a null pointer to kthread_stop Thanks to akpm, Dave Young and Shaggy for suggesting earlier versions of this patch. CC: akpm@linux-foundatior.org Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* Remove SLAB_CTOR_CONSTRUCTORChristoph Lameter2007-05-171-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: David Howells <dhowells@redhat.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Steven French <sfrench@us.ibm.com> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Dave Kleikamp <shaggy@austin.ibm.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Anton Altaparmakov <aia21@cantab.net> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@ucw.cz> Cc: David Chinner <dgc@sgi.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* header cleaning: don't include smp_lock.h when not usedRandy Dunlap2007-05-082-2/+0
| | | | | | | | | | | | Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* slab allocators: Remove SLAB_DEBUG_INITIAL flagChristoph Lameter2007-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have never seen a use of SLAB_DEBUG_INITIAL. It is only supported by SLAB. I think its purpose was to have a callback after an object has been freed to verify that the state is the constructor state again? The callback is performed before each freeing of an object. I would think that it is much easier to check the object state manually before the free. That also places the check near the code object manipulation of the object. Also the SLAB_DEBUG_INITIAL callback is only performed if the kernel was compiled with SLAB debugging on. If there would be code in a constructor handling SLAB_DEBUG_INITIAL then it would have to be conditional on SLAB_DEBUG otherwise it would just be dead code. But there is no such code in the kernel. I think SLUB_DEBUG_INITIAL is too problematic to make real use of, difficult to understand and there are easier ways to accomplish the same effect (i.e. add debug code before kfree). There is a related flag SLAB_CTOR_VERIFY that is frequently checked to be clear in fs inode caches. Remove the pointless checks (they would even be pointless without removeal of SLAB_DEBUG_INITIAL) from the fs constructors. This is the last slab flag that SLUB did not support. Remove the check for unimplemented flags from SLUB. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [CIFS] Fix typo in cifs readme from previous commitSteve French2007-05-051-2/+2
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Make sec=none force an anonymous mountJeff Layton2007-05-053-8/+24
| | | | | | | | | | | | | | | | We had a customer report that attempting to make CIFS mount with a null username (i.e. doing an anonymous mount) doesn't work. Looking through the code, it looks like CIFS expects a NULL username from userspace in order to trigger an anonymous mount. The mount.cifs code doesn't seem to ever pass a null username to the kernel, however. It looks also like the kernel can take a sec=none option, but it only seems to look at it if the username is already NULL. This seems redundant and effectively makes sec=none useless. The following patch makes sec=none force an anonymous mount. Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Change semaphore to mutex for cifs lock_semRoland Dreier2007-05-033-9/+9
| | | | | | | | | | | | | | | Originally at http://lkml.org/lkml/2006/9/2/86 The recent change to "allow Windows blocking locks to be cancelled via a CANCEL_LOCK call" introduced a new semaphore in struct cifsFileInfo, lock_sem. However, semaphores used as mutexes are deprecated these days, and there's no reason to add a new one to the kernel. Therefore, convert lock_sem to a struct mutex (and also fix one indentation glitch on one of the lines changed anyway). Signed-off-by: Roland Dreier <roland@digitalvampire.org> Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Fix oops in reset_cifs_unix_caps on reconnectSteve French2007-05-031-1/+1
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] UID/GID override on CIFS mounts to SambaSteve French2007-04-308-171/+213
| | | | | | | | | | | | | | | | | | When CIFS Unix Extensions are negotiated we get the Unix uid and gid owners of the file from the server (on the Unix Query Path Info levels), but if the server's uids don't match the client uid's users were having to disable the Unix Extensions (which turned off features they still wanted). The changeset patch allows users to override uid and/or gid for file/directory owner with a default uid and/or gid specified at mount (as is often done when mounting from Linux cifs client to Windows server). This changeset also displays the uid and gid used by default in /proc/mounts (if applicable). Also cleans up code by adding some of the missing spaces after "if" keywords per-kernel style guidelines (as suggested by Randy Dunlap when he reviewed the patch). Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] prefixpath mounts to servers supporting posix paths used wrong slashSteve French2007-04-261-1/+7
| | | | | Acked-by: Alexander Bokovoy <abokovoy@ru.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Update cifs version to 1.49Steve French2007-04-262-41/+30
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Replace kmalloc/memset combination with kzallocvignesh2007-04-251-5/+2
| | | | | Signed-off-by: Vignesh Babu <vignesh.babu@wipro.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Add IPv6 supportSteve French2007-04-253-7/+40
| | | | | | | | | | | | | | IPv6 support was started a few years ago in the cifs client, but lacked a kernel helper function for parsing the ascii form of the ipv6 address. Now that that is added (and now IPv6 is the default that some OS use now) it was fairly easy to finish the cifs ipv6 support. This requires that CIFS_EXPERIMENTAL be enabled and (at least until the mount.cifs module is modified to use a new ipv6 friendly call instead of gethostbyname) and the ipv6 address be passed on the mount as "ip=" mount option. Thanks Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] New CIFS POSIX mkdir performance improvement (part 2)Steve French2007-04-252-15/+39
| | | | | | Fix incorrect parsing of return data Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] New CIFS POSIX mkdir performance improvementSteve French2007-04-235-15/+340
| | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
* [CIFS] Add write perm for usr to file on windows should remove r/o dos attrSteve French2007-04-062-12/+15
| | | | | | | | | | | Remove read only dos attribute on chmod when adding any write permission (ie on any of user/group/other (not all of user/group/other ie 0222) when mounted to windows. Suggested by: Urs Fleisch Signed-off-by: Urs Fleisch <urs.fleisch@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>