aboutsummaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | fuse: fix poll notifyMiklos Szeredi2009-01-261-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move fuse_copy_finish() to before calling fuse_notify_poll_wakeup(). This is not a big issue because fuse_notify_poll_wakeup() should be atomic, but it's cleaner this way, and later uses of notification will need to be able to finish the copying before performing some actions. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
| * | | fuse: destroy bdi on umountMiklos Szeredi2009-01-262-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a fuse filesystem is unmounted but the device file descriptor remains open and a new mount reuses the old device number, then the mount fails with EEXIST and the following warning is printed in the kernel log: WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x35/0x3d() sysfs: duplicate filename '0:15' can not be created The cause is that the bdi belonging to the fuse filesystem was destoryed only after the device file was released. Fix this by calling bdi_destroy() from fuse_put_super() instead. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> CC: stable@kernel.org
| * | | fuse: fuse_fill_super error handling cleanupMiklos Szeredi2009-01-261-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | Clean up error handling for the whole of fuse_fill_super() function. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
| * | | fuse: fix missing fput on errorMiklos Szeredi2009-01-261-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the leaking file reference if allocation or initialization of fuse_conn failed. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> CC: stable@kernel.org
| * | | fuse: fix NULL deref in fuse_file_alloc()Dan Carpenter2009-01-261-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | ff is set to NULL and then dereferenced on line 65. Compile tested only. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> CC: stable@kernel.org
* | | Long btree pointers are still 64 bit on diskDave Chinner2009-01-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [XFS] Long btree pointers are still 64 bit on disk On 32 bit machines with CONFIG_LBD=n, XFS reduces the in memory size of xfs_fsblock_t to 32 bits so that it will fit within 32 bit addressing. However, the disk format for long btree pointers are still 64 bits in size. The recent btree rewrite failed to take this into account when initialising new btree blocks, setting sibling pointers to NULL and checking if they are NULL. Hence checking whether a 64 bit NULL was the same as a 32 bit NULL was failingi resulting in NULL sibling pointers failing to be detected correctly. This showed up as WANT_CORRUPTED_GOTO shutdowns in xfs_btree_delrec. Fix this by making all the comparisons and setting of long pointer btree NULL blocks to the disk format, not the in memory format. i.e. use NULLDFSBNO. Reported-by: Alexander Beregalov <a.beregalov@gmail.com> Reported-by: Jacek Luczak <difrost.kernel@gmail.com> Reported-by: Danny ter Haar <dth@dth.net> Tested-by: Jacek Luczak <difrost.kernel@gmail.com> Reviewed-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Felix Blyakher <felixb@sgi.com>
* | | [XFS] Remove the rest of the macro-to-function indirections.Eric Sandeen2009-01-1923-158/+142
| | | | | | | | | | | | | | | | | | | | | | | | Remove the last of the macros-defined-to-static-functions. Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
* | | xfs: sanity check attr fork sizeChristoph Hellwig2009-01-191-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently we have quite a few kerneloops reports about dereferencing a NULL if_data in the attribute fork. From looking over the code this can only happen if we pass a 0 size argument to xfs_iformat_local. This implies some sort of corruption and in fact the only mailinglist report about this from earlier this year was after a powerfail presumably on a system with write cache and without barriers. Add a quick sanity check for the attr fork size in xfs_iformat to catch these early and without an oops. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
* | | xfs: fix bad_features2 fixups for the root filesystemChristoph Hellwig2009-01-193-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the bad_features2 fixup and the alignment updates in the superblock are skipped if we mount a filesystem read-only. But for the root filesystem the typical case is to mount read-only first and only later remount writeable so we'll never perform this update at all. It's not a big problem but means the logs of people needing the fixup get spammed at every boot because they never happen on disk. Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
* | | xfs: add a lock class for group/project dquotsChristoph Hellwig2009-01-191-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can have both a user and a group/project dquot locked at the same time, as long as the user dquot is locked first. Tell lockdep about that fact by making the group/project dquots a different lock class. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
* | | xfs: lockdep annotations for xfs_dqlock2Christoph Hellwig2009-01-192-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | xfs_dqlock2 locks two xfs_dquots, which is fine as it always locks the dquot with the lower id first. Use mutex_lock_nested to tell lockdep about this fact. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
* | | xfs: add a separate lock class for the per-mount list of dquotsChristoph Hellwig2009-01-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can have both a a quota hash chain and the per-mount list locked at the same time. But given that both use the same struct dqhash as list head we have to tell lockdep that they are different lock classes. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
* | | xfs: use mnt_want_write in compat_attrmulti ioctlChristoph Hellwig2009-01-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | The compat version of the attrmulti ioctl needs to ask for and then later release write access to the mount just like the native version, otherwise we could potentially write to read-only mounts. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
* | | xfs: fix dentry aliasing issues in open_by_handleChristoph Hellwig2009-01-194-300/+196
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Open by handle just grabs an inode by handle and then creates itself a dentry for it. While this works for regular files it is horribly broken for directories, where the VFS locking relies on the fact that there is only just one single dentry for a given inode, and that these are always connected to the root of the filesystem so that it's locking algorithms work (see Documentations/filesystems/Locking) Remove all the existing open by handle code and replace it with a small wrapper around the exportfs code which deals with all these issues. At the same time we also make the checks for a valid handle strict enough to reject all not perfectly well formed handles - given that we never hand out others that's okay and simplifies the code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstableLinus Torvalds2009-01-163-7/+11
|\ \ | |/ |/| | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: fix ioctl arg size (userland incompatible change!) Btrfs: Clear the device->running_pending flag before bailing on congestion
| * Btrfs: fix ioctl arg size (userland incompatible change!)Chris Mason2009-01-162-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The structure used to send device in btrfs ioctl calls was not properly aligned, and so 32 bit ioctls would not work properly on 64 bit kernels. We could fix this with compat ioctls, but we're just one byte away and it doesn't make sense at this stage to carry about the compat ioctls forever at this stage in the project. This patch brings the ioctl arg up to an evenly aligned 4k. Signed-off-by: Chris Mason <chris.mason@oracle.com>
| * Btrfs: Clear the device->running_pending flag before bailing on congestionChris Mason2009-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Btrfs maintains a queue of async bio submissions so the checksumming threads don't have to wait on get_request_wait. In order to avoid extra wakeups, this code has a running_pending flag that is used to tell new submissions they don't need to wake the thread. When the threads notice congestion on a single device, they may decide to requeue the job and move on to other devices. This makes sure the running_pending flag is cleared before the job is requeued. It should help avoid IO stalls by making sure the task is woken up when new submissions come in. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* | ext2: also update the inode on disk when dir is IS_DIRSYNCJan Kara2009-01-151-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | We used to just write changed page for IS_DIRSYNC inodes. But we also have to update the directory inode itself just for the case that we've allocated a new block and changed i_size. [akpm@linux-foundation.org: still sync the data page] Signed-off-by: Jan Kara <jack@suse.cz> Tested-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | btrfs & squashfs: Move btrfs and squashfsto's magic number to <linux/magic.h>Qinghuang Feng2009-01-153-2/+2
| | | | | | | | | | | | | | | | | | | | Use the standard magic.h for btrfs and squashfs. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> Cc: Phillip Lougher <phillip@lougher.demon.co.uk> Cc: Chris Mason <chris.mason@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'syscalls' of git://git390.osdl.marist.edu/pub/scm/linux-2.6Linus Torvalds2009-01-1431-214/+276
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'syscalls' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (44 commits) [CVE-2009-0029] s390 specific system call wrappers [CVE-2009-0029] System call wrappers part 33 [CVE-2009-0029] System call wrappers part 32 [CVE-2009-0029] System call wrappers part 31 [CVE-2009-0029] System call wrappers part 30 [CVE-2009-0029] System call wrappers part 29 [CVE-2009-0029] System call wrappers part 28 [CVE-2009-0029] System call wrappers part 27 [CVE-2009-0029] System call wrappers part 26 [CVE-2009-0029] System call wrappers part 25 [CVE-2009-0029] System call wrappers part 24 [CVE-2009-0029] System call wrappers part 23 [CVE-2009-0029] System call wrappers part 22 [CVE-2009-0029] System call wrappers part 21 [CVE-2009-0029] System call wrappers part 20 [CVE-2009-0029] System call wrappers part 19 [CVE-2009-0029] System call wrappers part 18 [CVE-2009-0029] System call wrappers part 17 [CVE-2009-0029] System call wrappers part 16 [CVE-2009-0029] System call wrappers part 15 ...
| * | [CVE-2009-0029] System call wrappers part 33Heiko Carstens2009-01-141-1/+1
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 32Heiko Carstens2009-01-145-11/+12
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 31Heiko Carstens2009-01-143-14/+14
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 30Heiko Carstens2009-01-143-15/+16
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 29Heiko Carstens2009-01-142-13/+13
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 28Heiko Carstens2009-01-142-5/+4
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 27Heiko Carstens2009-01-143-4/+4
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 23Heiko Carstens2009-01-142-13/+13
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 21Heiko Carstens2009-01-141-2/+4
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 20Heiko Carstens2009-01-145-12/+14
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 19Heiko Carstens2009-01-142-6/+7
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 17Heiko Carstens2009-01-141-9/+7
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 16Heiko Carstens2009-01-145-17/+17
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 15Heiko Carstens2009-01-144-9/+10
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 14Heiko Carstens2009-01-143-7/+7
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 13Heiko Carstens2009-01-141-4/+3
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 12Heiko Carstens2009-01-141-25/+21
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 11Heiko Carstens2009-01-143-10/+14
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 10Heiko Carstens2009-01-144-14/+11
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrappers part 09Heiko Carstens2009-01-141-3/+3
| | | | | | | | | | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] System call wrapper special casesHeiko Carstens2009-01-144-13/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | System calls with an unsigned long long argument can't be converted with the standard wrappers since that would include a cast to long, which in turn means that we would lose the upper 32 bit on 32 bit architectures. Also semctl can't use the standard wrapper since it has a 'union' parameter. So we handle them as special case and add some extra wrappers instead. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] Make sys_pselect7 staticHeiko Carstens2009-01-142-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Not a single architecture has wired up sys_pselect7 plus it is the only system call with seven parameters. Just make it static and rename it to do_pselect which will do the work for sys_pselect6. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2Heiko Carstens2009-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove __attribute__((weak)) from common code sys_pipe implemantation. IA64, ALPHA, SUPERH (32bit) and SPARC (32bit) have own implemantations with the same name. Just rename them. For sys_pipe2 there is no architecture specific implementation. Cc: Richard Henderson <rth@twiddle.net> Cc: David S. Miller <davem@davemloft.net> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] Rename old_readdir to sys_old_readdirHeiko Carstens2009-01-141-1/+1
| | | | | | | | | | | | | | | | | | This way it matches the generic system call name convention. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
| * | [CVE-2009-0029] Convert all system calls to return a longHeiko Carstens2009-01-142-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Convert all system calls to return a long. This should be a NOP since all converted types should have the same size anyway. With the exception of sys_exit_group which returned void. But that doesn't matter since the system call doesn't return. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into ↵Lachlan McIlroy2009-01-14154-2025/+49038
|\ \ \ | |/ / | | | | | | for-linus
| * | Fix timeouts in sys_pselect7Bernd Schmidt2009-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we (Analog Devices) updated our Blackfin kernel to 2.6.28, we've seen occasional 5-second hangs from telnet. telnetd calls select with a NULL timeout, but with the new kernel, the system call occasionally returns 0, which causes telnet to call sleep (5). This did not happen with earlier kernels. The code in sys_pselect7 looks a bit strange, in particular the variable "to" is initialized to NULL, then changed if a non-null timeout was passed in, but not used further. It needs to be passed to core_sys_select instead of &end_time. This bug was introduced by 8ff3e8e85fa6c312051134b3953e397feb639f51 ("select: switch select() and poll() over to hrtimers"). Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com> Reviewed-by: Ulrich Drepper <drepper@redhat.com> Tested-by: Robin Getz <rgetz@blackfin.uclinux.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | Merge branch 'for-linus' of ↵Linus Torvalds2009-01-125-379/+357
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm: dlm: change rsbtbl rwlock to spinlock dlm: fix seq_file usage in debugfs lock dump
| | * | dlm: change rsbtbl rwlock to spinlockDavid Teigland2009-01-085-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The rwlock is almost always used in write mode, so there's no reason to not use a spinlock instead. Signed-off-by: David Teigland <teigland@redhat.com>
| | * | dlm: fix seq_file usage in debugfs lock dumpDavid Teigland2009-01-081-359/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code would leak iterators and leave reference counts on rsbs because it was ignoring the "stop" seq callback. The code followed an example that used the seq operations differently. This new code is based on actually understanding how the seq operations work. It also improves things by saving the hash bucket in the position to avoid cycling through completed buckets in start. Siged-off-by: Davd Teigland <teigland@redhat.com>