summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* [CIFS] Fix compile error when CONFIG_CIFS_EXPERIMENTAL is undefinedSteve French2006-04-241-1/+4
| | | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6-stableLinus Torvalds2006-04-2313-115/+138
|\ | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6-stable: [CIFS] Fix typo in previous [CIFS] Readdir fixes to allow search to start at arbitrary position [CIFS] Use the kthread_ API instead of opencoding lots of hairy code for kernel [CIFS] Don't allow a backslash in a path component [CIFS] [CIFS] Do not take rename sem on most path based calls (during
| * [CIFS] Fix typo in previousSteve French2006-04-231-1/+1
| | | | | | | | Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Readdir fixes to allow search to start at arbitrary positionSteve French2006-04-227-36/+74
| | | | | | | | | | | | | | | | | | in directory Also includes first part of fix to compensate for servers which forget to return . and .. as well as updates to changelog and cifs readme. Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Use the kthread_ API instead of opencoding lots of hairy code for kernelSteve French2006-04-211-49/+50
| | | | | | | | | | | | | | | | | | | | | | | | thread creation and teardown. It does not move the cifsd thread handling to kthread due to problems found in testing with wakeup of threads blocked in the socket peek api, but the other cifs kernel threads now use kthread. Also cleanup cifs_init to properly unwind when thread creation fails. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] Don't allow a backslash in a path componentSteve French2006-04-211-0/+14
| | | | | | | | | | | | | | | | Unless Posix paths have been negotiated, the backslash, "\", is not a valid character in a path component. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
| * [CIFS] [CIFS] Do not take rename sem on most path based calls (duringSteve French2006-04-217-30/+0
| | | | | | | | | | | | | | | | building of full path) to avoid hang rename/readdir hang Reported by Alan Tyson Signed-off-by: Steve French <sfrench@us.ibm.com>
* | [PATCH] Fix reiserfs deadlockJan Kara2006-04-221-2/+3
|/ | | | | | | | | | | | | | reiserfs_cache_default_acl() should return whether we successfully found the acl or not. We have to return correct value even if reiserfs_get_acl() returns error code and not just 0. Otherwise callers such as reiserfs_mkdir() can unnecessarily lock the xattrs and later functions such as reiserfs_new_inode() fail to notice that we have already taken the lock and try to take it again with obvious consequences. Signed-off-by: Jan Kara <jack@suse.cz> Cc: <reiserfs-dev@namesys.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] splice: fix smaller sized splice readsJens Axboe2006-04-201-1/+12
| | | | Signed-off-by: Jens Axboe <axboe@suse.de>
* Merge git://git.linux-nfs.org/pub/linux/nfs-2.6Linus Torvalds2006-04-196-20/+15
|\ | | | | | | | | | | | | | | | | | | | | | | * git://git.linux-nfs.org/pub/linux/nfs-2.6: SUNRPC: Dead code in net/sunrpc/auth_gss/auth_gss.c NFS: remove needless check in nfs_opendir() NFS: nfs_show_stats; for_each_possible_cpu(), not NR_CPUS NFS: make 2 functions static NFS,SUNRPC: Fix compiler warnings if CONFIG_PROC_FS & CONFIG_SYSCTL are unset NFS: fix PROC_FS=n compile error VFS: Fix another open intent Oops RPCSEC_GSS: fix leak in krb5 code caused by superfluous kmalloc
| * NFS: remove needless check in nfs_opendir()Carsten Otte2006-04-191-3/+2
| | | | | | | | | | | | | | | | | | Local variable res was initialized to 0 - no check needed here. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: nfs_show_stats; for_each_possible_cpu(), not NR_CPUSJohn Hawkes2006-04-191-4/+1
| | | | | | | | | | | | | | | | | | Convert a for-loop that explicitly references "NR_CPUS" into the potentially more efficient for_each_possible_cpu() construct. Signed-off-by: John Hawkes <hawkes@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS: make 2 functions staticAdrian Bunk2006-04-191-1/+1
| | | | | | | | | | | | | | Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * NFS,SUNRPC: Fix compiler warnings if CONFIG_PROC_FS & CONFIG_SYSCTL are unsetTrond Myklebust2006-04-192-8/+5
| | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| * VFS: Fix another open intent OopsTrond Myklebust2006-04-191-4/+6
| | | | | | | | | | | | | | If the call to nfs_intent_set_file() fails to open a file in nfs4_proc_create(), we should return an error. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* | Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2006-04-191-58/+127
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block: [PATCH] splice: fixup writeout path after ->map changes [PATCH] splice: offset fixes [PATCH] tee: link_pipe() must be careful when dropping one of the pipe locks [PATCH] splice: cleanup the SPLICE_F_NONBLOCK handling [PATCH] splice: close i_size truncate races on read
| * | [PATCH] splice: fixup writeout path after ->map changesJens Axboe2006-04-191-19/+30
| | | | | | | | | | | | | | | | | | | | | | | | Since ->map() no longer locks the page, we need to adjust the handling of those pages (and stealing) a little. This now passes full regressions again. Signed-off-by: Jens Axboe <axboe@suse.de>
| * | [PATCH] splice: offset fixesJens Axboe2006-04-191-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | - We need to adjust *ppos for writes as well. - Copy back modified offset value if one was passed in, similar to what sendfile does. Signed-off-by: Jens Axboe <axboe@suse.de>
| * | [PATCH] tee: link_pipe() must be careful when dropping one of the pipe locksJens Axboe2006-04-191-4/+14
| | | | | | | | | | | | | | | | | | | | | We need to ensure that we only drop a lock that is ordered last, to avoid ABBA deadlocks with competing processes. Signed-off-by: Jens Axboe <axboe@suse.de>
| * | [PATCH] splice: cleanup the SPLICE_F_NONBLOCK handlingJens Axboe2006-04-191-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | - generic_file_splice_read() more readable and correct - Don't bail on page allocation with NONBLOCK set, just don't allow direct blocking on IO (eg lock_page). Signed-off-by: Jens Axboe <axboe@suse.de>
| * | [PATCH] splice: close i_size truncate races on readJens Axboe2006-04-191-6/+37
| |/ | | | | | | | | | | We need to check i_size after doing a blocking readpage. Signed-off-by: Jens Axboe <axboe@suse.de>
* | [PATCH] Fix file lookup without refDipankar Sarma2006-04-192-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are places in the kernel where we look up files in fd tables and access the file structure without holding refereces to the file. So, we need special care to avoid the race between looking up files in the fd table and tearing down of the file in another CPU. Otherwise, one might see a NULL f_dentry or such torn down version of the file. This patch fixes those special places where such a race may happen. Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com> Acked-by: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] hugetlbfs: add Kconfig help textArthur Othieno2006-04-191-0/+6
| | | | | | | | | | | | | | | | | | | | In kernel bugzilla #6248 (http://bugzilla.kernel.org/show_bug.cgi?id=6248), Adrian Bunk <bunk@stusta.de> notes that CONFIG_HUGETLBFS is missing Kconfig help text. Signed-off-by: Arthur Othieno <apgo@patchbomb.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] task: Make task list manipulations RCU safeEric W. Biederman2006-04-191-1/+1
|/ | | | | | | | | | | | | | | | | While we can currently walk through thread groups, process groups, and sessions with just the rcu_read_lock, this opens the door to walking the entire task list. We already have all of the other RCU guarantees so there is no cost in doing this, this should be enough so that proc can stop taking the tasklist lock during readdir. prev_task was killed because it has no users, and using it will miss new tasks when doing an rcu traversal. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* x86: be careful about tailcall breakage for sys_open[at] tooLinus Torvalds2006-04-181-2/+14
| | | | | | | | | | | | | | Came up through a quick grep for other cases similar to the ftruncate() one in commit 0a489cb3b6a7b277030cdbc97c2c65905db94536. Also, add a comment, so that people who read the code understand why we do what looks like a no-op. (Again, this won't actually matter to any sane user, since libc will save and restore the register gcc stomps on, but it's still wrong to stomp on it) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* x86: don't allow tail-calls in sys_ftruncate[64]()Linus Torvalds2006-04-181-2/+6
| | | | | | | | | | | | | | | | | | | | Gcc thinks it owns the incoming argument stack, but that's not true for "asmlinkage" functions, and it corrupts the caller-set-up argument stack when it pushes the third argument onto the stack. Which can result in %ebx getting corrupted in user space. Now, normally nobody sane would ever notice, since libc will save and restore %ebx anyway over the system call, but it's still wrong. I'd much rather have "asmlinkage" tell gcc directly that it doesn't own the stack, but no such attribute exists, so we're stuck with our hacky manual "prevent_tail_call()" macro once more (we've had the same issue before with sys_waitpid() and sys_wait4()). Thanks to Hans-Werner Hilse <hilse@sub.uni-goettingen.de> for reporting the issue and testing the fix. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] ext3: Fix missed mutex unlockAnaniev, Leonid I2006-04-171-0/+1
| | | | | | | | Missed unlock_super()call is added in error condition code path. Signed-off-by: Leonid Ananiev <leonid.i.ananiev@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Fix block device symlink nameStephen Rothwell2006-04-171-0/+5
| | | | | | | | | | | As noted further on the this file, some block devices have a / in their name, so fix the "block:..." symlink name the same as the /sys/block name. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] BLOCK: delay all uevents until partition table is scannedKay Sievers2006-04-141-8/+30
| | | | | | | | | | | | | | | | | | | | [BLOCK] delay all uevents until partition table is scanned Here we delay the annoucement of all block device events until the disk's partition table is scanned and all partition devices are already created and sysfs is populated. We have a bunch of old bugs for removable storage handling where we probe successfully for a filesystem on the raw disk, but at the same time the kernel recognizes a partition table and creates partition devices. Currently there is no sane way to tell if partitions will show up or not at the time the disk device is announced to userspace. With the delayed events we can simply skip any probe for a filesystem on the raw disk when we find already present partitions. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] sysfs: Allow sysfs attribute files to be pollableNeilBrown2006-04-143-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | It works like this: Open the file Read all the contents. Call poll requesting POLLERR or POLLPRI (so select/exceptfds works) When poll returns, close the file and go to top of loop. or lseek to start of file and go back to the 'read'. Events are signaled by an object manager calling sysfs_notify(kobj, dir, attr); If the dir is non-NULL, it is used to find a subdirectory which contains the attribute (presumably created by sysfs_create_group). This has a cost of one int per attribute, one wait_queuehead per kobject, one int per open file. The name "sysfs_notify" may be confused with the inotify functionality. Maybe it would be nice to support inotify for sysfs attributes as well? This patch also uses sysfs_notify to allow /sys/block/md*/md/sync_action to be pollable Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'for-linus' of ↵Linus Torvalds2006-04-144-41/+65
|\ | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/mszeredi/fuse * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/mszeredi/fuse: [fuse] Direct I/O should not use fuse_reset_request [fuse] Don't init request twice [fuse] Fix accounting the number of waiting requests [fuse] fix deadlock between fuse_put_super() and request_end()
| * [fuse] Direct I/O should not use fuse_reset_requestMiklos Szeredi2006-04-111-3/+7
| | | | | | | | | | | | | | It's cleaner to allocate a new request, otherwise the uid/gid/pid fields of the request won't be filled in. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
| * [fuse] Don't init request twiceMiklos Szeredi2006-04-111-1/+0
| | | | | | | | | | | | | | Request is already initialized in fuse_request_alloc() so no need to do it again in fuse_get_req(). Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
| * [fuse] Fix accounting the number of waiting requestsMiklos Szeredi2006-04-112-6/+22
| | | | | | | | | | | | | | Properly accounting the number of waiting requests was forgotten in "clean up request accounting" patch. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
| * [fuse] fix deadlock between fuse_put_super() and request_end()Miklos Szeredi2006-04-113-31/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A deadlock was possible, when the last reference to the superblock was held due to a background request containing a file reference. Releasing the file would release the vfsmount which in turn would release the superblock. Since sbput_sem is held during the fput() and fuse_put_super() tries to acquire this same semaphore, a deadlock results. The chosen soltuion is to get rid of sbput_sem, and instead use the spinlock to ensure the referenced inodes/file are released only once. Since the actual release may sleep, defer these outside the locked region, but using local variables instead of the structure members. This is a much more rubust solution. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
* | Merge branch 'tee' of git://brick.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2006-04-146-60/+261
|\ \ | | | | | | | | | | | | | | | * 'tee' of git://brick.kernel.dk/data/git/linux-2.6-block: [PATCH] splice: add support for sys_tee() [PATCH] splice: pass offset around for ->splice_read() and ->splice_write()
| * | [PATCH] splice: add support for sys_tee()Jens Axboe2006-04-112-0/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically an in-kernel implementation of tee, which uses splice and the pipe buffers as an intelligent way to pass data around by reference. Where the user space tee consumes the input and produces a stdout and file output, this syscall merely duplicates the data inside a pipe to another pipe. No data is copied, the output just grabs a reference to the input pipe data. Signed-off-by: Jens Axboe <axboe@suse.de>
| * | [PATCH] splice: pass offset around for ->splice_read() and ->splice_write()Jens Axboe2006-04-115-60/+68
| |/ | | | | | | | | | | | | | | We need not use ->f_pos as the offset for the file input/output. If the user passed an offset pointer in through sys_splice(), just use that and leave ->f_pos alone. Signed-off-by: Jens Axboe <axboe@suse.de>
* / [PATCH] de_thread: Don't change our parents and ptrace flags.Eric W. Biederman2006-04-141-27/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is two distinct changes. - Not changing our real parents. - Not changing our ptrace parents. Not changing our real parents is trivially correct because both tasks have the same real parents as they are part of a thread group. Now that we demote the leader to a thread there is no longer any reason to change it's parentage. Not changing our ptrace parents is a user visible change if someone looks hard enough. I don't think user space applications will care or even notice. In the practical and I think common case a debugger will have attached to all of the threads using the same ptrace flags. From my quick skim of strace and gdb that appears to be the case. Which if true means debuggers will not notice a change. Before this point we have already generated a ptrace event in do_exit that reports the leaders pid has died so de_thread is visible to a debugger. Which means attempting to hide this case by copying flags around appears excessive. By not doing anything it avoids all of the weird locking issues between de_thread and ptrace attach, and removes one case from consideration for fixing the ptrace locking. This only addresses Oleg's first concern with ptrace_attach, that of the problems caused by reparenting. Oleg's second concern is essentially a race between ptrace_attach and release_task that causes an oops when we get to force_sig_specific. There is nothing special about de_thread with respect to that race. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2006-04-118-334/+555
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block: [PATCH] vfs: add splice_write and splice_read to documentation [PATCH] Remove sys_ prefix of new syscalls from __NR_sys_* [PATCH] splice: warning fix [PATCH] another round of fs/pipe.c cleanups [PATCH] splice: comment styles [PATCH] splice: add Ingo as addition copyright holder [PATCH] splice: unlikely() optimizations [PATCH] splice: speedups and optimizations [PATCH] pipe.c/fifo.c code cleanups [PATCH] get rid of the PIPE_*() macros [PATCH] splice: speedup __generic_file_splice_read [PATCH] splice: add direct fd <-> fd splicing support [PATCH] splice: add optional input and output offsets [PATCH] introduce a "kernel-internal pipe object" abstraction [PATCH] splice: be smarter about calling do_page_cache_readahead() [PATCH] splice: optimize the splice buffer mapping [PATCH] splice: cleanup __generic_file_splice_read() [PATCH] splice: only call wake_up_interruptible() when we really have to [PATCH] splice: potential !page dereference [PATCH] splice: mark the io page as accessed
| * [PATCH] another round of fs/pipe.c cleanupsIngo Molnar2006-04-111-28/+48
| | | | | | | | | | | | | | make pipe.c a bit more readable and hackable. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: comment stylesIngo Molnar2006-04-111-11/+12
| | | | | | | | | | | | | | | | | | - capitalize consistently - end sentences in one way or another - update comment text to match the implementation Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: add Ingo as addition copyright holderJens Axboe2006-04-111-4/+5
| | | | | | | | | | | | The comment is also somewhat out of date, correct that as well. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: unlikely() optimizationsJens Axboe2006-04-112-9/+8
| | | | | | | | | | | | | | Also corrects a few comments. Patch mainly from Ingo, changes by me. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: speedups and optimizationsJens Axboe2006-04-111-20/+13
| | | | | | | | | | | | | | | | | | | | | | - Kill the local variables that cache ->nrbufs, they just take up space. - Only set do_wakeup for a real pipe. This is a big win for direct splicing. - Kill i_mutex lock around ->f_pos update, regular io paths don't do this either. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] pipe.c/fifo.c code cleanupsIngo Molnar2006-04-112-101/+111
| | | | | | | | | | | | | | | | | | | | more code cleanups after the macro conversion: - standardize on 'struct pipe_inode_info *pipe' variable names - introduce 'pipe' temporaries to reduce mass inode->i_pipe dereferencing Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] get rid of the PIPE_*() macrosIngo Molnar2006-04-112-76/+76
| | | | | | | | | | | | | | get rid of the PIPE_*() macros. Scripted transformation. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: speedup __generic_file_splice_readJens Axboe2006-04-111-11/+63
| | | | | | | | | | | | | | Using find_get_page() is a lot faster than find_or_create_page(). This gets splice a lot closer to sendfile() for fd -> socket transfers. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: add direct fd <-> fd splicing supportJens Axboe2006-04-112-21/+137
| | | | | | | | | | | | | | | | | | | | | | | | It's more efficient for sendfile() emulation. Basically we cache an internal private pipe and just use that as the intermediate area for pages. Direct splicing is not available from sys_splice(), it is only meant to be used for sendfile() emulation. Additional patch from Ingo Molnar to avoid the PIPE_BUFFERS loop at exit for the normal fast path. Signed-off-by: Jens Axboe <axboe@suse.de>
| * [PATCH] splice: add optional input and output offsetsIngo Molnar2006-04-101-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add optional input and output offsets to sys_splice(), for seekable file descriptors: asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, int fd_out, loff_t __user *off_out, size_t len, unsigned int flags); semantics are straightforward: f_pos will be updated with the offset provided by user-space, before the splice transfer is about to begin. Providing a NULL offset pointer means the existing f_pos will be used (and updated in situ). Providing an offset for a pipe results in -ESPIPE. Providing an invalid offset pointer results in -EFAULT. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jens Axboe <axboe@suse.de>