summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus' of ↵Linus Torvalds2009-01-261-2/+4
|\ | | | | | | | | | | | | | | 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-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-211-2/+2
| | | | | | | | | | | | | | | | | | 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-262-263/+124
|\ \ | | | | | | | | | | | | | | | | | | | | | 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-211-167/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-161-96/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-261-0/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-201-0/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2639-1363/+1284
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-222-11/+11
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move afs outAlexey Dobriyan2009-01-222-22/+22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move coda outAlexey Dobriyan2009-01-222-22/+22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move the rest of ncpfs outAlexey Dobriyan2009-01-222-22/+21
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move smbfs outAlexey Dobriyan2009-01-222-57/+56
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move sunrpc outAlexey Dobriyan2009-01-221-79/+1
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move nfsd outAlexey Dobriyan2009-01-222-81/+81
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move nfs outAlexey Dobriyan2009-01-222-86/+87
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move ufs outAlexey Dobriyan2009-01-222-44/+44
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move sysv outAlexey Dobriyan2009-01-222-38/+37
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move romfs outAlexey Dobriyan2009-01-222-18/+17
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move qnx4 outAlexey Dobriyan2009-01-222-26/+26
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move hpfs outAlexey Dobriyan2009-01-222-16/+15
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move omfs outAlexey Dobriyan2009-01-222-14/+14
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move minix outAlexey Dobriyan2009-01-222-18/+18
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move vxfs outAlexey Dobriyan2009-01-222-17/+17
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move squashfs outAlexey Dobriyan2009-01-222-52/+52
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move cramfs outAlexey Dobriyan2009-01-222-20/+20
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move efs outAlexey Dobriyan2009-01-222-16/+15
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move bfs outAlexey Dobriyan2009-01-222-22/+20
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move befs outAlexey Dobriyan2009-01-222-27/+27
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move hfs, hfsplus outAlexey Dobriyan2009-01-223-27/+27
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move ecryptfs outAlexey Dobriyan2009-01-222-12/+12
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move affs outAlexey Dobriyan2009-01-222-22/+22
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move adfs outAlexey Dobriyan2009-01-222-27/+28
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move configfs outAlexey Dobriyan2009-01-222-11/+12
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move sysfs outAlexey Dobriyan2009-01-222-24/+24
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move ntfs outAlexey Dobriyan2009-01-222-79/+79
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move fat outAlexey Dobriyan2009-01-222-97/+98
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move iso9660, udf outAlexey Dobriyan2009-01-223-58/+59
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move fuse outAlexey Dobriyan2009-01-222-16/+16
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move autofs, autofs4 outAlexey Dobriyan2009-01-223-42/+43
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move btrfs outAlexey Dobriyan2009-01-222-19/+19
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move ocfs2 outAlexey Dobriyan2009-01-222-86/+86
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move jfs outAlexey Dobriyan2009-01-222-50/+50
| | | | | | | | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
| * | | fs/Kconfig: move reiserfs outAlexey Dobriyan2009-01-222-85/+86
| |/ / | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
* | | inotify: clean up inotify_read and fix locking problemsVegard Nossum2009-01-261-61/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If userspace supplies an invalid pointer to a read() of an inotify instance, the inotify device's event list mutex is unlocked twice. This causes an unbalance which effectively leaves the data structure unprotected, and we can trigger oopses by accessing the inotify instance from different tasks concurrently. The best fix (contributed largely by Linus) is a total rewrite of the function in question: On Thu, Jan 22, 2009 at 7:05 AM, Linus Torvalds wrote: > The thing to notice is that: > > - locking is done in just one place, and there is no question about it > not having an unlock. > > - that whole double-while(1)-loop thing is gone. > > - use multiple functions to make nesting and error handling sane > > - do error testing after doing the things you always need to do, ie do > this: > > mutex_lock(..) > ret = function_call(); > mutex_unlock(..) > > .. test ret here .. > > instead of doing conditional exits with unlocking or freeing. > > So if the code is written in this way, it may still be buggy, but at least > it's not buggy because of subtle "forgot to unlock" or "forgot to free" > issues. > > This _always_ unlocks if it locked, and it always frees if it got a > non-error kevent. Cc: John McCutchan <ttb@tentacle.dhs.org> Cc: Robert Love <rlove@google.com> Cc: <stable@kernel.org> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Merge branch 'for-linus' of ↵Linus Torvalds2009-01-263-18/+30
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix poll notify fuse: destroy bdi on umount fuse: fuse_fill_super error handling cleanup fuse: fix missing fput on error fuse: fix NULL deref in fuse_file_alloc()
| * | | 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>