aboutsummaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* NTFS: 2.1.27 - Various bug fixes and cleanups.Anton Altaparmakov2006-03-231-1/+1
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Semaphore to mutex conversion.Ingo Molnar2006-03-238-69/+71
| | | | | | | | | The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Handle the recently introduced -ENAMETOOLONG return value fromAnton Altaparmakov2006-03-232-5/+6
| | | | | | fs/ntfs/unistr.c::ntfs_nlstoucs() in fs/ntfs/namei.c::ntfs_lookup(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Add a missing call to flush_dcache_mft_record_page() inAnton Altaparmakov2006-03-232-3/+8
| | | | | | fs/ntfs/inode.c::ntfs_write_inode(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix a bug in fs/ntfs/inode.c::ntfs_read_locked_index_inode() where weAnton Altaparmakov2006-03-233-19/+15
| | | | | | | forgot to update a temporary variable so loading index inodes which have an index allocation attribute failed. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Improve comments on file attribute flags in fs/ntfs/layout.h.Anton Altaparmakov2006-03-232-13/+13
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Limit name length in fs/ntfs/unistr.c::ntfs_nlstoucs() to maximumAnton Altaparmakov2006-03-232-19/+35
| | | | | | | allowed by NTFS, i.e. 255 Unicode characters, not including the terminating NULL (which is not stored on disk). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Remove all the make_bad_inode() calls. This should only be calledAnton Altaparmakov2006-03-236-23/+5
| | | | | | from read inode and new inode code paths. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Add support for sparse files which have a compression unit of 0.Anton Altaparmakov2006-03-234-38/+75
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix comparison of $MFT and $MFTMirr to not bail out when there areAnton Altaparmakov2006-03-232-13/+28
| | | | | | | unused, invalid mft records which are the same in both $MFT and $MFTMirr. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Use buffer_migrate_page() for the ->migratepage function of all ntfsAnton Altaparmakov2006-03-232-1/+10
| | | | | | address space operations. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix a buggette in an "should be impossible" case handling where weAnton Altaparmakov2006-03-232-2/+4
| | | | | | continued the attribute lookup loop instead of aborting it. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* NTFS: Fix an (innocent) off-by-one error in the runlist code.Anton Altaparmakov2006-03-235-7/+17
| | | | Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
* Merge branch 'master' of /usr/src/ntfs-2.6/Anton Altaparmakov2006-03-23108-1127/+1477
|\
| * Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2006-03-226-6/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: fixed path to moved file in include/linux/device.h Fix spelling in E1000_DISABLE_PACKET_SPLIT Kconfig description Documentation/dvb/get_dvb_firmware: fix firmware URL Documentation: Update to BUG-HUNTING Remove superfluous NOTIFY_COOKIE_LEN define add "tags" to .gitignore Fix "frist", "fisrt", typos fix rwlock usage example It's UTF-8
| | * It's UTF-8Alexey Dobriyan2006-03-226-6/+6
| | | | | | | | | | | | | | | | | | | | | Fix some comments to "UTF-8". Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
| * | [PATCH] page migration reorgChristoph Lameter2006-03-222-62/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Centralize the page migration functions in anticipation of additional tinkering. Creates a new file mm/migrate.c 1. Extract buffer_migrate_page() from fs/buffer.c 2. Extract central migration code from vmscan.c 3. Extract some components from mempolicy.c 4. Export pageout() and remove_from_swap() from vmscan.c 5. Make it possible to configure NUMA systems without page migration and non-NUMA systems with page migration. I had to so some #ifdeffing in mempolicy.c that may need a cleanup. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] convert hugetlbfs_counter to atomicChen, Kenneth W2006-03-221-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of hugetlbfs_counter() is functionally equivalent to atomic_inc_return(). Use the simpler atomic form. Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] hugepage: Strict page reservation for hugepage inodesDavid Gibson2006-03-221-52/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These days, hugepages are demand-allocated at first fault time. There's a somewhat dubious (and racy) heuristic when making a new mmap() to check if there are enough available hugepages to fully satisfy that mapping. A particularly obvious case where the heuristic breaks down is where a process maps its hugepages not as a single chunk, but as a bunch of individually mmap()ed (or shmat()ed) blocks without touching and instantiating the pages in between allocations. In this case the size of each block is compared against the total number of available hugepages. It's thus easy for the process to become overcommitted, because each block mapping will succeed, although the total number of hugepages required by all blocks exceeds the number available. In particular, this defeats such a program which will detect a mapping failure and adjust its hugepage usage downward accordingly. The patch below addresses this problem, by strictly reserving a number of physical hugepages for hugepage inodes which have been mapped, but not instatiated. MAP_SHARED mappings are thus "safe" - they will fail on mmap(), not later with an OOM SIGKILL. MAP_PRIVATE mappings can still trigger an OOM. (Actually SHARED mappings can technically still OOM, but only if the sysadmin explicitly reduces the hugepage pool between mapping and instantiation) This patch appears to address the problem at hand - it allows DB2 to start correctly, for instance, which previously suffered the failure described above. This patch causes no regressions on the libhugetblfs testsuite, and makes a test (designed to catch this problem) pass which previously failed (ppc64, POWER5). Signed-off-by: David Gibson <dwg@au1.ibm.com> Cc: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] mm: nommu use compound pagesNick Piggin2006-03-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that compound page handling is properly fixed in the VM, move nommu over to using compound pages rather than rolling their own refcounting. nommu vm page refcounting is broken anyway, but there is no need to have divergent code in the core VM now, nor when it gets fixed. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: David Howells <dhowells@redhat.com> (Needs testing, please). Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] slab: Remove SLAB_NO_REAP optionChristoph Lameter2006-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SLAB_NO_REAP is documented as an option that will cause this slab not to be reaped under memory pressure. However, that is not what happens. The only thing that SLAB_NO_REAP controls at the moment is the reclaim of the unused slab elements that were allocated in batch in cache_reap(). Cache_reap() is run every few seconds independently of memory pressure. Could we remove the whole thing? Its only used by three slabs anyways and I cannot find a reason for having this option. There is an additional problem with SLAB_NO_REAP. If set then the recovery of objects from alien caches is switched off. Objects not freed on the same node where they were initially allocated will only be reused if a certain amount of objects accumulates from one alien node (not very likely) or if the cache is explicitly shrunk. (Strangely __cache_shrink does not check for SLAB_NO_REAP) Getting rid of SLAB_NO_REAP fixes the problems with alien cache freeing. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Manfred Spraul <manfred@colorfullife.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] v9fs: assign dentry ops to negative dentriesLatchesar Ionkov2006-03-221-2/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a file is not found in v9fs_vfs_lookup, the function creates negative dentry, but doesn't assign any dentry ops. This leaves the negative entry in the cache (there is no d_delete to mark it for removal). If the file is created outside of the mounted v9fs filesystem, the file shows up in the directory with weird permissions. This patch assigns the default v9fs dentry ops to the negative dentry. Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [PATCH] sysfs: fix a kobject leak in sysfs_add_link on the error pathGreg Kroah-Hartman2006-03-201-0/+1
| | | | | | | | | | | | | | | | As pointed out by Oliver Neukum. Cc: Maneesh Soni <maneesh@in.ibm.com> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * [PATCH] sysfs: don't export dir symbolsGreg Kroah-Hartman2006-03-201-4/+0
| | | | | | | | | | | | | | | | These functions should only be used by the kobject core, and if any driver tries to use them, bad things happen. Unexport them to try to prevent this from happening. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * [PATCH] debugfs: Add debugfs_create_blob() helper for exporting binary dataMichael Ellerman2006-03-201-0/+46
| | | | | | | | | | | | | | | | | | I wanted to export a binary blob via debugfs, and although it was pretty easy it seems like it'd be easier if there was a helper for it. It's a pity we need the wrapper struct but I can't see a cleaner way to do it. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * [PATCH] sysfs: fix problem with duplicate sysfs directories and filesManeesh Soni2006-03-204-5/+39
| | | | | | | | | | | | | | | | The following patch checks for existing sysfs_dirent before preparing new one while creating sysfs directories and files. Signed-off-by: Maneesh Soni <maneesh@in.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * [PATCH] sysfs: kzalloc conversionEric Sesterhenn2006-03-202-4/+2
| | | | | | | | | | | | | | | | this converts fs/sysfs to kzalloc() usage. compile tested with make allyesconfig Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * [PATCH] kobj_map semaphore to mutex conversionJes Sorensen2006-03-201-8/+9
| | | | | | | | | | | | | | | | | | Convert the kobj_map code to use a mutex instead of a semaphore. It converts the single two users as well, genhd.c and char_dev.c. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * [PATCH] sysfs: sysfs_remove_dir() needs to invalidate the dentryGreg Kroah-Hartman2006-03-202-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling sysfs_remove_dir() don't allow any further sysfs functions to work for this kobject anymore. This fixes a nasty USB cdc-acm oops on disconnect. Many thanks to Bob Copeland and Paul Fulghum for taking the time to track this down. Cc: Bob Copeland <email@bobcopeland.com> Cc: Paul Fulghum <paulkf@microgate.com> Cc: Maneesh Soni <maneesh@in.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Merge branch 'for-linus' of ↵Linus Torvalds2006-03-2024-204/+429
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6: JFS: add uid, gid, and umask mount options JFS: Take logsync lock before testing mp->lsn JFS: kzalloc conversion JFS: Add missing file from fa3241d24cf1182b0ffb6e4d412c3bc2a2ab7bf6 JFS: Use the kthread_ API JFS: Fix regression. fsck complains if symlinks do not have INLINEEA attribute JFS: ext2 inode attributes for jfs JFS: semaphore to mutex conversion. JFS: make buddy table static JFS: Add back directory i_size calculations for legacy partitions
| | * Merge with /home/shaggy/git/linus-clean/Dave Kleikamp2006-03-14152-1845/+2653
| | |\
| | * | JFS: add uid, gid, and umask mount optionsDave Kleikamp2006-03-095-10/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OS/2 doesn't initialize the uid, gid, or unix-style permission bits. The uid, gid, & umask mount options perform pretty much like those for the fat file system, overriding what is stored on disk. This is useful for users sharing the file system with OS/2. I implemented a little feature so that if you mask the execute bit, it will be re-enabled on directories when the appropriate read bit is unmasked. I didn't want to implement an fmask & dmask option. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| | * | JFS: Take logsync lock before testing mp->lsnDave Kleikamp2006-03-082-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a race where lsn could be cleared before taking the lock Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| | * | JFS: kzalloc conversionEric Sesterhenn2006-02-233-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this converts fs/jfs to kzalloc() usage. compile tested with make allyesconfig Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| | * | JFS: Add missing file from fa3241d24cf1182b0ffb6e4d412c3bc2a2ab7bf6Herbert Poetzl2006-02-221-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | My mistake here. I failed to checkin fs/jfs/ioctl.c Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| | * | JFS: Use the kthread_ APIChristoph Hellwig2006-02-154-72/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the kthread_ API instead of opencoding lots of hairy code for kernel thread creation and teardown. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| | * | JFS: Fix regression. fsck complains if symlinks do not have INLINEEA attributeDave Kleikamp2006-02-101-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| | * | JFS: ext2 inode attributes for jfsHerbert Poetzl2006-02-097-8/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ext2 inode attributes with relevance for jfs: 'a' EXT2_APPEND_FL -> append only 'i' EXT2_IMMUTABLE_FL -> immutable file 's' EXT2_SECRM_FL -> zero file 'u' EXT2_UNRM_FL -> allow for unrm 'A' EXT2_NOATIME_FL -> no access time 'D' EXT2_DIRSYNC_FL -> dirsync 'S' EXT2_SYNC_FL -> sync overview of jfs flags (partially for OS/2) value (OS/2) Linux ext2 attrs ------------------------------------------------ 0x00010000 IFJOURNAL - 0x00020000 ISPARSE used 0x00040000 INLINEEA used 0x00080000 - - JFS_NOATIME_FL 0x00100000 - - JFS_DIRSYNC_FL 0x00200000 - - JFS_SYNC_FL 0x00400000 - - JFS_SECRM_FL 0x00800000 ISWAPFILE - JFS_UNRM_FL 0x01000000 - - JFS_APPEND_FL 0x02000000 IREADONLY - JFS_IMMUTABLE_FL 0x04000000 IHIDDEN - - 0x08000000 ISYSTEM - - 0x10000000 - - 0x20000000 IDIRECTORY used 0x40000000 IARCHIVE - 0x80000000 INEWNAME - the implementation is straight forward, except for the fact that the attributes have to be mapped to match with the ext2 ones to avoid a separate tool for manipulating them (this could be avoided when using a separate flag field in the on-disk representation, but the overhead is minimal) a special jfs_ioctl is added to allow for the new JFS_IOC_GETFLAGS and JFS_IOC_SETFLAGS calls. a helper function jfs_set_inode_flags() to transfer the flags from the on-disk version to the inode minor changes to allow flag inheritance on inode creation, as well as a cleanup of the on-disk flags (including the new ones) beforementioned helper to map between ext2 and jfs versions of the new flags ... the JFS_SECRM_FL and JFS_UNRM_FL are not done yet and I'm not 100% sure they are worth the effort, the rest seems to work out of the box ... Signed-off-by: Herbert Poetzl <herbert@13thfloor.at> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| | * | JFS: semaphore to mutex conversion.Ingo Molnar2006-01-2415-101/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the conversion was generated via scripts, and the result was validated automatically via a script as well. build and boot tested. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| | * | Merge with /home/shaggy/git/linus-clean/Dave Kleikamp2006-01-24513-9198/+58733
| | |\ \
| | * | | JFS: make buddy table staticArjan van de Ven2005-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Idea is to reduce false cacheline sharing and stuff Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| | * | | Merge with /home/shaggy/git/linus-clean/Dave Kleikamp2005-11-119-21/+94
| | |\ \ \
| | * | | | JFS: Add back directory i_size calculations for legacy partitionsDave Kleikamp2005-11-101-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux-formatted jfs partitions have a different idea about what i_size represents than partitions formatted on OS/2. The i_size calculation is now based on the size of the directory index. For legacy partitions, which have no directory index, the i_size is never being updated. This patch adds back the original i_size calculations for legacy partitions. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
| * | | | | [PATCH] nfsservctl(): remove user-triggerable printkPeter Staubach2006-03-171-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A user can use nfsservctl() to spam the logs. This can happen because the arguments to the nfsservctl() system call are versioned. This is a good thing. However, when a bad version is detected, the kernel prints a message and then returns an error. Signed-off-by: Peter Staubach <staubach@redhat.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | | | | [PATCH] v9fs: fix overzealous dropping of dentry which breaks dcacheEric Van Hensbergen2006-03-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a d_drop in dir_release which caused problems as it invalidates dcache entries too soon. This was likely a part of the wierd cwd behavior folks were seeing. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | | | | [PATCH] Fix ext2 readdir f_pos re-validation logicAl Viro2006-03-151-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes not one, but _two_, silly (but admittedly hard to hit) bugs in the ext2 filesystem "readdir()" function. It also cleans up the code to avoid the unnecessary goto mess. The bugs were related to re-valiating the f_pos value after somebody had either done an "lseek()" on the directory to an invalid offset, or when the offset had become invalid due to a file being unlinked in the directory. The code would not only set the f_version too eagerly, it would also not update f_pos appropriately for when the offset fixup took place. When that happened, we'd occasionally subsequently fail the readdir() even when we shouldn't (no real harm done, but an ugly printk, and obviously you would end up not necessarily seeing all entries). Thanks to Masoud Sharbiani <masouds@google.com> who noticed the problem and had a test-case for it, and also fixed up a thinko in the first version of this patch. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Masoud Sharbiani <masouds@google.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | | | | [PATCH] fs/namespace.c:dup_namespace(): fix a use after freeAdrian Bunk2006-03-151-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Coverity checker spotted the following bug in dup_namespace(): <-- snip --> if (!new_ns->root) { up_write(&namespace_sem); kfree(new_ns); goto out; } ... out: return new_ns; <-- snip --> Callers expect a non-NULL result to not be freed. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | | | | [PATCH] page migration: fail if page is in a vma flagged VM_LOCKEDChristoph Lameter2006-03-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | page migration currently simply retries a couple of times if try_to_unmap() fails without inspecting the return code. However, SWAP_FAIL indicates that the page is in a vma that has the VM_LOCKED flag set (if ignore_refs ==1). We can check for that return code and avoid retrying the migration. migrate_page_remove_references() now needs to return a reason why the failure occured. So switch migrate_page_remove_references to use -Exx style error messages. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | | | | Merge git://oss.sgi.com:8090/oss/git/rc-fixesLinus Torvalds2006-03-141-9/+12
| |\ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | * git://oss.sgi.com:8090/oss/git/rc-fixes: Fix a direct I/O locking issue revealed by the new mutex code.
| | * | | | Fix a direct I/O locking issue revealed by the new mutex code.Nathan Scott2006-03-151-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Affects only XFS (i.e. DIO_OWN_LOCKING case) - currently it is not possible to get i_mutex locking correct when using DIO_OWN direct I/O locking in a filesystem due to indeterminism in the possible return code/lock/unlock combinations. This can cause a direct read to attempt a double i_mutex unlock inside XFS. We're now ensuring __blockdev_direct_IO always exits with the inode i_mutex (still) held for a direct reader. Tested with the three different locking modes (via direct block device access, ext3 and XFS) - both reading and writing; cannot find any regressions resulting from this change, and it clearly fixes the mutex_unlock warning originally reported here: http://marc.theaimsgroup.com/?l=linux-kernel&m=114189068126253&w=2 Signed-off-by: Nathan Scott <nathans@sgi.com> Acked-by: Christoph Hellwig <hch@lst.de>