aboutsummaryrefslogtreecommitdiffstats
path: root/firmware (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-12-16Fix breakage in shmem.cAl Viro1-0/+2
Replacing error = 0; if (error) op with nothing is not quite an equivalent transformation ;-) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16re-export alloc_file()Roland Dreier1-0/+1
Commit 3d1e4631 ("get rid of init_file()") removed the export of alloc_file() -- possibly inadvertently, since that commit mainly consisted of deleting the lines between the end of alloc_file() and the start of the code in init_file(). There is in fact one modular use of alloc_file() in the tree, in drivers/infiniband/core/uverbs_main.c, so re-add the export to fix: ERROR: "alloc_file" [drivers/infiniband/core/ib_uverbs.ko] undefined! when CONFIG_INFINIBAND_USER_ACCESS=m. Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16[sysctl] Fix breakage on systems with older glibcAndi Kleen1-0/+7
As predicted during code review, the sysctl(2) changes made systems with old glibc nearly unusable. About every command gives a: warning: process `ls' used the deprecated sysctl system call with 1.4 warning in the log. I see this on a SUSE 10.0 system with glibc 2.3.5. Don't warn for this common case. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16XFS: Free buffer pages array unconditionallyDave Chinner1-2/+2
The code in xfs_free_buf() only attempts to free the b_pages array if the buffer is a page cache backed or page allocated buffer. The extra log buffer that is used when the log wraps uses pages that are allocated to a different log buffer, but it still has a b_pages array allocated when those pages are associated to with the extra buffer in xfs_buf_associate_memory. Hence we need to always attempt to free the b_pages array when tearing down a buffer, not just on buffers that are explicitly marked as page bearing buffers. This fixes a leak detected by the kernel memory leak code. Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Alex Elder <aelder@sgi.com>
2009-12-16xfs: kill xfs_bmbt_rec_32/64 typesChristoph Hellwig2-14/+6
For a long time we've always stored bmap btree records in the 64bit format, so kill off the dead 32bit type, and make sure the 64bit type is named just xfs_bmbt_rec everywhere, without any size postfix. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
2009-12-16xfs: improve metadata I/O merging in the elevatorDave Chinner4-1/+9
Change all async metadata buffers to use [READ|WRITE]_META I/O types so that the I/O doesn't get issued immediately. This allows merging of adjacent metadata requests but still prioritises them over bulk data. This shows a 10-15% improvement in sequential create speed of small files. Don't include the log buffers in this classification - leave them as sync types so they are issued immediately. Signed-off-by: Dave Chinner <dgc@sgi.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
2009-12-16ACPI processor: Fix section mismatch for processor_add()Thomas Renninger1-1/+1
Due to the merge of processor_start() (declared with __cpuinit) into processor_add(), a section mismatch warning appears: WARNING: drivers/built-in.o(.text+0x4d59d): Section mismatch in reference from the function acpi_processor_add() to the function .cpuinit.text:acpi_processor_power_init() ... This patch fixes the warning by declaring processor_add() as __cpuinit and also declares acpi_processor_add_fs() as __cpuinit as it is only used in acpi_processor_add(). Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16xfs: check for not fully initialized inodes in xfs_ireclaimChristoph Hellwig1-4/+8
Add an assert for inodes not added to the inode cache in xfs_ireclaim, to make sure we're not going to introduce something like the famous nfsd inode cache bug again. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
2009-12-16ACPI: Add platform-wide _OSC support.Shaohua Li2-0/+33
Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16ACPI: cleanup pci_root _OSC code.Shaohua Li2-64/+17
Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16ACPI: Add a generic API for _OSC -v2Shaohua Li2-0/+131
v2->v1: .improve debug info as suggedted by Bjorn,Kenji .API is using uuid string as suggested by Alexey Add an API to execute _OSC. A lot of devices can have this method, so add a generic API. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16msi-wmi: depend on backlight and fix corner-cases problemsAnisse Astier2-8/+16
Now depends on BACKLIGHT_CLASS_DEVICE. Driver will return an error if it can't get actual backlight value Fix remapping of brightness keys when backlight is not controlled by ACPI. Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16msi-wmi: switch to using input sparse keymap libraryAnisse Astier2-102/+33
Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16msi-wmi: replace one-condition switch-case with if statementAnisse Astier1-9/+4
Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16msi-wmi: remove unused field 'instance' in key_entry structureAnisse Astier1-5/+4
Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16msi-wmi: remove custom runtime debug implementationAnisse Astier1-9/+2
Rely on DYNAMIC_DEBUG instead if needed Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16msi-wmi: rework initAnisse Astier1-29/+35
There should be less code duplication with usage of gotos Driver won't load if there's no hardware to control Safer error handling at input driver allocation Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16msi-wmi: remove useless includesAnisse Astier1-6/+0
Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16X86 drivers: Introduce msi-wmi driverThomas Renninger3-0/+380
This driver serves backlight (including switching) and volume up/down keys for MSI machines providing a specific wmi interface: 551A1F84-FBDD-4125-91DB-3EA8F44F1D45 B6F3EEF2-3D2F-49DC-9DE3-85BCE18C62F2 Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Carlos Corbacho <carlos@strangeworlds.co.uk> CC: Matthew Garrett <mjg59@srcf.ucam.org> Tested-by: Matt Chen <machen@novell.com> Reviewed-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-16perf record: Use per-task-per-cpu events for inherited eventsPeter Zijlstra1-2/+2
Create events with a pid and cpu contraint for inherited events so that we get a stream per cpu, instead of all cpus contending on a single stream. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: fweisbec@gmail.com Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20091216165904.987643843@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-16perf record: Properly synchronize child creationPeter Zijlstra1-38/+71
Remove that ugly usleep and provide proper serialization between parent and child just like perf-stat does. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: fweisbec@gmail.com Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20091216165904.908184135@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-16perf events: Allow per-task-per-cpu countersPeter Zijlstra1-4/+7
In order to allow for per-task-per-cpu counters, useful for scalability when profiling task hierarchies, we allow installing events with event->cpu != -1 in task contexts. __perf_event_sched_in() already skips events where ->cpu mis-matches the current cpu, fix up __perf_install_in_context() and __perf_event_enable() to also respect this filter. This does lead to vary hard to interpret enabled/running times for such counters, but I don't see a simple solution for that. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: fweisbec@gmail.com Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20091216165904.831451147@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-16perf diff: Percent calcs should use double valuesArnaldo Carvalho de Melo1-4/+5
Otherwise we do integer math and the delta values round up to multiples of 1.0%. Also, calculate absolute values. Things look precise now: $ perf report -i perf.data.old --sort dso,symbol | head -13 9.02% libc-2.10.1.so [.] _IO_vfprintf_internal 4.88% find [.] 0x00000000014af0 2.91% [kernel] [k] __kmalloc 2.85% [kernel] [k] ext4_htree_store_dirent 2.50% libc-2.10.1.so [.] __GI_memmove 2.44% [kernel] [k] half_md4_transform 2.43% [kernel] [k] _spin_lock 2.33% [kernel] [k] system_call $ perf report -i perf.data --sort dso,symbol | head -13 8.55% libc-2.10.1.so [.] _IO_vfprintf_internal 3.11% [kernel] [k] __kmalloc 3.07% [kernel] [k] ext4_htree_store_dirent 2.66% find [.] 0x00000000016bcf 2.61% [kernel] [k] _atomic_dec_and_lock 2.46% [kernel] [k] half_md4_transform 2.41% libc-2.10.1.so [.] __GI_memmove 2.30% find [.] 0x00000000009219 $ perf diff | head -13 9.02% -0.47% libc-2.10.1.so [.] _IO_vfprintf_internal 2.91% +0.20% [kernel] [k] __kmalloc 2.85% +0.23% [kernel] [k] ext4_htree_store_dirent 1.99% +0.62% [kernel] [k] _atomic_dec_and_lock 2.44% +0.02% [kernel] [k] half_md4_transform 2.50% -0.09% libc-2.10.1.so [.] __GI_memmove 1.88% +0.01% [kernel] [k] __d_lookup 2.43% -0.75% [kernel] [k] _spin_lock 0.97% +0.62% [kernel] [k] path_get 1.99% -0.42% libc-2.10.1.so [.] _int_malloc $ Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1260981109-2621-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-16direct I/O fallback sync simplificationChristoph Hellwig1-14/+1
In the case of direct I/O falling back to buffered I/O we sync data twice currently: once at the end of generic_file_buffered_write using filemap_write_and_wait_range and once a little later in __generic_file_aio_write using do_sync_mapping_range with all flags set. The wait before write of the do_sync_mapping_range call does not make any sense, so just keep the filemap_write_and_wait_range call and move it to the right spot. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16ocfs: stop using do_sync_mapping_rangeChristoph Hellwig1-2/+2
do_sync_mapping_range(..., SYNC_FILE_RANGE_WRITE) is a very awkward way to perform a filemap_fdatawrite_range. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16cleanup blockdev_direct_IO lockingChristoph Hellwig4-134/+71
Currently the locking in blockdev_direct_IO is a mess, we have three different locking types and very confusing checks for some of them. The most complicated one is DIO_OWN_LOCKING for reads, which happens to not actually be used. This patch gets rid of the DIO_OWN_LOCKING - as mentioned above the read case is unused anyway, and the write side is almost identical to DIO_NO_LOCKING. The difference is that DIO_NO_LOCKING always sets the create argument for the get_blocks callback to zero, but we can easily move that to the actual get_blocks callbacks. There are four users of the DIO_NO_LOCKING mode: gfs already ignores the create argument and thus is fine with the new version, ocfs2 only errors out if create were ever set, and we can remove this dead code now, the block device code only ever uses create for an error message if we are fully beyond the device which can never happen, and last but not least XFS will need the new behavour for writes. Now we can replace the lock_type variable with a flags one, where no flag means the DIO_NO_LOCKING behaviour and DIO_LOCKING is kept as the first flag. Separate out the check for not allowing to fill holes into a separate flag, although for now both flags always get set at the same time. Also revamp the documentation of the locking scheme to actually make sense. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16make generic_acl slightly more genericChristoph Hellwig6-257/+109
Now that we cache the ACL pointers in the generic inode all the generic_acl cruft can go away and generic_acl.c can directly implement xattr handlers dealing with the full Posix ACL semantics for in-memory filesystems. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16sanitize xattr handler prototypesChristoph Hellwig39-815/+533
Add a flags argument to struct xattr_handler and pass it to all xattr handler methods. This allows using the same methods for multiple handlers, e.g. for the ACL methods which perform exactly the same action for the access and default ACLs, just using a different underlying attribute. With a little more groundwork it'll also allow sharing the methods for the regular user/trusted/secure handlers in extN, ocfs2 and jffs2 like it's already done for xfs in this patch. Also change the inode argument to the handlers to a dentry to allow using the handlers mechnism for filesystems that require it later, e.g. cifs. [with GFS2 bits updated by Steven Whitehouse <swhiteho@redhat.com>] Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: James Morris <jmorris@namei.org> Acked-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16libfs: move EXPORT_SYMBOL for d_alloc_nameH Hartley Sweeten2-1/+1
The EXPORT_SYMBOL for d_alloc_name is in fs/libfs.c but the function is in fs/dcache.c. Move the EXPORT_SYMBOL to the line immediately after the closing function brace line in fs/dcache.c as mentioned in Documentation/CodingStyle. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16vfs: force reval of target when following LAST_BIND symlinks (try #7)Jeff Layton1-0/+45
procfs-style symlinks return a last_type of LAST_BIND without an actual path string. This causes __follow_link to skip calling __vfs_follow_link and so the dentry isn't revalidated. This is a problem when the link target sits on NFSv4 as it depends on the VFS to revalidate the dentry before using it on an open call. Ensure that this occurs by forcing a revalidation of the target dentry of LAST_BIND symlinks. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16ima: limit imbalance msgMimi Zohar1-9/+53
Limit the number of imbalance messages to once per filesystem type instead of once per system boot. (it's actually slightly racy and could give you a couple per fs, but this isn't a real issue) Signed-off-by: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16Untangling ima mess, part 3: kill dead code in imaAl Viro4-62/+9
Kill the 'update' argument of ima_path_check(), kill dead code in ima. Current rules: ima counters are bumped at the same time when the file switches from put_filp() fodder to fput() one. Which happens exactly in two places - alloc_file() and __dentry_open(). Nothing else needs to do that at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16Untangling ima mess, part 2: deal with countersAl Viro6-43/+28
* do ima_get_count() in __dentry_open() * stop doing that in followups * move ima_path_check() to right after nameidata_to_filp() * don't bump counters on it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16Untangling ima mess, part 1: alloc_file()Al Viro4-6/+2
There are 2 groups of alloc_file() callers: * ones that are followed by ima_counts_get * ones giving non-regular files So let's pull that ima_counts_get() into alloc_file(); it's a no-op in case of non-regular files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16O_TRUNC open shouldn't fail after file truncationAl Viro1-53/+56
* take truncate logics into a helper (handle_truncate()) * rip it out of may_open() * call it from the only caller of may_open() that might pass O_TRUNC * and do that after we'd finished with opening. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16ima: call ima_inode_free ima_inode_freeEric Paris2-5/+2
ima_inode_free() has some funky #define just to confuse the crap out of me. void ima_iint_delete(struct inode *inode) and then things actually call ima_inode_free() and nothing calls ima_iint_delete(). Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16IMA: clean up the IMA counts updating codeEric Paris2-49/+70
We currently have a lot of duplicated code around ima file counts. Clean that all up. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16ima: only insert at inode creation timeEric Paris3-66/+14
iints are supposed to be allocated when an inode is allocated (during security_inode_alloc()) But we have code which will attempt to allocate an iint during measurement calls. If we couldn't allocate the iint and we cared, we should have died during security_inode_alloc(). Not make the code more complex and less efficient. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16ima: valid return code from ima_inode_allocEric Paris1-3/+1
ima_inode_alloc returns 0 and 1, but the LSM hooks expects an errno. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16fs: move get_empty_filp() deffinition to internal.hEric Paris5-1/+7
All users outside of fs/ of get_empty_filp() have been removed. This patch moves the definition from the include/ directory to internal.h so no new users crop up and removes the EXPORT_SYMBOL. I'd love to see open intents stop using it too, but that's a problem for another day and a smarter developer! Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16Sanitize exec_permission_lite()Al Viro1-9/+8
Use the sucker in other places in pathname resolution that check MAY_EXEC for directories; lose the _lite from name, it's equivalent of full-blown inode_permission() for its callers (albeit still lighter, since large parts of generic_permission() do not apply for pure MAY_EXEC). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16Kill cached_lookup() and real_lookup()Al Viro1-87/+66
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16Kill path_lookup_open()Al Viro1-32/+16
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16Take hash recalculation into do_lookup()Al Viro1-17/+11
Both callers of do_lookup() do the same thing before it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16fix mismerge with Trond's stuff (create_mnt_ns() export is gone now)Al Viro3-11/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16switch cachefiles to kern_path()Al Viro1-7/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16fix the crap in dst/dcoreAl Viro1-41/+5
* don't reinvent the wheels, please - open_bdev_exclusive() is there for purpose * both open_by_devnum() and open_bdev_exclusive() return ERR_PTR(...) upon error, not NULL Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16kill __link_path_walk()/link_path_walk() distinctionAl Viro1-34/+34
put retry logics into path_walk() and do_filp_open() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16lift path_put(path) to callers of __do_follow_link()Al Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-16switch create_read_pipe() to alloc_file()Al Viro1-9/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>