aboutsummaryrefslogtreecommitdiffstats
path: root/fs
AgeCommit message (Collapse)AuthorFilesLines
2005-11-10[CIFS] Fix spaces in cifs kconfig entrySteve French1-3/+2
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-10[CIFS] Reduce sparse endian warningsSteve French1-2/+3
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-10[CIFS] Update CIFS change logSteve French2-1/+38
Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-10[CIFS] Reserve upcall IDX value for CIFS with connector header and addSteve French2-0/+13
Kconfig option for CIFS upcall. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-09(no commit message)Steve French1-3/+8
2005-11-09Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.gitSteve French322-15560/+12084
2005-11-09Merge branch 'for-linus' of ↵Linus Torvalds1-0/+3
git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6
2005-11-09[PATCH] fs/hugetlbfs/inode.c: make a function staticAdrian Bunk1-1/+1
This patch makes a needlessly global function static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: William Irwin <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] fs/namei.c: make path_lookup_create() staticAdrian Bunk1-2/+3
This patch makes the needlessly global function path_lookup_create() static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] fbdev: move ioctl32 code to fbmem.cArnd Bergmann1-143/+0
The frame buffer layer already had some code dealing with compat ioctls, this patch moves over the remaining code from fs/compat_ioctl.c Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] re-add TIOCSTART and TIOCSTOP compat_ioctl handlersChristoph Hellwig1-0/+10
We don't implement these ioctls, but some architectures define them in the headers. Bash picks them up and issues them frequently. Add compat_ioctl handlers to silence warnings about unhandled copat ioctls. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] sanitize lookup_hash prototypeChristoph Hellwig1-10/+10
->permission and ->lookup have a struct nameidata * argument these days to pass down lookup intents. Unfortunately some callers of lookup_hash don't actually pass this one down. For lookup_one_len() we don't have a struct nameidata to pass down, but as this function is a library function only used by filesystem code this is an acceptable limitation. All other callers should pass down the nameidata, so this patch changes the lookup_hash interface to only take a struct nameidata argument and derives the other two arguments to __lookup_hash from it. All callers already have the nameidata argument available so this is not a problem. At the same time I'd like to deprecate the lookup_hash interface as there are better exported interfaces for filesystem usage. Before it can actually be removed I need to fix up rpc_pipefs. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Ram Pai <linuxram@us.ibm.com> Cc: Jeff Mahoney <jeffm@suse.com> Cc: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] add a file_permission helperChristoph Hellwig6-19/+41
A few more callers of permission() just want to check for a different access pattern on an already open file. This patch adds a wrapper for permission() that takes a file in preparation of per-mount read-only support and to clean up the callers a little. The helper is not intended for new code, everything without the interface set in stone should use vfs_permission() Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] add a vfs_permission helperChristoph Hellwig5-14/+29
Most permission() calls have a struct nameidata * available. This helper takes that as an argument and thus makes sure we pass it down for lookup intents and prepares for per-mount read-only support where we need a struct vfsmount for checking whether a file is writeable. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] ext2: remove the ancient CHANGES fileAdrian Bunk1-157/+0
This patch removes an ancient changelog file. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] remove CONFIG_EXT{2,3}_CHECKAdrian Bunk6-258/+2
The CONFIG_EXT{2,3}_CHECK options where were never available, and all they did was to implement a subset of e2fsck in the kernel. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] Fix return value in reiserfs allocatorJan Kara1-2/+2
Make reiserfs correctly return EDQUOT when the allocation failed due to quotas (so far we just returned ENOSPC). Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] fat: respect silent mount flagChristoph Hellwig1-4/+7
Pass down the silent flag to parse_options(). Without this fat gives warnings when mounting some non-fat rootfs with options. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] hpfs: remove spurious mtime updateChristoph Hellwig1-5/+2
Remove mtime update in hpfs_file_write, it's done in generic_file_write already. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reasonOlaf Hering15-20/+1
This patch removes almost all inclusions of linux/version.h. The 3 #defines are unused in most of the touched files. A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is unfortunatly in linux/version.h. There are also lots of #ifdef for long obsolete kernels, this was not touched. In a few places, the linux/version.h include was move to where the LINUX_VERSION_CODE was used. quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'` search pattern: /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-08[PATCH] fix de_thread() vs send_group_sigqueue() raceOleg Nesterov1-3/+7
When non-leader thread does exec, de_thread calls release_task(leader) before calling exit_itimers(). If local timer interrupt happens in between, it can oops in send_group_sigqueue() while taking ->sighand->siglock == NULL. However, we can't change send_group_sigqueue() to check p->signal != NULL, because sys_timer_create() does get_task_struct() only in SIGEV_THREAD_ID case. So it is possible that this task_struct was already freed and we can't trust p->signal. This patch changes de_thread() so that leader released after exit_itimers() call. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-mergeLinus Torvalds1-22/+35
2005-11-07[PATCH] unbindable mountsRam Pai3-26/+65
An unbindable mount does not forward or receive propagation. Also unbindable mount disallows bind mounts. The semantics is as follows. Bind semantics: It is invalid to bind mount an unbindable mount. Move semantics: It is invalid to move an unbindable mount under shared mount. Clone-namespace semantics: If a mount is unbindable in the parent namespace, the corresponding cloned mount in the child namespace becomes unbindable too. Note: there is subtle difference, unbindable mounts cannot be bind mounted but can be cloned during clone-namespace. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] handling of slave mountsRam Pai2-37/+121
This makes bind, rbind, move, clone namespace and umount operations aware of the semantics of slave mount (see Documentation/sharedsubtree.txt in the last patch of the series for detailed description). Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] introduce slave mountsRam Pai3-4/+56
A slave mount always has a master mount from which it receives mount/umount events. Unlike shared mount the event propagation does not flow from the slave mount to the master. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] shared mounts handling: umountRam Pai3-19/+126
An unmount of a mount creates a umount event on the parent. If the parent is a shared mount, it gets propagated to all mounts in the peer group. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] shared mounts handling: moveRam Pai1-17/+46
Implement handling of mount --move in presense of shared mounts (see Documentation/sharedsubtree.txt in the end of patch series for detailed description). Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] shared mount handling: bind and rbindRam Pai3-22/+199
Implement handling of MS_BIND in presense of shared mounts (see Documentation/sharedsubtree.txt in the end of patch series for detailed description). Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] introduce shared mountsRam Pai3-2/+18
This creates shared mounts. A shared mount when bind-mounted to some mountpoint, propagates mount/umount events to each other. All the shared mounts that propagate events to each other belong to the same peer-group. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] beginning of the shared-subtree properRam Pai4-1/+56
A private mount does not forward or receive propagation. This patch provides user the ability to convert any mount to private. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] making namespace_sem globalRam Pai1-23/+23
This removes the per-namespace semaphore in favor of a global semaphore. This can have an effect on namespace scalability. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] mount expiry fixesRam Pai1-42/+22
- clean up the ugliness in may_umount_tree() - fix a bug in do_loopback(). after cloning a tree, do_loopback() unlinks only the topmost mount of the cloned tree, leaving behind the children mounts on their corresponding expiry list. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] umount_tree() locking changeRam Pai1-33/+51
umount is done under the protection of the namespace semaphore. This can lead to intresting deadlocks when the last reference to a mount is released, if filesystem code is in sufficiently nasty state. This collects all the to-be-released-mounts and releases them after releasing the namespace semaphore. That both reduces the time we are holding namespace semaphore and gets the things more robust. Idea proposed by Al Viro. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] sanitize the interface of graft_tree().Ram Pai1-6/+6
Old semantics: graft_tree() grabs a reference on the vfsmount before returning success. New one: graft_tree() leaves that to caller. All the callers of graft_tree() immediately dropped that reference anyway. Changing the interface takes care of this unnecessary overhead. Idea proposed by Al Viro. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] lindent fs/namespace.cRam Pai1-49/+48
Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] make /proc/mounts pollableAl Viro2-16/+76
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] allow callers of seq_open do allocation themselvesAl Viro1-4/+8
Allow caller of seq_open() to kmalloc() seq_file + whatever else they want and set ->private_data to it. seq_open() will then abstain from doing allocation itself. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] cleanups and bug fix in do_loopback()Al Viro1-19/+22
- check_mnt() on the source of binding should've been unconditional from the very beginning. My fault - as far I could've trace it, that's an old thinko made back in 2001. Kudos to Miklos for spotting it... Fixed. - code cleaned up. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] saner handling of auto_acct_off() and DQUOT_OFF() in umountAl Viro3-39/+44
The way we currently deal with quota and process accounting that might keep vfsmount busy at umount time is inherently broken; we try to turn them off just in case (not quite correctly, at that) and a) pray umount doesn't fail (otherwise they'll stay turned off) b) pray nobody doesn anything funny just as we turn quota off Moreover, LSM provides hooks for doing the same sort of broken logics. The proper way to deal with that is to introduce the second kind of reference to vfsmount. Semantics: - when the last normal reference is dropped, all special ones are converted to normal ones and if there had been any, cleanup is done. - normal reference can be cloned into a special one - special reference can be converted to normal one; that's a no-op if we'd already passed the point of no return (i.e. mntput() had converted special references to normal and started cleanup). The way it works: e.g. starting process accounting converts the vfsmount reference pinned by the opened file into special one and turns it back to normal when it gets shut down; acct_auto_close() is done when no normal references are left. That way it does *not* obstruct umount(2) and it silently gets turned off when the last normal reference to vfsmount is gone. Which is exactly what we want... The same should be done by LSM module that holds some internal references to vfsmount and wants to shut them down on umount - it should make them special and security_sb_umount_close() will be called exactly when the last normal reference to vfsmount is gone. quota handling is even simpler - we don't use normal file IO anymore, so there's no need to hold vfsmounts at all. DQUOT_OFF() is done from deactivate_super(), where it really belongs. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-08[PATCH] ppc64: SMU partition recoveryBenjamin Herrenschmidt1-22/+35
This patch adds the ability to the SMU driver to recover missing calibration partitions from the SMU chip itself. It also adds some dynamic mecanism to /proc/device-tree so that new properties are visible to userland. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-07Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6Linus Torvalds37-2138/+4547
Some manual fixups for clashing kfree() cleanups etc.
2005-11-07[PATCH] fs/super.c: unexport user_get_superAdrian Bunk1-2/+0
There's no modular usage in the kernel and modules shouldn't use this symbol. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] kfree cleanup: fsJesper Juhl39-245/+137
This is the fs/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in fs/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] kernel-docs: fix kernel-doc format problemsRandy Dunlap1-2/+3
Convert to proper kernel-doc format. Some have extra blank lines (not allowed immed. after the function name) or need blank lines (after all parameters). Function summary must be only one line. Colon (":") in a function description does weird things (causes kernel-doc to think that it's a new section head sadly). Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] jbd doc: fix some kernel-doc warningsRandy Dunlap1-2/+2
Add structure fields kernel-doc for 2 fields in struct journal_s. Warning(/var/linsrc/linux-2614-rc4//include/linux/jbd.h:808): No description found for parameter 'j_wbuf' Warning(/var/linsrc/linux-2614-rc4//include/linux/jbd.h:808): No description found for parameter 'j_wbufsize' Convert fs/jbd/recovery.c non-static functions to kernel-doc format. fs/jbd/recovery.c doesn't export any symbols, so it should use !I instead of !E to eliminate this warning message: Warning(/var/linsrc/linux-2614-rc4//fs/jbd/recovery.c): no structured comments found Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] knfsd: make sure svc_process call the correct pg_authenticate for ↵NeilBrown1-0/+1
multi-service port If an RPC socket is serving multiple programs, then the pg_authenticate of the first program in the list is called, instead of pg_authenticate for the program to be run. This does not cause a problem with any programs in the current kernel, but could confuse future code. Also set pg_authenticate for nfsd_acl_program incase it ever gets used. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] knfsd: Fix some minor sign problems in nfsd/xdrNeilBrown1-1/+2
There are a couple of tests which could possibly be confused by extremely large numbers appearing in 'xdr' packets. I think the closest to an exploit you could get would be writing random data from a free page into a file - i.e. leak data out of kernel space. I'm fairly sure they cannot be used for remote compromise. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] knfsd: Allow run-time selection of NFS versions to exportNeilBrown2-28/+133
Provide a file in the NFSD filesystem that allows setting and querying of which version of NFS are being exported. Changes are only allowed while no server is running. Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] knfsd: Restore functionality to read from file in /proc/fs/nfsd/NeilBrown1-1/+15
Most files in the nfsd filesystems are transaction files. You write a request, and read a response. For some (e.g. 'threads') it makes sense to just be able to read and get the current value. This functionality did exist but was broken recently when someone modified nfsctl.c without going through the maintainer. This patch fixes the regression. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] knfsd: fix setattr-on-symlink error returnNeilBrown1-1/+8
This is a somewhat cosmetic fix to keep the SpecFS validation test from complaining. SpecFS want's to try chmod on symlinks, and ext3 and reiser (at least) return ENOTSUPP. Probably both sides are being silly, but it is easiest to simply make it a non-issue and filter out chmod requests on symlinks at the nfsd level. Signed-off-by: Olaf Kirch <okir@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] FUSE: pass file handle in setattrMiklos Szeredi1-14/+14
This patch passes the file handle supplied in iattr to userspace, in case the ->setattr() was invoked from sys_ftruncate(). This solves the permission checking (or lack thereof) in ftruncate() for the class of filesystems served by an unprivileged userspace process. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] FUSE: atomic create+openMiklos Szeredi4-48/+211
This patch adds an atomic create+open operation. This does not yet work if the file type changes between lookup and create+open, but solves the permission checking problems for the separte create and open methods. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] FUSE: add access callMiklos Szeredi2-0/+38
Add a new access call, which will only be called if ->permission is invoked from sys_access(). In all other cases permission checking is delayed until the actual filesystem operation. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] VFS: pass file pointer to filesystem from ftruncate()Miklos Szeredi3-5/+9
This patch extends the iattr structure with a file pointer memeber, and adds an ATTR_FILE validity flag for this member. This is set if do_truncate() is invoked from ftruncate() or from do_coredump(). The change is source and binary compatible. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] remove superflous ctime/mtime updates in affsChristoph Hellwig1-17/+1
Both AFFS and HPFS update the ctime and mtime in the write path, after generic_file_write returned and marked the inode dirty. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] afs: use generic_ro_fopsChristoph Hellwig3-32/+1
afs actually had a write method that returned different errors depending on whether some flag was set - better return the standard EINVAL errno. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] vxfs: use generic_ro_fopsChristoph Hellwig1-10/+1
No need to duplicate a generic readonly file ops table in befs. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] befs: use generic_ro_fopsChristoph Hellwig1-7/+1
No need to duplicate a generic readonly file ops table in befs. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] fix remaining missing includesTim Schmielau1-0/+1
Fix more include file problems that surfaced since I submitted the previous fix-missing-includes.patch. This should now allow not to include sched.h from module.h, which is done by a followup patch. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] memory leak in dentry_open()Peter Staubach1-1/+8
There is a memory leak possible in dentry_open(). If get_empty_filp() fails, then the references to dentry and mnt need to be released. The attached patch adds the calls to dput() and mntput() to release these two references. Signed-off-by: Peter Staubach <staubach@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] __find_get_block_slow() cleanupCoywolf Qi Hunt1-3/+3
Get rid of the `int unused' parameter of __find_get_block_slow(). Signed-off-by: Coywolf Qi Hunt <qiyong@fc-cn.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] smbfs: 'names_cache' memory leakDavi Arnaut1-2/+2
Data allocated with "__getname()" should always be free'd with "__putname()" because of the AUDITSYSCALL code. Signed-off-by: Davi Arnaut <davi.arnaut@gmail.com> Cc: Urban Widmark <urban@teststation.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] V9FS: 'names_cache' memory leakDavi Arnaut2-8/+8
Data allocated with "__getname()" should always be free'd with "__putname()" because of the AUDITSYSCALL code. Signed-off-by: Davi Arnaut <davi.arnaut@gmail.com> Cc: <rminnich@lanl.gov> Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] quota: small cleanupsAdrian Bunk2-0/+2
- "extern inline" -> "static inline" - every file should #include the headers containing the prototypes for it's global functions Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] aio: remove aio_max_nr accounting raceZach Brown1-10/+21
AIO was adding a new context's max requests to the global total before testing if that resulting total was over the global limit. This let innocent tasks get their new limit tested along with a racing guilty task that was crossing the limit. This serializes the _nr accounting with a spinlock It also switches to using unsigned long for the global totals. Individual contexts are still limited to an unsigned int's worth of requests by the syscall interface. The problem and fix were verified with a simple program that spun creating and destroying a context while holding on to another long lived context. Before the patch a task creating a tiny context could get a spurious EAGAIN if it raced with a task creating a very large context that overran the limit. Signed-off-by: Zach Brown <zach.brown@oracle.com> Cc: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] fuse: remove dead code from fuse_permissionChristoph Hellwig1-3/+0
The -EROFS check has moved up to permission() in the VFS a while ago. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] fs/smbfs/request.c: turn NULL dereference into BUG()Adrian Bunk1-2/+1
In a case documented as We should never be called with any of these states BUG() in a case that would later result in a NULL pointer dereference. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] hfs needs nlsLennert Buytenhek1-0/+1
Reported by Eddy Petrisor <eddy.petrisor@gmail.com> fs/built-in.o(.text+0x35fdc): In function `hfs_mdb_put': : undefined reference to `unload_nls' fs/built-in.o(.text+0x35ff1): In function `hfs_mdb_put': : undefined reference to `unload_nls' fs/built-in.o(.text+0x367a5): In function `parse_options': super.c: undefined reference to `load_nls' fs/built-in.o(.text+0x367db):super.c: undefined reference to `load_nls' fs/built-in.o(.text+0x36938):super.c: undefined reference to `load_nls_default' Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Acked-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] Remove hlist_for_each_rcu() API, convert existing use to ↵Paul E. McKenney1-6/+4
hlist_for_each_entry_rcu Remove the hlist_for_each_rcu() API, which is used only in one place, and is trivially converted to hlist_for_each_entry_rcu(), making the code shorter and more readable. Any out-of-tree uses may be similarly converted. Signed-off-by: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] Process Events ConnectorMatt Helsley1-0/+2
This patch adds a connector that reports fork, exec, id change, and exit events for all processes to userspace. It replaces the fork_advisor patch that ELSA is currently using. Applications that may find these events useful include accounting/auditing (e.g. ELSA), system activity monitoring (e.g. top), security, and resource management (e.g. CKRM). Signed-off-by: Matt Helsley <matthltc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] write_inode_now(): write inode if not BDI_CAP_NO_WRITEBACKAndrew Morton1-1/+1
If the backing_dev_info doesn't have BDI_CAP_NO_WRITEBACK we're not supposed to write back an inode's pages. But in this situation write_inode_now() refuses to write the inode itself as well. Fix. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] s390: cleanup of include/asm-s390/vtoc.hPeter Oberparleiter1-7/+8
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[PATCH] mm: rename kmem_cache_s to kmem_cachePekka J Enberg3-6/+6
This patch renames struct kmem_cache_s to kmem_cache so we can start using it instead of kmem_cache_t typedef. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[JFFS2] Clean up trailing white spacesThomas Gleixner33-590/+589
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Fix broken compile when debug level = 2Artem B. Bityutskiy1-3/+3
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Return 0, not number of bytes written, for success at commit_writeTodd Poynor1-3/+3
Some callers to block-layer commit_write function treat non-zero return as error, notably the loopback mount driver sometimes used in conjunction with JFFS2 on NAND flash for bad block avoidance, etc. Return zero for success as do various other commit_write functions. Signed-off-by: Todd Poynor <tpoynor@mvista.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Fix dataflash supportArtem B. Bityutskiy3-22/+40
- assume wbuf may be of size which is not power of 2 - don't make strange assumption about not padding wbuf for DataFlash - use wbuf = DataFlash page and eraseblock >= 8 Dataflash pages From: Peter Menzebach <pm-mtd@mw-itcon.de> Acked-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Use memset(struct) instead of nulling struct members one by oneArtem B. Bityutskiy1-10/+7
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Remove stale commentArtem B. Bityutskiy1-2/+1
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Rename jffs2_summary_node to jffs2_raw_summaryFerenc Havasi2-9/+9
Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Debug code simplification, update TODOArtem B. Bityutskiy13-264/+232
Simplify the debugging code further. Update the TODO list Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Account summary space in reserved_size.Ferenc Havasi1-1/+3
Always keep valid data in reserved_size. It did not cause problems, but the reservation code was unoptimal when centralized summary was active or the size of the erase block was very small. Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Debug message format clean upArtem B. Bityutskiy2-159/+120
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Call summary collector for all mtd devices with writev supportFerenc Havasi1-5/+6
Do the summary collection in the right place. If the device was not writebuffered but had c->mtd->writev function (e.g. blkmtd) the summary collector function was not called. Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Return real jffs2_sum_init() error codeFerenc Havasi1-3/+5
Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Add erase block summary support (mount time improvement)Ferenc Havasi18-197/+1372
The goal of summary is to speed up the mount time. Erase block summary (EBS) stores summary information at the end of every (closed) erase block. It is no longer necessary to scan all nodes separetly (and read all pages of them) just read this "small" summary, where every information is stored which is needed at mount time. This summary information is stored in a JFFS2_FEATURE_RWCOMPAT_DELETE. During the mount process if there is no summary info the orignal scan process will be executed. EBS works with NAND and NOR flashes, too. There is a user space tool called sumtool to generate this summary information for a JFFS2 image. Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Remove support for virtual blocksFerenc Havasi4-23/+13
Remove support for virtual blocks, which are build by concatenation of multiple physical erase blocks. For more information please read the MTD mailing list thread "[PATCH] remove support for virtual blocks" Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Solve BUG caused by frag->node representing a hole in fragtreeArtem B. Bityutskiy1-2/+2
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Calculate CRC check starting point correctlyArtem B. Bityutskiy2-8/+9
When data starts from the beginning of NAND page, 'len' must be zero, not c->wbuf_page. Thanks to Zoltan Sogor for reporting this problem. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] More message formatting cleanupsArtem B. Bityutskiy2-7/+7
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Fix JFFS2 [mc]time handlingArtem B. Bityutskiy5-17/+37
From: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Make the JFFS2 messages a bit nicerArtem B. Bityutskiy1-5/+5
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Teach JFFS2 about Sibley flashNicolas Pitre3-5/+46
Intels Sibley flash needs JFFS2 write buffer functionality Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Debug code clean up - step 7Artem B. Bityutskiy4-64/+71
Remove more noisy debugs. Add current->pid to debug messages. Remove bogus includes. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Correct buggy length checksArtem B. Bityutskiy2-4/+4
The previous changes introduced wrong length calculations. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Debug code clean up - step 6Artem B. Bityutskiy3-28/+15
Remove extra noisy debugs Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Build fragtree in reverse orderArtem B. Bityutskiy3-253/+868
Instead of building fragtree starting from node with the smallest version number, start from the highest. This helps to avoid reading and checking obsolete nodes. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Refine fragtree debug macrosArtem B. Bityutskiy1-6/+6
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Move another fragtree-related function to nodelist.cArtem B. Bityutskiy3-28/+28
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Fix up new debug code for eCos buildAndrew Lunn3-10/+16
The debug code cleanup broke the eCos build. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Debug code clean up - step 5Artem B. Bityutskiy2-143/+117
Replace the D1(printk()) style debugging with the new debug macros Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Move scattered function into related filesArtem B. Bityutskiy3-800/+790
Move functions to read inodes into readinode.c Move functions to handle fragtree and dentry lists into nodelist.[ch] Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Debug code clean up - step 4Artem B. Bityutskiy2-44/+54
Small comment cleanups. Remove a unused macro Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[jffs2] Remove compressor lzo and lzariFerenc Havasi2-22/+2
Remove unused compressor code Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Namespace clean upArtem B. Bityutskiy4-27/+8
Rename functions to a name matching the functionality. Remove stall debug code Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Debug code clean up - step 3Artem B. Bityutskiy14-239/+630
Various simplifiactions. printk format corrections. Convert more code to use the new debug functions. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Fix slab panicArtem B. Bityutskiy1-3/+2
When JFFS22 is unable to read the root inode, the bad root inode object is not freed and remains sticked in the jffs2_i slab cache. When we further try to free the slab cache (e.g., on rmmod jffs2), slab allocator subsystem panics. Fix this bug. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Debug code clean up - step 2Artem B. Bityutskiy5-13/+13
If debugging is disabled, define debugging functions as empty macros, instead of using Dx() explicitly. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Use f->target instead of f->dents for symlink targetArtem B. Bityutskiy4-46/+40
JFFS2 uses f->dents to store the pointer to the symlink target string (in case the inode is symlink). This is somewhat ugly to use the same field for different reasons. Introduce distinct field f->target for this purpose. Note, f->fragtree, f->dents, f->target may probably be put in a union. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Debug code clean up - step 1Artem B. Bityutskiy14-439/+663
Move debug functions into a seperate source file Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[JFFS2] Split a large routine on several smaller.Artem B. Bityutskiy1-261/+336
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-04NFS,SUNRPC,NLM: fix unused variable warnings when CONFIG_SYSCTL is disabledChuck Lever3-21/+44
Fix some dprintk's so that NLM, NFS client, and RPC client compile cleanly if CONFIG_SYSCTL is disabled. Test plan: Compile kernel with CONFIG_NFS enabled and CONFIG_SYSCTL disabled. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04NFSv4: Teach NFSv4 to cache locks when we hold a delegationTrond Myklebust1-8/+28
Now that we have a method of dealing with delegation recalls, actually enable the caching of posix and BSD locks. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04NFSv4: Recover locks too when returning a delegationTrond Myklebust3-2/+55
Delegations allow us to cache posix and BSD locks, however when the delegation is recalled, we need to "flush the cache" and send the cached LOCK requests to the server. This patch sets up the mechanism for doing so. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04NFSv4: Fix recovery of flock() locks.Trond Myklebust1-2/+2
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04NFSv4: Return any delegations before sillyrenaming the fileTrond Myklebust1-0/+3
I missed this one... Any form of rename will result in a delegation recall, so it is more efficient to return the one we hold before trying the rename. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04NFSv4: Fix the handling of the error NFS4ERR_OLD_STATEIDTrond Myklebust1-5/+3
Ensure that we retry the failed operation... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04NFSv4: Fix problem with OPEN_DOWNGRADETrond Myklebust6-51/+19
RFC 3530 states that for OPEN_DOWNGRADE "The share_access and share_deny bits specified must be exactly equal to the union of the share_access and share_deny bits specified for some subset of the OPENs in effect for current openowner on the current file. Setattr is currently violating the NFSv4 rules for OPEN_DOWNGRADE in that it may cause a downgrade from OPEN4_SHARE_ACCESS_BOTH to OPEN4_SHARE_ACCESS_WRITE despite the fact that there exists no open file with O_WRONLY access mode. Fix the problem by replacing nfs4_find_state() with a modified version of nfs_find_open_context(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04NFSv4: Fix a race between open() and close()Trond Myklebust3-47/+49
We must not remove the nfs4_state structure from the inode open lists before we are in sequence lock. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04[CIFS] Update kconfig for cifsSteve French4-14/+32
Add cifs extended stats configure option and reduce experimental code. Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-03Merge git://oss.sgi.com:8090/oss/git/xfs-2.6Linus Torvalds176-11922/+5668
2005-11-04[XFS] Remove no-longer-used qsort source.Nathan Scott3-182/+4
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-04[XFS] Fix an inode32 regression - if no options are presented, must stillNathan Scott1-2/+2
set default flags. SGI-PV: 945242 SGI-Modid: xfs-linux-melb:xfs-kern:24292a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03[XFS] Remove several no-longer-used files.Nathan Scott4-2300/+0
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03[XFS] Cleanup cosmetic differences between source trees.Nathan Scott4-35/+19
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03[XFS] fix XFS quota for modular XFS buildsNathan Scott1-1/+1
Cannot build XFS filesystem support as module with quota support. It works only when the XFS filesystem support is compiled into the kernel. Menuconfig prevents from setting CONFIG_XFS_FS=m and CONFIG_XFS_QUOTA=y. How to reproduce: configure the XFS filesystem with quota support as module. The resulting kernel won't have quota support compiled into xfs.ko. Fix: Changing the fs/xfs/Kconfig file from tristate to bool lets you configure the quota support to be compiled into the XFS module. The Makefile-linux-2.6 checks only for CONFIG_XFS_QUOTA=y. Signed-off-by: Dimitri Puzin <tristan-777@ddkom-online.de> Signed-off-by: Adrian Bunk <bunk@stusta.de> signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03[XFS] Add a mechanism for XFS to use the generic quota sync method.Nathan Scott1-1/+7
This is now used to issue a delayed allocation flush before reporting quota, which allows the used space quota report to match reality. Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03[XFS] Fixed the inconsistency between attribute b-tree intermidiate nodeYingping Lu1-1/+2
and leaf blocks. The problem cam from xfsqa test 117. SGI-PV: 940655 SGI-Modid: xfs-linux:xfs-kern:201527a Signed-off-by: Yingping Lu <yingping@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[CIFS] Make CONFIG_CIFS_EXPERIMENTAL depend on CONFIG_EXPERIMENTALSteve French1-1/+1
It seems logical. Note that CONFIG_EXPERIMENTAL itself doesn't enable any code. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
2005-11-02Merge git://brick.kernel.dk/data/git/linux-2.6-blockLinus Torvalds1-3/+4
2005-11-02[XFS] Ensure fsync does not incorrectly return EIO for pages beyond EOF.Nathan Scott1-2/+3
SGI-PV: 944819 SGI-Modid: xfs-linux:xfs-kern:24236a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Fix calculation of reserved AGs for inodes in 32-bit inode modeEric Sandeen1-1/+1
Spotted by Roger Willcocks <willcor @at@ gmail.com> SGI-PV: 944858 SGI-Modid: xfs-linux:xfs-kern:201213a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Fix boundary conditions when issuing direct IOs from large userspaceNathan Scott1-12/+16
buffers. SGI-PV: 944820 SGI-Modid: xfs-linux:xfs-kern:24223a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Remove an unhelpful ifdef, the comment above the routine explainsNathan Scott1-13/+1
the purpose well enough here. SGI-PV: 944821 SGI-Modid: xfs-linux:xfs-kern:24214a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Remove old, broken nolog-mode code - noone plans to ever fix it.Nathan Scott4-168/+39
SGI-PV: 944821 SGI-Modid: xfs-linux:xfs-kern:24213a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Rework fid encode/decode wrt 64 bit inums interacting with NFS.Nathan Scott6-12/+19
SGI-PV: 937127 SGI-Modid: xfs-linux:xfs-kern:24201a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Endianess annotations for various allocator data structuresChristoph Hellwig16-811/+794
SGI-PV: 943272 SGI-Modid: xfs-linux:xfs-kern:201006a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] remove unused code from xfs_iomap_write_directEric Sandeen1-8/+0
SGI-PV: 943266 SGI-Modid: xfs-linux:xfs-kern:200996a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] fix old xfs_setattr mis-merge from irix; mostly harmless esp if notEric Sandeen1-3/+3
using xfs rt SGI-PV: 944632 SGI-Modid: xfs-linux:xfs-kern:200983a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Fixing size report discrepancy between ls and du caused by xfs_fsrYingping Lu1-1/+23
SGI-PV: 943908 SGI-Modid: xfs-linux:xfs-kern:200874a Signed-off-by: Yingping Lu <yingping@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Fixed a bug in reporting extent list for attribute fork runningYingping Lu1-6/+7
xfs_bmap -a. SGI-PV: 944075 SGI-Modid: xfs-linux:xfs-kern:200860a Signed-off-by: Yingping Lu <yingping@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Simplify pagebuf_rele Remove a conditional that can not be trueChristoph Hellwig1-25/+4
anymore and simplify the final put path a little SGI-PV: 908809 SGI-Modid: xfs-linux:xfs-kern:200790a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Rework the final mount options flag bit to make room for more.Nathan Scott3-33/+42
SGI-PV: 943866 SGI-Modid: xfs-linux:xfs-kern:24030a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Rework the dquot hash sizing heuristics.Nathan Scott3-31/+20
SGI-PV: 943123 SGI-Modid: xfs-linux:xfs-kern:24012a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Add ATTR_NOSIZETOK definition for xfs_vnodeops.c changeEric Sandeen1-0/+1
SGI-PV: 942439 SGI-Modid: xfs-linux:xfs-kern:200185a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Disable attr2 by default, until a more appropriate time to enableNathan Scott1-1/+9
it. SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:24002a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Prevent data corruption on extending truncate case from cxfs clientEric Sandeen1-1/+3
SGI-PV: 942439 SGI-Modid: xfs-linux:xfs-kern:200152a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Fix sparse warnings in ktrace.[ch]Christoph Hellwig2-2/+2
SGI-PV: 943556 SGI-Modid: xfs-linux:xfs-kern:200113a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] silence gcc4 warnings. the directory ones are wrong because ofChristoph Hellwig5-4/+20
information gcc could not find out (that a directory always has a .. entry), the others are outright gcc bugs. SGI-PV: 943511 SGI-Modid: xfs-linux:xfs-kern:200055a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Remove unused type, xfs_gap_t.Nathan Scott1-18/+0
SGI-PV: 907752 SGI-Modid: xfs-linux:xfs-kern:23932a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] endianess annotations and cleanup for the quota codeChristoph Hellwig8-292/+271
SGI-PV: 943272 SGI-Modid: xfs-linux:xfs-kern:199767a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Show additional mount options in /proc/mounts, fix up some debugNathan Scott1-0/+4
code. SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23926a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Fix up a 32/64 local flags variable issue when enabling attr2 mode.Nathan Scott2-11/+12
SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23925a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Remove dead code in xfs_iomap_write_direct; save some stackEric Sandeen1-8/+4
SGI-PV: 943266 SGI-Modid: xfs-linux:xfs-kern:199750a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Update license/copyright notices to match the prefered SGINathan Scott12-312/+132
boilerplate. SGI-PV: 913862 SGI-Modid: xfs-linux:xfs-kern:23917a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Update license/copyright notices to match the prefered SGINathan Scott157-4056/+1762
boilerplate. SGI-PV: 913862 SGI-Modid: xfs-linux:xfs-kern:23903a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Remove xfs_macros.c, xfs_macros.h, rework headers a whole lot.Nathan Scott93-3093/+1567
SGI-PV: 943122 SGI-Modid: xfs-linux:xfs-kern:23901a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] remove unused struct xfs_ail_ticketChristoph Hellwig1-13/+0
SGI-PV: 919278 SGI-Modid: xfs-linux:xfs-kern:199498a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Track external log/realtime device names for correct reporting inNathan Scott5-13/+29
/proc/mounts. SGI-PV: 942984 SGI-Modid: xfs-linux:xfs-kern:23862a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Improve buffered read throughput by removing unnecessary timer callsNathan Scott5-84/+140
that showed in ´kernel profiles. SGI-PV: 925163 SGI-Modid: xfs-linux:xfs-kern:23861a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Remove a null CELL macro and its one caller, not useful to anyone.Nathan Scott2-6/+0
SGI-PV: 942986 SGI-Modid: xfs-linux:xfs-kern:23860a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Fix up an internal sort function name collision issue.Nathan Scott5-7/+7
SGI-PV: 942986 SGI-Modid: xfs-linux:xfs-kern:23859a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Make some extended attributes routines take const parameters, forNathan Scott5-18/+19
the FreeBSD porters. SGI-PV: 942906 SGI-Modid: xfs-linux:xfs-kern:23845a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Ondisk format extension for extended attributes (attr2). Basically,Nathan Scott1-1/+1
the data/attr forks now grow up/down from either end of the literal area, rather than dividing the literal area into two chunks and growing both upward. Means we can now make much more efficient use of the attribute space, incl. fitting DMF attributes inline in 256 byte inodes, and large jumps in dbench3 performance numbers. It is self enabling, but can be forced on/off via the attr2/noattr2 mount options. SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23837a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Ondisk format extension for extended attributes (attr2). Basically,Nathan Scott1-1/+1
the data/attr forks now grow up/down from either end of the literal area, rather than dividing the literal area into two chunks and growing both upward. Means we can now make much more efficient use of the attribute space, incl. fitting DMF attributes inline in 256 byte inodes, and large jumps in dbench3 performance numbers. It is self enabling, but can be forced on/off via the attr2/noattr2 mount options. SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23836a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Ondisk format extension for extended attributes (attr2). Basically,Nathan Scott13-114/+354
the data/attr forks now grow up/down from either end of the literal area, rather than dividing the literal area into two chunks and growing both upward. Means we can now make much more efficient use of the attribute space, incl. fitting DMF attributes inline in 256 byte inodes, and large jumps in dbench3 performance numbers. It is self enabling, but can be forced on/off via the attr2/noattr2 mount options. SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23835a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Move some code around to prepare for the upcoming extendedNathan Scott4-99/+90
attributes format change (attr2). SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23833a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Introduce two new mount options (nolargeio/largeio) to allowDavid Chinner6-35/+43
filesystems to expose the filesystem stripe width in stat(2) rather than the page cache size. This allows applications requiring high bandwidth to easily determine the optimum I/O size for the underlying filesystem. The default is to report the page cache size (i.e. "nolargeio"). SGI-PV: 942818 SGI-Modid: xfs-linux:xfs-kern:23830a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Provide a mechiansm for flushing delalloc before quota reporting.Nathan Scott5-4/+23
SGI-PV: 942815 SGI-Modid: xfs-linux:xfs-kern:23829a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Fix signedness issues in dquot ID handling, allowing uids/gids aboveNathan Scott3-10/+4
MAXINT SGI-PV: 942528 SGI-Modid: xfs-linux:xfs-kern:23828a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Add a comment about the use of XFS_SIZE_TOKEN_WANT.Nathan Scott1-1/+2
SGI-PV: 936331 SGI-Modid: xfs-linux:xfs-kern:23827a Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] only mark buffers done when all pages are uptodate in additionChristoph Hellwig2-8/+8
replace PBF_NONE with an inverted PBF_DONE, so it's like all the other flags. SGI-PV: 942609 SGI-Modid: xfs-linux:xfs-kern:199136a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Stack footprint reduction for xfs_swapext (used from xfs_fsr)Eric Sandeen1-31/+40
SGI-PV: 913332 SGI-Modid: xfs-linux:xfs-kern:198926a Signed-off-by: Eric Sandeen <sandeen@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] write barrier support Issue all log sync operations as orderedChristoph Hellwig12-59/+190
writes. In addition flush the disk cache on fsync if the sync cached operation didn't sync the log to disk (this requires some additional bookeping in the transaction and log code). If the device doesn't claim to support barriers, the filesystem has an extern log volume or the trial superblock write with barriers enabled failed we disable barriers and print a warning. We should probably fail the mount completely, but that could lead to nasty boot failures for the root filesystem. Not enabled by default yet, needs more destructive testing first. SGI-PV: 912426 SGI-Modid: xfs-linux:xfs-kern:198723a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] fix PBF_NONE handlingChristoph Hellwig1-1/+2
SGI-PV: 908809 SGI-Modid: xfs-linux:xfs-kern:198669a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Add format checking to cmn_err and icmn_errChristoph Hellwig7-11/+18
SGI-PV: 942243 SGI-Modid: xfs-linux:xfs-kern:198658a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] remove unused pagebuf flagsChristoph Hellwig2-33/+13
SGI-PV: 908809 SGI-Modid: xfs-linux:xfs-kern:198656a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-02[XFS] Make sure the threads and shaker in xfs_buf are de-initialized inChristoph Hellwig1-62/+25
reverse startup order SGI-PV: 942063 SGI-Modid: xfs-linux:xfs-kern:198651a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-01Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.gitSteve French2-9/+10
2005-11-01Merge branch 'master' of /home/src/linux-2.6/Anton Altaparmakov1-1/+1
2005-11-01NTFS: Fix a stupid bug causing writes to non-initialized pages to segfault.Anton Altaparmakov1-8/+9
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
2005-11-01[BLOCK] Unify the seperate read/write io stat fields into arraysJens Axboe1-3/+4
Instead of having ->read_sectors and ->write_sectors, combine the two into ->sectors[2] and similar for the other fields. This saves a branch several places in the io path, since we don't have to care for what the actual io direction is. On my x86-64 box, that's 200 bytes less text in just the core (not counting the various drivers). Signed-off-by: Jens Axboe <axboe@suse.de>
2005-10-31JFS: set i_ctime & i_mtime on target directory when creating linksDave Kleikamp1-0/+3
jfs has never been setting i_ctime or i_mtime when creating either hard or symbolic links. I'm surprised nobody had noticed until now. Thanks to Chris Spiegel for reporting the problem. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
2005-10-31[PATCH] fix __writeback_single_inode WARN_ONAndrea Arcangeli1-1/+1
When the inode count is zero in inode writeback, the WARN_ON(!(inode->i_state & I_WILL_FREE)); is broken, and needs to test for either I_WILL_FREE|I_FREEING. When the inode is in I_FREEING state, it's already out of the visibility of the vm so it can't be freed so it doesn't require the __iget and the generic_delete_inode path can call the sync internally to the lowlevel fs callback during the last iput. So the inode being in I_FREEING is also a valid condition for calling the sync with i_count == 0. The specific stack trace is this: 0xc00000007b8fb6e0 0xc00000000010118c .__writeback_single_inode +0x5c 0xc00000007b8fb6e0 0xc0000000001014dc (lr) .sync_inode +0x3c 0xc00000007b8fb790 0xc0000000001014dc .sync_inode +0x3c 0xc00000007b8fb820 0xc0000000001a5020 .ext2_sync_inode +0x64 0xc00000007b8fb8f0 0xc0000000001a65b4 .ext2_truncate +0x3f8 0xc00000007b8fba40 0xc0000000001a6940 .ext2_delete_inode +0xdc 0xc00000007b8fbac0 0xc0000000000f7a5c .generic_delete_inode +0x124 0xc00000007b8fbb50 0xc0000000000f5fe0 .iput +0xb8 0xc00000007b8fbbe0 0xc0000000000e9fd4 .sys_unlink +0x2a8 0xc00000007b8fbd10 0xc00000000001048c .ret_from_syscall_1 +0x0 Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-31Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.gitSteve French102-2172/+5722
2005-10-31Merge branch 'master' of /usr/src/ntfs-2.6/Anton Altaparmakov40-272/+283
2005-10-31Merge ../linux-2.6 by handPaul Mackerras88-1125/+1919
2005-10-30[PATCH] fat: Remove duplicate directory scanning codePekka Enberg1-123/+101
This patch removes duplicate directory scanning code from fs/fat/dir.c. The two functions that share identical code are fat_readdirx() and fat_search_long(). This patch also renames fat_readdirx to __fat_readdir(). Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] fat: remove the unneeded vfat_find() in vfat_rename()OGAWA Hirofumi2-21/+10
Now, vfat_rename() is using vfat_find() for sanity check. This removes that sanity check, the cost of sanity check is too high. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] fat: cleanup and optimization of checksumOGAWA Hirofumi2-10/+3
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] fix missing includesTim Schmielau3-0/+4
I recently picked up my older work to remove unnecessary #includes of sched.h, starting from a patch by Dave Jones to not include sched.h from module.h. This reduces the number of indirect includes of sched.h by ~300. Another ~400 pointless direct includes can be removed after this disentangling (patch to follow later). However, quite a few indirect includes need to be fixed up for this. In order to feed the patches through -mm with as little disturbance as possible, I've split out the fixes I accumulated up to now (complete for i386 and x86_64, more archs to follow later) and post them before the real patch. This way this large part of the patch is kept simple with only adding #includes, and all hunks are independent of each other. So if any hunk rejects or gets in the way of other patches, just drop it. My scripts will pick it up again in the next round. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] __bread oops fixAndrew Morton1-3/+5
If a filesystem passes an idiotic blocksize into bread(), __getblk_slow() will warn and will return NULL. We have a report (from Hubert Tonneau <hubert.tonneau@fullpliant.org>) of isofs_fill_super() doing this (passing in a silly block size) against an unplugged CDROM drive. But a couple of __getblk_slow() callers forgot to check for the NULL bh, hence oops. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] fs/attr.c: remove BUG()Alexey Dobriyan1-3/+0
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] Test for sb_getblk return valueGlauber de Oliveira Costa3-1/+22
This patch adds tests for the return value of sb_getblk() in the ext2/3 filesystems. In fs/buffer.c it is stated that the getblk() function never fails. However, it does can return NULL in some situations due to I/O errors, which may lead us to NULL pointer dereferences Signed-off-by: Glauber de Oliveira Costa <glommer@br.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] fix nr_unused accounting, and avoid recursing in iput with ↵Andrea Arcangeli2-12/+17
I_WILL_FREE set list_move(&inode->i_list, &inode_in_use); } else { list_move(&inode->i_list, &inode_unused); + inodes_stat.nr_unused++; } } wake_up_inode(inode); Are you sure the above diff is correct? It was added somewhere between 2.6.5 and 2.6.8. I think it's wrong. The only way I can imagine the i_count to be zero in the above path, is that I_WILL_FREE is set. And if I_WILL_FREE is set, then we must not increase nr_unused. So I believe the above change is buggy and it will definitely overstate the number of unused inodes and it should be backed out. Note that __writeback_single_inode before calling __sync_single_inode, can drop the spinlock and we can have both the dirty and locked bitflags clear here: spin_unlock(&inode_lock); __wait_on_inode(inode); iput(inode); XXXXXXX spin_lock(&inode_lock); } use inode again here a construct like the above makes zero sense from a reference counting standpoint. Either we don't ever use the inode again after the iput, or the inode_lock should be taken _before_ executing the iput (i.e. a __iput would be required). Taking the inode_lock after iput means the iget was useless if we keep using the inode after the iput. So the only chance the 2.6 was safe to call __writeback_single_inode with the i_count == 0, is that I_WILL_FREE is set (I_WILL_FREE will prevent the VM to free the inode in XXXXX). Potentially calling the above iput with I_WILL_FREE was also wrong because it would recurse in iput_final (the second mainline bug). The below (untested) patch fixes the nr_unused accounting, avoids recursing in iput when I_WILL_FREE is set and makes sure (with the BUG_ON) that we don't corrupt memory and that all holders that don't set I_WILL_FREE, keeps a reference on the inode! Signed-off-by: Andrea Arcangeli <andrea@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] ext3: sparse fixesBen Dooks8-6/+29
Fix warnings from sparse due to un-declared functions that should either have a header file or have been declared static fs/ext2/bitmap.c:14:15: warning: symbol 'ext2_count_free' was not declared. Should it be static? fs/ext2/namei.c:92:15: warning: symbol 'ext2_get_parent' was not declared. Should it be static? fs/ext3/bitmap.c:15:15: warning: symbol 'ext3_count_free' was not declared. Should it be static? fs/ext3/namei.c:1013:15: warning: symbol 'ext3_get_parent' was not declared. Should it be static? fs/ext3/xattr.c:214:1: warning: symbol 'ext3_xattr_block_get' was not declared. Should it be static? fs/ext3/xattr.c:358:1: warning: symbol 'ext3_xattr_block_list' was not declared. Should it be static? fs/ext3/xattr.c:630:1: warning: symbol 'ext3_xattr_block_find' was not declared. Should it be static? fs/ext3/xattr.c:863:1: warning: symbol 'ext3_xattr_ibody_find' was not declared. Should it be static? Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] fix de_thread() vs do_coredump() deadlockOleg Nesterov1-3/+13
de_thread() sends SIGKILL to all sub-threads and waits them to die in 'D' state. It is possible that one of the threads already dequeued coredump signal. When de_thread() unlocks ->sighand->lock that thread can enter do_coredump()->coredump_wait() and cause a deadlock. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] fuse: spelling fixesMiklos Szeredi2-9/+9
Correct some typos and inconsistent use of "initialise" vs "initialize" in comments. Reported by Ioannis Barkas. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] Locking problems while EXT3FS_DEBUG onGlauber de Oliveira Costa3-6/+3
I noticed some problems while running ext3 with the debug flag set on. More precisely, I was unable to umount the filesystem. Some investigation took me to the patch that follows. At a first glance , the lock/unlock I've taken out seems really not necessary, as the main code (outside debug) does not lock the super. The only additional danger operations that debug code introduces seems to be related to bitmap, but bitmap operations tends to be all atomic anyway. I also took the opportunity to fix 2 spelling errors. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30[PATCH] coredump_wait() cleanupOleg Nesterov1-8/+5
This patch deletes pointless code from coredump_wait(). 1. It does useless mm->core_waiters inc/dec under mm->mmap_sem, but any changes to ->core_waiters have no effect until we drop ->mmap_sem. 2. It calls yield() for absolutely unknown reason. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>