summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* Squashfs: cody tidying, remove commented out line in MakefilePhillip Lougher2009-05-131-1/+0
| | | | Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: check page size is not larger than the filesystem block sizePhillip Lougher2009-05-131-0/+10
| | | | | | | | Normally the block size (by default 128K) will be larger than the page size, unless a non-standard block size has been specified in Mksquashfs, and the page size is larger than 4K. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: fix breakage when page size > metadata block sizeDoug Chapman2009-05-131-0/+1
| | | | | | | | | | | Squashfs is broken on any system where the page size is larger than the metadata size (8192). This is easily fixed by ensuring cache->pages is always > 0. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Doug Chapman <doug.chapman@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* dup2: Fix return value with oldfd == newfd and invalid fdJeff Mahoney2009-05-111-2/+4
| | | | | | | | | | | | | | | | | | | The return value of dup2 when oldfd == newfd and the fd isn't valid is not getting properly sign extended. We end up with 4294967287 instead of -EBADF. I've reproduced this on SLE11 (2.6.27.21), openSUSE Factory (2.6.29-rc5), and Ubuntu 9.04 (2.6.28). This patch uses a signed int for the error value so it is properly extended. Commit 6c5d0512a091480c9f981162227fdb1c9d70e555 introduced this regression. Reported-by: Jiri Dluhos <jdluhos@novell.com> Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2009-05-1031-342/+330
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (22 commits) Fix the race between capifs remount and node creation Fix races around the access to ->s_options switch ufs directories to ufs_sync_file() Switch open_exec() and sys_uselib() to do_open_filp() Make open_exec() and sys_uselib() use may_open(), instead of duplicating its parts Reduce path_lookup() abuses Make checkpatch.pl shut up on fs/inode.c NULL noise in fs/super.c:kill_bdev_super() romfs: cleanup romfs_fs.h ROMFS: romfs_dev_read() error ignored fs: dcache fix LRU ordering ocfs2: Use nd_set_link(). Fix deadlock in ipathfs ->get_sb() Fix a leak in failure exit in 9p ->get_sb() Convert obvious places to deactivate_locked_super() New helper: deactivate_locked_super() reiserfs: remove privroot hiding in lookup reiserfs: dont associate security.* with xattr files reiserfs: fixup xattr_root caching Always lookup priv_root on reiserfs mount and keep it ...
| * Fix races around the access to ->s_optionsAl Viro2009-05-095-11/+23
| | | | | | | | | | | | | | | | | | Put generic_show_options read access to s_options under rcu_read_lock, split save_mount_options() into "we are setting it the first time" (uses in foo_fill_super()) and "we are relacing and freeing the old one", synchronize_rcu() before kfree() in the latter. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * switch ufs directories to ufs_sync_file()Al Viro2009-05-093-3/+3
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Switch open_exec() and sys_uselib() to do_open_filp()Al Viro2009-05-093-54/+33
| | | | | | | | | | | | ... and make path_lookup_open() static Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Make open_exec() and sys_uselib() use may_open(), instead of duplicating its ↵Al Viro2009-05-091-9/+2
| | | | | | | | | | | | parts Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Reduce path_lookup() abusesAl Viro2009-05-091-4/+4
| | | | | | | | | | | | | | | | ... use kern_path() where possible [folded a fix from rdd] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Make checkpatch.pl shut up on fs/inode.cManish Katiyar2009-05-091-46/+35
| | | | | | | | | | | | | | | | | | | | Code Quality According To Mingo(tm) has been vastly improved, no code has been damaged^Wchanged^Wdamaged. [commit message rewritten -- AV] Signed-off-by: Manish Katiyar <mkatiyar@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * NULL noise in fs/super.c:kill_bdev_super()H Hartley Sweeten2009-05-091-1/+1
| | | | | | | | | | | | Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Subrata Modak <subrata@linux.vnet.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * ROMFS: romfs_dev_read() error ignoredRoel Kluin2009-05-091-1/+2
| | | | | | | | | | | | | | | | romfs_dev_read() may return -EIO, but ret is unsigned, so the errorpath isn't taken. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fs: dcache fix LRU orderingnpiggin@suse.de2009-05-091-1/+1
| | | | | | | | | | | | | | | | | | Fix ordering of LRU when moving referenced dentries to the head of the list (they should go to the head of the list in the same order as they were found from the tail, rather than reverse order). Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * ocfs2: Use nd_set_link().Joel Becker2009-05-091-40/+37
| | | | | | | | | | | | | | | | ocfs2 was hand-calling vfs_follow_link(), but there's no point to that. Let's use page_follow_link_light() and nd_set_link(). Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Fix a leak in failure exit in 9p ->get_sb()Al Viro2009-05-091-0/+1
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Convert obvious places to deactivate_locked_super()Al Viro2009-05-0910-38/+19
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * New helper: deactivate_locked_super()Al Viro2009-05-091-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Does equivalent of up_write(&s->s_umount); deactivate_super(s); However, it does not does not unlock it until it's all over. As the result, it's safe to use to dispose of new superblock on ->get_sb() failure exits - nobody will see the sucker until it's all over. Equivalent using up_write/deactivate_super is safe for that purpose if superblock is either safe to use or has NULL ->s_root when we unlock. Normally filesystems take the required precautions, but a) we do have bugs in that area in some of them. b) up_write/deactivate_super sequence is extremely common, so the helper makes sense anyway. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * reiserfs: remove privroot hiding in lookupJeff Mahoney2009-05-093-27/+16
| | | | | | | | | | | | | | | | | | | | | | With Al Viro's patch to move privroot lookup to fs mount, there's no need to have special code to hide the privroot in reiserfs_lookup. I've also cleaned up the privroot hiding in reiserfs_readdir_dentry and removed the last user of reiserfs_xattrs(). Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * reiserfs: dont associate security.* with xattr filesJeff Mahoney2009-05-091-2/+10
| | | | | | | | | | | | | | The security.* xattrs are ignored for xattr files, so don't create them. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * reiserfs: fixup xattr_root cachingJeff Mahoney2009-05-091-27/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | The xattr_root caching was broken from my previous patch set. It wouldn't cause corruption, but could cause decreased performance due to allocating a larger chunk of the journal (~ 27 blocks) than it would actually use. This patch loads the xattr root dentry at xattr initialization and creates it on-demand. Since we're using the cached dentry, there's no point in keeping lookup_or_create_dir around, so that's removed. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Always lookup priv_root on reiserfs mount and keep itAl Viro2009-05-092-52/+40
| | | | | | | | | | | | | | | | ... even if it's a negative dentry. That way we can set ->d_op on root before anyone could race with us. Simplify d_compare(), while we are at it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * reiserfs: Expand i_mutex to enclose lookup_one_lenJeff Mahoney2009-05-091-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.6.30-rc3 introduced some sanity checks in the VFS code to avoid NFS bugs by ensuring that lookup_one_len is always called under i_mutex. This patch expands the i_mutex locking to enclose lookup_one_len. This was always required, but not not enforced in the reiserfs code since it does locking around the xattr interactions with the xattr_sem. This is obvious enough, and it survived an overnight 50 thread ACL test. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: umount_begin BKL pushdownAlessio Igor Bogani2009-05-095-4/+17
| | | | | | | | | | | | | | Push BKL down into ->umount_begin() Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | GFS2: Fix glock ref counting bugSteven Whitehouse2009-05-091-0/+1
|/ | | | | | | | | Depending on the ordering of events as we go around the glock shrinker loop, it is possible to drop the ref count of a glock incorrectly. It doesn't happen very often. This patch corrects the got_ref variable, fixing the problem. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6Linus Torvalds2009-05-0721-1642/+791
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (32 commits) [CIFS] Fix double list addition in cifs posix open code [CIFS] Allow raw ntlmssp code to be enabled with sec=ntlmssp [CIFS] Fix SMB uid in NTLMSSP authenticate request [CIFS] NTLMSSP reenabled after move from connect.c to sess.c [CIFS] Remove sparse warning [CIFS] remove checkpatch warning [CIFS] Fix final user of old string conversion code [CIFS] remove cifs_strfromUCS_le [CIFS] NTLMSSP support moving into new file, old dead code removed [CIFS] Fix endian conversion of vcnum field [CIFS] Remove trailing whitespace [CIFS] Remove sparse endian warnings [CIFS] Add remaining ntlmssp flags and standardize field names [CIFS] Fix build warning cifs: fix length handling in cifs_get_name_from_search_buf [CIFS] Remove unneeded QuerySymlink call and fix mapping for unmapped status [CIFS] rename cifs_strndup to cifs_strndup_from_ucs Added loop check when mounting DFS tree. Enable dfs submounts to handle remote referrals. [CIFS] Remove older session setup implementation ...
| * [CIFS] Fix double list addition in cifs posix open codeSteve French2009-05-082-20/+9
| | | | | | | | | | | | | | | | Remove adding open file entry twice to lists in the file Do not fill file info twice in case of posix opens and creates Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Allow raw ntlmssp code to be enabled with sec=ntlmsspSteve French2009-05-064-8/+35
| | | | | | | | | | | | | | | | | | On mount, "sec=ntlmssp" can now be specified to allow "rawntlmssp" security to be enabled during CIFS session establishment/authentication (ntlmssp used to require specifying krb5 which was counterintuitive). Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Fix SMB uid in NTLMSSP authenticate requestSteve French2009-05-061-0/+4
| | | | | | | | | | | | | | | | We were not setting the SMB uid in NTLMSSP authenticate request which could lead to INVALID_PARAMETER error on 2nd session setup. Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] NTLMSSP reenabled after move from connect.c to sess.cSteve French2009-05-042-4/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NTLMSSP code was removed from fs/cifs/connect.c and merged (75% smaller, cleaner) into fs/cifs/sess.c As with the old code it requires that cifs be built with CONFIG_CIFS_EXPERIMENTAL, the /proc/fs/cifs/Experimental flag must be set to 2, and mount must turn on extended security (e.g. with sec=krb5). Although NTLMSSP encapsulated in SPNEGO is not enabled yet, "raw" ntlmssp is common and useful in some cases since it offers more complete security negotiation, and is the default way of negotiating security for many Windows systems. SPNEGO encapsulated NTLMSSP will be able to reuse the same code. Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Remove sparse warningSteve French2009-05-021-1/+0
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] remove checkpatch warningSteve French2009-05-021-1/+1
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Fix final user of old string conversion codeSteve French2009-05-021-42/+38
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] remove cifs_strfromUCS_leJeff Layton2009-05-022-30/+0
| | | | | | | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] NTLMSSP support moving into new file, old dead code removedSteve French2009-05-021-730/+0
| | | | | | | | | | | | | | Remove dead NTLMSSP support from connect.c prior to addition of the new code to replace it. Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Fix endian conversion of vcnum fieldSteve French2009-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When multiply mounting from the same client to the same server, with different userids, we create a vcnum which should be unique if possible (this is not the same as the smb uid, which is the handle to the security context). We were not endian converting additional (beyond the first which is zero) vcnum properly. CC: Stable <stable@kernel.org> Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Remove trailing whitespaceSteve French2009-05-012-2/+4
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Remove sparse endian warningsSteve French2009-05-014-103/+58
| | | | | | | | | | | | | | | | | | Removes two sparse CHECK_ENDIAN warnings from Jeffs earlier patch, and removes the dead readlink code (after noting where in findfirst we will need to add something like that in the future to handle the newly discovered unexpected error on FindFirst of NTFS symlinks. Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Add remaining ntlmssp flags and standardize field namesSteve French2009-05-012-41/+57
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Fix build warningSteve French2009-05-011-1/+1
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * cifs: fix length handling in cifs_get_name_from_search_bufJeff Layton2009-05-011-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The earlier patch to move this code to use the new unicode helpers assumed that the filename strings would be null terminated. That's not always the case. Instead of passing "max_len" to the string converter, pass "min(len, max_len)", which makes it do the right thing while still keeping the parser confined to the response. Also fix up the prototypes of this function and the callers so that max_len is unsigned (like len is). Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Remove unneeded QuerySymlink call and fix mapping for unmapped statusSteve French2009-04-305-11/+12
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] rename cifs_strndup to cifs_strndup_from_ucsSteve French2009-04-306-19/+25
| | | | | | | | | | | | | | | | | | | | In most cases, cifs_strndup is converting from Unicode (UCS2 / UTF-32) to the configured local code page for the Linux mount (usually UTF8), so Jeff suggested that to make it more clear that cifs_strndup is doing a conversion not just memory allocation and copy, rename the function to including "from_ucs" (ie Unicode) Signed-off-by: Steve French <sfrench@us.ibm.com>
| * Added loop check when mounting DFS tree.Igor Mammedov2009-04-301-0/+13
| | | | | | | | | | | | | | | | | | Added loop check when mounting DFS tree. mount will fail with ELOOP if referral walks exceed MAX_NESTED_LINK count. Signed-off-by: Igor Mammedov <niallain@gmail.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * Enable dfs submounts to handle remote referrals.Igor Mammedov2009-04-301-18/+14
| | | | | | | | | | | | | | | | | | Having remote dfs root support in cifs_mount, we can afford to pass into it UNC that is remote. Signed-off-by: Igor Mammedov <niallain@gmail.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Remove older session setup implementationSteve French2009-04-301-374/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two years ago, when the session setup code in cifs was rewritten and moved to fs/cifs/sess.c, we were asked to keep the old code for a release or so (which could be reenabled at runtime) since it was such a large change and because the asn (SPNEGO) and NTLMSSP code was not rewritten and needed to be. This was useful to avoid regressions, but is long overdue to be removed. Now that the Kerberos (asn/spnego) code is working in fs/cifs/sess.c, and the NTLMSSP code moved (NTLMSSP blob setup be rewritten with the next patch in this series) quite a bit of dead code from fs/cifs/connect.c now can be removed. This old code should have been removed last year, but the earlier krb5 patches did not move/remove the NTLMSSP code which we had asked to be done first. Since no one else volunteered, I am doing it now. It is extremely important that we continue to examine the documentation for this area, to make sure our code continues to be uptodate with changes since Windows 2003. Signed-off-by: Steve French <sfrench@us.ibm.com>
| * cifs: change cifs_get_name_from_search_buf to use new unicode helperJeff Layton2009-04-303-75/+13
| | | | | | | | | | | | | | | | | | | | ...and remove cifs_convertUCSpath. There are no more callers. Also add a #define for the buffer used in the readdir path so that we don't have so many magic numbers floating around. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * cifs: change CIFSSMBUnixQuerySymLink to use new helpersJeff Layton2009-04-303-41/+20
| | | | | | | | | | | | | | | | | | | | Change CIFSSMBUnixQuerySymLink to use the new unicode helper functions. Also change the calling conventions so that the allocation of the target name buffer is done in CIFSSMBUnixQuerySymLink rather than by the caller. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * cifs: fix session setup unicode string saving to use new unicode helpersJeff Layton2009-04-301-58/+22
| | | | | | | | | | | | | | | | | | ...and change decode_unicode_ssetup to be a void function. It never returns an actual error anyway. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * cifs: convert CIFSTCon to use new unicode helper functionsJeff Layton2009-04-301-35/+14
| | | | | | | | | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>