aboutsummaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAge
* ext4: Fix ext4_free_blocks() w/o a journal when files have indirect blocksTheodore Ts'o2009-01-20
| | | | | | | | When trying to unlink a file with indirect blocks on a filesystem without a journal, the "circular indirect block" sanity test was getting falsely triggered. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* ext3: Add sanity check to make_indexed_dirTheodore Ts'o2009-01-16
| | | | | | | | | | | | | | Make sure the rec_len field in the '..' entry is sane, lest we overrun the directory block and cause a kernel oops on a purposefully corrupted filesystem. This fixes a bug related to a bug originally reported by Sami Liedes for ext4 at: http://bugzilla.kernel.org/show_bug.cgi?id=12430 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@kernel.org
* ext4: Add sanity check to make_indexed_dirTheodore Ts'o2009-01-16
| | | | | | | | | | | | | Make sure the rec_len field in the '..' entry is sane, lest we overrun the directory block and cause a kernel oops on a purposefully corrupted filesystem. Thanks to Sami Liedes for reporting this bug. http://bugzilla.kernel.org/show_bug.cgi?id=12430 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@kernel.org
* ext4: only use i_size_high for regular filesTheodore Ts'o2009-01-17
| | | | | | | | | | | | | | | | | | | | | Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intentially corrupted filesystem from causing the kernel to burn a huge amount of CPU and issuing error messages such as: EXT4-fs warning (device loop0): ext4_block_to_path: block 135090028 > max Thanks to David Maciejak from Fortinet's FortiGuard Global Security Research Team for reporting this issue. http://bugzilla.kernel.org/show_bug.cgi?id=12375 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@kernel.org
* ext4: fix wrong use of do_divSimon Holm Thøgersen2009-01-11
| | | | | | | | | | | | | | | | | | the following warning: fs/jbd2/journal.c: In function ‘jbd2_seq_info_show’: fs/jbd2/journal.c:850: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘uint32_t’ is caused by wrong usage of do_div that modifies the dividend in-place and returns the quotient. So not only would an incorrect value be displayed, but s->journal->j_average_commit_time would also be changed to a wrong value! Fix it by using div_u64 instead. Signed-off-by: Simon Holm Thøgersen <odie@cs.aau.dk> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is foundJeff Layton2009-01-27
| | | | | | | | | | | | | | | | | nfsd4_lockt does a search for a lockstateowner when building the lock struct to test. If one is found, it'll set fl_owner to it. Regardless of whether that happens, it'll also set fl_lmops. Given that this lock is basically a "lightweight" lock that's just used for checking conflicts, setting fl_lmops is probably not appropriate for it. This behavior exposed a bug in DLM's GETLK implementation where it wasn't clearing out the fields in the file_lock before filling in conflicting lock info. While we were able to fix this in DLM, it still seems pointless and dangerous to set the fl_lmops this way when we may have a NULL lockstateowner. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@pig.fieldses.org>
* nfsd: fix cred leak on every rpcJ. Bruce Fields2009-01-27
| | | | | | | | | | Since override_creds() took its own reference on new, we need to release our own reference. (Note the put_cred on the return value puts the *old* value of current->creds, not the new passed-in value). Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: fix null dereference on error pathJ. Bruce Fields2009-01-27
| | | | | | We're forgetting to check the return value from groups_alloc(). Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* Merge branch 'for-linus' of ↵Linus Torvalds2009-01-26
|\ | | | | | | | | | | | | | | 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: initialize file_lock struct in GETLK before copying conflicting lock dlm: fix plock notify callback to lockd
| * dlm: initialize file_lock struct in GETLK before copying conflicting lockJeff Layton2009-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dlm_posix_get fills out the relevant fields in the file_lock before returning when there is a lock conflict, but doesn't clean out any of the other fields in the file_lock. When nfsd does a NFSv4 lockt call, it sets the fl_lmops to nfsd_posix_mng_ops before calling the lower fs. When the lock comes back after testing a lock on GFS2, it still has that field set. This confuses nfsd into thinking that the file_lock is a nfsd4 lock. Fix this by making DLM reinitialize the file_lock before copying the fields from the conflicting lock. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
| * dlm: fix plock notify callback to lockdDavid Teigland2009-01-21
| | | | | | | | | | | | | | | | | | We should use the original copy of the file_lock, fl, instead of the copy, flc in the lockd notify callback. The range in flc has been modified by posix_lock_file(), so it will not match a copy of the lock in lockd. Signed-off-by: David Teigland <teigland@redhat.com>
* | Merge branch 'for_linus' of ↵Linus Torvalds2009-01-26
|\ \ | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-quota-2.6: ocfs2: Remove ocfs2_dquot_initialize() and ocfs2_dquot_drop() quota: Improve locking
| * | ocfs2: Remove ocfs2_dquot_initialize() and ocfs2_dquot_drop()Jan Kara2009-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since ->acquire_dquot and ->release_dquot callbacks aren't called under dqptr_sem anymore, we don't have to start a transaction and obtain locks so early. So we can just remove all this complicated stuff. Signed-off-by: Jan Kara <jack@suse.cz> Acked-by: Mark Fasheh <mfasheh@suse.de>
| * | quota: Improve lockingJan Kara2009-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We implement dqget() and dqput() that need neither dqonoff_mutex nor dqptr_sem. Then move dqget() and dqput() calls so that they are not called from under dqptr_sem. This is important because filesystem callbacks aren't called from under dqptr_sem which used to cause *lots* of problems with lock ranking (and with OCFS2 they became close to unsolvable). The patch also removes two functions which were introduced solely because OCFS2 needed them to cope with the old locking scheme. As time showed, they were not enough for OCFS2 anyway and it would be unnecessary work to adapt them to the new locking scheme in which they aren't needed. As a result OCFS2 needs the following patch to compile properly with quotas. Sorry to any bisecters which hit this in advance. Signed-off-by: Jan Kara <jack@suse.cz>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds2009-01-26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: klist.c: bit 0 in pointer can't be used as flag debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n sysfs: fix problems with binary files PNP: fix broken pnp lowercasing for acpi module aliases driver core: Convert '/' to '!' in dev_set_name()
| * | | sysfs: fix problems with binary filesGreg Kroah-Hartman2009-01-20
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some sysfs binary files don't like having 0 passed to them as a size. Fix this up at the root by just returning to the vfs if userspace asks us for a zero sized buffer. Thanks to Pavel Roskin for pointing this out. Reported-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | Merge branch 'Kconfig' of ↵Linus Torvalds2009-01-26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/misc * 'Kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/misc: (36 commits) fs/Kconfig: move 9p out fs/Kconfig: move afs out fs/Kconfig: move coda out fs/Kconfig: move the rest of ncpfs out fs/Kconfig: move smbfs out fs/Kconfig: move sunrpc out fs/Kconfig: move nfsd out fs/Kconfig: move nfs out fs/Kconfig: move ufs out fs/Kconfig: move sysv out fs/Kconfig: move romfs out fs/Kconfig: move qnx4 out fs/Kconfig: move hpfs out fs/Kconfig: move omfs out fs/Kconfig: move minix out fs/Kconfig: move vxfs out fs/Kconfig: move squashfs out fs/Kconfig: move cramfs out fs/Kconfig: move efs out fs/Kconfig: move bfs out ...
| * | | fs/Kconfig: move 9p outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move afs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move coda outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move the rest of ncpfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move smbfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move sunrpc outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move nfsd outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move nfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move ufs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move sysv outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move romfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move qnx4 outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move hpfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move omfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move minix outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move vxfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move squashfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move cramfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move efs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move bfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move befs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move hfs, hfsplus outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move ecryptfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move affs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move adfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move configfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move sysfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move ntfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move fat outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move iso9660, udf outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move fuse outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move autofs, autofs4 outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move btrfs outAlexey Dobriyan2009-01-22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>