aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-10-31[CIFS] Don't request too much permission when reading an ACLSteve French1-5/+4
We were requesting GENERIC_READ but that fails when we do not have read permission on the file (even if we could read the ACL). Also move the dump access control entry code into debug ifdef. Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-10-25[CIFS] acl support part 6Steve French1-1/+1
Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> CC: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-10-19[CIFS] ACL support part 5Steve French1-0/+6
Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-10-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6Linus Torvalds1-10/+42
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (51 commits) [CIFS] log better errors on failed mounts [CIFS] Return better error when server requires signing but client forbids [CIFS] fix typo [CIFS] acl support part 4 [CIFS] Fix minor problems noticed by scan [CIFS] fix bad handling of EAGAIN error on kernel_recvmsg in cifs_demultiplex_thread [CIFS] build break [CIFS] endian fixes [CIFS] endian fixes in new acl code [CIFS] Fix some endianness problems in new acl code [CIFS] missing #endif from a previous patch [CIFS] formatting fixes [CIFS] Break up unicode_sessetup string functions [CIFS] parse server_GUID in SPNEGO negProt response [CIFS] [CIFS] Fix endian conversion problem in posix mkdir [CIFS] fix build break when lanman not enabled [CIFS] remove two sparse warnings [CIFS] remove compile warnings when debug disabled [CIFS] CIFS ACL support part 3 ...
2007-10-18CIFS: ignore mode change if it's just for clearing setuid/setgid bitsJeff Layton1-0/+5
If the ATTR_KILL_S*ID bits are set then any mode change is only for clearing the setuid/setgid bits. For CIFS, skip the mode change and let the server handle it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Steven French <sfrench@us.ibm.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-14[CIFS] Fix endian conversion problem in posix mkdirCyril Gorcunov1-1/+2
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-09-28[CIFS] CIFS support for named pipes (part 1)Steve French1-4/+18
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>
2007-09-17[CIFS] Fallback to standard mkdir if server incorrectly claims support forSteve French1-2/+5
posix ops Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-09-16[CIFS] fix small memory leak in an error path in new posix mkdirSteve French1-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>
2007-09-13[CIFS] Respect umask when using POSIX mkdirJeff1-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>
2007-08-31[CIFS] Fix warnings shown by newer version of sparseSteve French1-2/+2
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-08-22[CIFS] cifs truncate missing a fix for private map COW raceSteve French1-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>
2007-07-18[CIFS] Allow disabling CIFS Unix Extensions as mount optionSteve French1-6/+7
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>
2007-07-16[CIFS] Typo in previous patchSteve French1-2/+1
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-07-16[CIFS] zero_user_page() conversionsEric1-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>
2007-07-15[CIFS] Add support for new POSIX unlinkSteve French1-1/+13
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>
2007-07-13[CIFS] whitespace/formatting fixesSteve French1-16/+12
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>
2007-07-10[CIFS] whitespace cleanupSteve French1-128/+131
More than halfway there Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-06-08[CIFS] CIFS should honour umaskSteve French1-2/+3
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>
2007-04-30[CIFS] UID/GID override on CIFS mounts to SambaSteve French1-22/+33
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>
2007-04-25[CIFS] New CIFS POSIX mkdir performance improvement (part 2)Steve French1-11/+32
Fix incorrect parsing of return data Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-04-23[CIFS] New CIFS POSIX mkdir performance improvementSteve French1-3/+181
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-04-06[CIFS] Add write perm for usr to file on windows should remove r/o dos attrSteve French1-11/+11
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>
2007-03-23[CIFS] Allow reset of file to ATTR_NORMAL when archive bit not setSteve French1-3/+12
When a file had a dos attribute of 0x1 (readonly - but dos attribute of archive was not set) - doing chmod 0777 or equivalent would try to set a dos attribute of 0 (which some servers ignore) rather than ATTR_NORMAL (0x20) which most servers accept. Does not affect servers which support the CIFS Unix Extensions. Acked-by: Prasad Potluri <pvp@us.ibm.com> Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-03-10[CIFS] reset mode when client notices that ATTR_READONLY is no longer setAlan Tyson1-0/+6
Signed-off-by: Alan Tyso <atyson@hp.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-02-27[CIFS] Remove some unused functions/declarationsSteve French1-1/+3
Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-02-26[CIFS] small piece missing from previous patchSteve French1-5/+11
There were two i_size_writes in the new truncate function - we missed one in the last patch. Noticed by Shaggy when he reviewed. Thank you Shaggy ... CC: Shaggy <shaggy@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-02-26[CIFS] Fix locking problem around some cifs uses of i_size writeSteve French1-2/+48
Could cause hangs on smp systems in i_size_read on a cifs inode whose size has been previously simultaneously updated from different processes. Thanks to Brian Wang for some great testing/debugging on this hard problem. Fixes kernel bugzilla #7903 CC: Shirish Pargoankar <shirishp@us.ibm.com> CC: Shaggy <shaggy@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-02-17[CIFS] mtime bounces from local to remote when cifs nocmtime i_flags overwrittenSteve French1-0/+5
atime flag was also overwritten. Noticed by Shirish when he was debugging an atime problem. Should help performance a bit too. cifs should be getting time stamps from the server (that was the original intent too) Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-02-15[CIFS] fix &&/& typo in cifs_setattr()Steve French1-1/+1
Thanks to Dirk for pointing this out. Signed-off-by: Dirk Mueller <dmueller@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
2007-02-08[CIFS] Allow update of EOF on remote extend of fileSteve French1-3/+3
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-11-16[CIFS] Fix timezone handling on stat to os/2Steve French1-0/+6
We were adjusting for timezone on readdir but not on stat Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-11-07[CIFS] Explicitly set stat->blksizeSteve French1-1/+3
CIFS may perform I/O over the network in larger chunks than the page size, so it should explicitly set stat->blksize to ensure optimal I/O bandwidth Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-11-02[CIFS] report rename failure when target file is locked by WindowsSteve French1-5/+9
Fixes Samba bugzilla bug # 4182 Rename by handle failures (retry after rename by path) were not being returned back. Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-10-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6Linus Torvalds1-3/+9
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (27 commits) [CIFS] Missing flags2 for DFS [CIFS] Workaround incomplete byte length returned by some [CIFS] cifs Kconfig: don't select CONNECTOR [CIFS] Level 1 QPathInfo needed for proper OS2 support [CIFS] fix typo in previous patch [CIFS] Fix old DOS time conversion to handle timezone [CIFS] Do not need to adjust for Jan/Feb for leap day [CIFS] Fix leaps year calculation for years after 2100 [CIFS] readdir (ffirst) enablement of accurate timestamps from legacy servers [CIFS] Fix compiler warning with previous patch [CIFS] Fix typo [CIFS] Allow for 15 minute TZs (e.g. Nepal) and be more explicit about [CIFS] Fix readdir of large directories for backlevel servers [CIFS] Allow LANMAN21 support even in both POSIX non-POSIX path [CIFS] Make use of newer QFSInfo dependent on capability bit instead of [CIFS] Do not send newer QFSInfo to legacy servers which can not support it [CIFS] Fix typo in name of new cifs_show_stats [CIFS] Rename server time zone field [CIFS] Handle legacy servers which return undefined time zone [CIFS] CIFS support for /proc/<pid>/mountstats part 1 ... Manual conflict resolution in fs/cifs/connect.c
2006-10-12[CIFS] Level 1 QPathInfo needed for proper OS2 supportSteve French1-1/+4
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-10-01[PATCH] r/o bind mounts: monitor zeroing of i_nlinkDave Hansen1-1/+1
Some filesystems, instead of simply decrementing i_nlink, simply zero it during an unlink operation. We need to catch these in addition to the decrement operations. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01[PATCH] r/o bind mount prepwork: inc_nlink() helperDave Hansen1-1/+1
This is mostly included for parity with dec_nlink(), where we will have some more hooks. This one should stay pretty darn straightforward for now. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01[PATCH] r/o bind mounts: unlink: monitor i_nlinkDave Hansen1-5/+5
When a filesystem decrements i_nlink to zero, it means that a write must be performed in order to drop the inode from the filesystem. We're shortly going to have keep filesystems from being remounted r/o between the time that this i_nlink decrement and that write occurs. So, add a little helper function to do the decrements. We'll tie into it in a bit to note when i_nlink hits zero. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Christoph Hellwig <hch@lst.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-30[PATCH] BLOCK: Remove no-longer necessary linux/buffer_head.h inclusions [try #6]David Howells1-1/+0
Remove inclusions of linux/buffer_head.h that are no longer necessary due to the transfer of a number of things out of there. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-28[CIFS] Legacy time handling for Win9x and OS/2 part 1Steve French1-2/+5
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-06-01[CIFS] Do not overwrite aopsDave Kleikamp1-6/+8
cifs should not be overwriting an element of the aops structure, since the structure is shared by all cifs inodes. Instead define a separate aops structure to suit each purpose. I also took the liberty of replacing a hard-coded 4096 with PAGE_CACHE_SIZE Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-05-31[CIFS] Support for setting up SMB sessions to legacy lanman serversSteve French1-1/+2
2006-05-31[CIFS] Cleanup extra whitespace in dmesg logging. Update cifs change logSteve French1-12/+12
2006-04-21[CIFS] [CIFS] Do not take rename sem on most path based calls (duringSteve French1-6/+0
building of full path) to avoid hang rename/readdir hang Reported by Alan Tyson Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-03-31[CIFS] Fix typo in earlier cifs_unlink change and protect oneSteve French1-5/+7
extra path. Since cifs_unlink can also be called from rename path and there was one report of oops am making the extra check for null inode. Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-03-31[CIFS] Fix unlink oops when indirectly called in rename error pathSteve French1-1/+4
under heavy stress. Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-03-31Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.gitSteve French1-11/+11
Signed-off-by: Steve French <sfrench@us.ibm.com>
2006-03-26[PATCH] 2tb-files-add-blkcnt_t-fixesAndrew Morton1-3/+3
Cc: Takashi Sato <sho@tnes.nec.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23[PATCH] sem2mutex: vfs_rename_mutexArjan van de Ven1-8/+8
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Al Viro <viro@ftp.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>