aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-01-10netdev: bfin_mac: let boards set vlan masksMike Frysinger3-0/+11
Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-10netdev: bfin_mac: disable hardware checksum if writeback cache is enabledSonic Zhang1-0/+7
With writeback caches, corrupted RX packets will be sent up the stack without any error markings. Signed-off-by: Sonic Zhang <[email protected]> Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-10netdev: bfin_mac: drop unused Mac dataMike Frysinger1-1/+0
We don't use this local "Mac" data anywhere (since we rely on the netdev's storage), so punt it. Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-10netdev: bfin_mac: mark setup_system_regs as staticMike Frysinger1-1/+1
No need for this to be exported since it is only used in this driver. Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-10netdev: bfin_mac: clean up printk messagesMike Frysinger1-36/+29
Use netdev_* and pr_* helper funcs for output rather than printk. Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-01-10i2c: Constify i2c_client where possibleJean Delvare3-31/+37
Helper functions for I2C and SMBus transactions don't modify the i2c_client that is passed to them, so it can be marked const. Signed-off-by: Jean Delvare <[email protected]>
2011-01-10i2c-algo-bit: Complain about masters which can't read SCLJean Delvare1-2/+12
The I2C specification explicitly describes both SDA and SCL as bidirectional lines. An I2C master with a read-only SCL is thus not compliant. If a slow slave stretches the clock, errors will happen, so the bus can't be considered as reliable. Signed-off-by: Jean Delvare <[email protected]>
2011-01-10i2c-algo-bit: Refactor adapter registrationJean Delvare1-16/+5
Use a function pointer to decide whether to call i2c_add_adapter or i2c_add_numbered_adapter. This makes the code more compact than the current strategy of having the common code in a separate function. Signed-off-by: Jean Delvare <[email protected]>
2011-01-10i2c: Add generic I2C multiplexer using GPIO APIPeter Korsgaard6-0/+308
Add an i2c mux driver providing access to i2c bus segments using a hardware MUX sitting on a master bus and controlled through gpio pins. E.G. something like: ---------- ---------- Bus segment 1 - - - - - | | SCL/SDA | |-------------- | | | |------------| | | | | | Bus segment 2 | | | Linux | GPIO 1..N | MUX |--------------- Devices | |------------| | | | | | | | Bus segment M | | | |---------------| | ---------- ---------- - - - - - SCL/SDA of the master I2C bus is multiplexed to bus segment 1..M according to the settings of the GPIO pins 1..N. Signed-off-by: Peter Korsgaard <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2011-01-10i2c-nforce2: Remove unnecessary cast of pci_get_drvdataJoe Perches1-1/+1
Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2011-01-10i2c-i801: Include <linux/slab.h>Ben Hutchings1-0/+1
Commit 5a0e3ad6af8660be21ca98a971cd00f331318c05 added direct inclusion of <linux/slab.h> to those source files that appeared to need it, but somehow missed this. On most architectures <linux/slab.h> is still indirectly included, but there are exceptions such as alpha. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2011-01-10IB/srp: consolidate hot-path variables into cache linesDavid Dillow2-17/+26
Put the variables accessed together in the hot-path into common cachelines, and separate them by RW vs RO to avoid false dirtying. We keep a local copy of the lkey and rkey in the target to avoid traversing pointers (and associated cache lines) to find them. Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: David Dillow <[email protected]>
2011-01-10IB/srp: stop sharing the host lock with SCSIBart Van Assche2-23/+25
We don't need protection against the SCSI stack, so use our own lock to allow parallel progress on separate CPUs. Signed-off-by: Bart Van Assche <[email protected]> [ broken out and small cleanups by David Dillow ] Signed-off-by: David Dillow <[email protected]>
2011-01-10IB/srp: reduce lock coverage of command completionBart Van Assche1-23/+14
We only need the lock to cover list and credit manipulations, so push those into srp_remove_req() and update the call chains. We reorder the request removal and command completion in srp_process_rsp() to avoid the SCSI mid-layer sending another command before we've released our request and added any credits returned by the target. This prevents us from returning HOST_BUSY unneccesarily. Signed-off-by: Bart Van Assche <[email protected]> [ broken out, small cleanups, and modified to avoid potential extraneous HOST_BUSY returns by David Dillow ] Signed-off-by: David Dillow <[email protected]>
2011-01-10IB/srp: reduce local coverage for command submission and EHBart Van Assche2-58/+67
We only need locks to protect our lists and number of credits available. By pre-consuming the credit for the request, we can reduce our lock coverage to just those areas. If we don't actually send the request, we'll need to put the credit back into the pool. Signed-off-by: Bart Van Assche <[email protected]> [ broken out and small cleanups by David Dillow ] Signed-off-by: David Dillow <[email protected]>
2011-01-10IB/srp: don't move active requests to their own listBart Van Assche2-11/+13
We use req->scmnd != NULL to indicate an active request, so there's no need to keep a separate list for them. We can afford the array iteration during error handling, and dropping it gives us one less item that needs lock protection. Signed-off-by: Bart Van Assche <[email protected]> [ broken out and small cleanups by David Dillow ] Signed-off-by: David Dillow <[email protected]>
2011-01-10staging: speakup: fix failure handlingWilliam Hubbs2-15/+27
fix the failure handling in kobjects and the main function so that we release the virtual keyboard if we exit due to another failure. Signed-off-by: William Hubbs <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-01-10staging: usbip: remove double giveback of URBMárton Németh1-14/+0
In the vhci_urb_dequeue() function the TCP connection is checked twice. Each time when the TCP connection is closed the URB is unlinked and given back. Remove the second attempt of unlinking and giving back of the URB completely. This patch fixes the bug described at https://bugzilla.kernel.org/show_bug.cgi?id=24872 . Signed-off-by: Márton Németh <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-01-10Merge branch 'bugfixes' into nfs-for-2.6.38Trond Myklebust423-3089/+4288
Conflicts: fs/nfs/nfs2xdr.c fs/nfs/nfs3xdr.c fs/nfs/nfs4xdr.c
2011-01-10NFS: Don't use vm_map_ram() in readdirTrond Myklebust6-73/+148
vm_map_ram() is not available on NOMMU platforms, and causes trouble on incoherrent architectures such as ARM when we access the page data through both the direct and the virtual mapping. The alternative is to use the direct mapping to access page data for the case when we are not crossing a page boundary, but to copy the data into a linear scratch buffer when we are accessing data that spans page boundaries. Signed-off-by: Trond Myklebust <[email protected]> Tested-by: Marc Kleine-Budde <[email protected]> Cc: [email protected] [2.6.37]
2011-01-10Merge branch 'for-linus' of ↵Linus Torvalds37-1074/+3914
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (30 commits) MAINTAINERS: Add tomoyo-dev-en ML. SELinux: define permissions for DCB netlink messages encrypted-keys: style and other cleanup encrypted-keys: verify datablob size before converting to binary trusted-keys: kzalloc and other cleanup trusted-keys: additional TSS return code and other error handling syslog: check cap_syslog when dmesg_restrict Smack: Transmute labels on specified directories selinux: cache sidtab_context_to_sid results SELinux: do not compute transition labels on mountpoint labeled filesystems This patch adds a new security attribute to Smack called SMACK64EXEC. It defines label that is used while task is running. SELinux: merge policydb_index_classes and policydb_index_others selinux: convert part of the sym_val_to_name array to use flex_array selinux: convert type_val_to_struct to flex_array flex_array: fix flex_array_put_ptr macro to be valid C SELinux: do not set automatic i_ino in selinuxfs selinux: rework security_netlbl_secattr_to_sid SELinux: standardize return code handling in selinuxfs.c SELinux: standardize return code handling in selinuxfs.c SELinux: standardize return code handling in policydb.c ...
2011-01-10netfilter: x_tables: dont block BH while reading countersEric Dumazet5-99/+49
Using "iptables -L" with a lot of rules have a too big BH latency. Jesper mentioned ~6 ms and worried of frame drops. Switch to a per_cpu seqlock scheme, so that taking a snapshot of counters doesnt need to block BH (for this cpu, but also other cpus). This adds two increments on seqlock sequence per ipt_do_table() call, its a reasonable cost for allowing "iptables -L" not block BH processing. Reported-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> CC: Patrick McHardy <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
2011-01-10ext2: Resolve 'dereferencing pointer to incomplete type' when enabling ↵Josh Hunt2-12/+11
EXT2_XATTR_DEBUG When I enable EXT2_XATTR_DEBUG in fs/ext2/xattr.c I get a build error stating the following: CC fs/ext2/xattr.o fs/ext2/xattr.c: In function 'ext2_xattr_cache_insert': fs/ext2/xattr.c:841: error: dereferencing pointer to incomplete type fs/ext2/xattr.c:846: error: dereferencing pointer to incomplete type make[2]: *** [fs/ext2/xattr.o] Error 1 make[1]: *** [fs/ext2] Error 2 make: *** [fs] Error 2 These lines reference ext2_xattr_cache->c_entry_count which is defined in struct mb_cache. struct mb_cache is currently only defined in fs/mbcache.c. Moving struct mb_cache definition to include/linux/mbcache.h to resolve the issue. Signed-off-by: Josh Hunt <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-01-10ext3: Remove redundant unlikely()Tobias Klauser1-1/+1
IS_ERR() already implies unlikely(), so it can be omitted here. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-01-10ext2: Remove redundant unlikely()Tobias Klauser1-1/+1
IS_ERR() already implies unlikely(), so it can be omitted here. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-01-10ext3: speed up file creates by optimizing rec_len functionsEric Sandeen2-7/+17
The addition of 64k block capability in the rec_len_from_disk and rec_len_to_disk functions added a bit of math overhead which slows down file create workloads needlessly when the architecture cannot even support 64k blocks, thanks to page size limits. Similar changes already exist in the ext4 codebase. The directory entry checking can also be optimized a bit by sprinkling in some unlikely() conditions to move the error handling out of line. bonnie++ sequential file creates on a 512MB ramdisk speeds up from about 77,000/s to about 82,000/s, about a 6% improvement. Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-01-10ext2: speed up file creates by optimizing rec_len functionsEric Sandeen1-5/+14
The addition of 64k block capability in the rec_len_from_disk and rec_len_to_disk functions added a bit of math overhead which slows down file create workloads needlessly when the architecture cannot even support 64k blocks, thanks to page size limits. The directory entry checking can also be optimized a bit by sprinkling in some unlikely() conditions to move the error handling out of line. bonnie++ sequential file creates on a 512MB ramdisk speeds up from about 2200/s to about 2500/s, about a 14% improvement. Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-01-10ext3: Add more journal error checkNamhyung Kim2-3/+7
Check return value of ext3_journal_get_write_acccess() and ext3_journal_dirty_metadata(). Signed-off-by: Namhyung Kim <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-01-10ext3: Add journal error check in resize.cNamhyung Kim1-14/+51
Check return value of ext3_journal_get_write_access() and ext3_journal_dirty_metadata(). Signed-off-by: Namhyung Kim <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-01-10quota: Use %pV and __attribute__((format (printf in __quota_error and fix ↵Joe Perches3-13/+19
fallout Use %pV in __quota_error so a single printk can not be interleaved with other logging messages. Add __attribute__((format (printf, 3, 4))) so format and arguments can be verified by compiler. Make sure printk formats and arguments match. Block # needed a pointer dereference. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-01-10ext3: Add FITRIM handlingLukas Czerner1-0/+22
The ioctl takes fstrim_range structure (defined in include/linux/fs.h) as an argument specifying a range of filesystem to trim and the minimum size of an continguous extent to trim. After the FITRIM is done, the number of bytes passed from the filesystem down the block stack to the device for potential discard is stored in fstrim_range.len. This number is a maximum discard amount from the storage device's perspective, because FITRIM called repeatedly will keep sending the same sectors for discard. fstrim_range.len will report the same potential discard bytes each time, but only sectors which had been written to between the discards would actually be discarded by the storage device. Further, the kernel block layer reserves the right to adjust the discard ranges to fit raid stripe geometry, non-trim capable devices in a LVM setup, etc. These reductions would not be reflected in fstrim_range.len. Thus fstrim_range.len can give the user better insight on how much storage space has potentially been released for wear-leveling, but it needs to be one of only one criteria the userspace tools take into account when trying to optimize calls to FITRIM. Thanks to Greg Freemyer <[email protected]> for better commit message. Signed-off-by: Lukas Czerner <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-01-10ext3: Add batched discard support for ext3Lukas Czerner2-0/+267
Walk through allocation groups and trim all free extents. It can be invoked through FITRIM ioctl on the file system. The main idea is to provide a way to trim the whole file system if needed, since some SSD's may suffer from performance loss after the whole device was filled (it does not mean that fs is full!). It search for free extents in allocation groups specified by Byte range start -> start+len. When the free extent is within this range, blocks are marked as used and then trimmed. Afterwards these blocks are marked as free in per-group bitmap. [JK: Fixed up error handling and trimming of a single group] Signed-off-by: Lukas Czerner <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Dmitry Monakhov <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-01-10ext4: don't pass entire map to check_eofblocks_flEric Sandeen1-6/+7
Since check_eofblocks_fl() only uses the m_lblk portion of the map structure, we may as well pass that directly, rather than passing the entire map, which IMHO obfuscates what parameters check_eofblocks_fl() cares about. Not a big deal, but seems tidier and less confusing, to me. Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: fix memory leak in ext4_free_branchesTheodore Ts'o1-0/+1
Commit 40389687 moved a call to ext4_forget() out of ext4_free_branches and let ext4_free_blocks() handle calling bforget(). But that change unfortunately did not replace the call to ext4_forget() with brelse(), which was needed to drop the in-use count of the indirect block's buffer head, which lead to a memory leak when deleting files that used indirect blocks. Fix this. Thanks to Hugh Dickins for pointing this out. Cc: [email protected] Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: remove ext4_mb_return_to_preallocation()Theodore Ts'o1-14/+0
This function was never implemented, except for a BUG_ON which was tripping when ext4 is run without a journal. The problem is that although the comment asserts that "truncate (which is the only way to free block) discards all preallocations", ext4_free_blocks() is also called in various error recovery paths when blocks have been allocated, but for various reasons, we were not able to use those data blocks (for example, because we ran out of memory while trying to manipulate the extent tree, or some other similar situation). In addition to the fact that this function isn't implemented except for the incorrect BUG_ON, the single caller of this function, ext4_free_blocks(), doesn't use it all if the journal is enabled. So remove the (stub) function entirely for now. If we decide it's better to add it back, it's only going to be useful with a relatively large number of code changes anyway. Google-Bug-Id: 3236408 Cc: Jiaying Zhang <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: flush the i_completed_io_list during ext4_truncateJiaying Zhang3-2/+9
Ted first found the bug when running 2.6.36 kernel with dioread_nolock mount option that xfstests #13 complained about wrong file size during fsck. However, the bug exists in the older kernels as well although it is somehow harder to trigger. The problem is that ext4_end_io_work() can happen after we have truncated an inode to a smaller size. Then when ext4_end_io_work() calls ext4_convert_unwritten_extents(), we may reallocate some blocks that have been truncated, so the inode size becomes inconsistent with the allocated blocks. The following patch flushes the i_completed_io_list during truncate to reduce the risk that some pending end_io requests are executed later and convert already truncated blocks to initialized. Note that although the fix helps reduce the problem a lot there may still be a race window between vmtruncate() and ext4_end_io_work(). The fundamental problem is that if vmtruncate() is called without either i_mutex or i_alloc_sem held, it can race with an ongoing write request so that the io_end request is processed later when the corresponding blocks have been truncated. Ted and I have discussed the problem offline and we saw a few ways to fix the race completely: a) We guarantee that i_mutex lock and i_alloc_sem write lock are both hold whenever vmtruncate() is called. The i_mutex lock prevents any new write requests from entering writeback and the i_alloc_sem prevents the race from ext4_page_mkwrite(). Currently we hold both locks if vmtruncate() is called from do_truncate(), which is probably the most common case. However, there are places where we may call vmtruncate() without holding either i_mutex or i_alloc_sem. I would like to ask for other people's opinions on what locks are expected to be held before calling vmtruncate(). There seems a disagreement among the callers of that function. b) We change the ext4 write path so that we change the extent tree to contain the newly allocated blocks and update i_size both at the same time --- when the write of the data blocks is completed. c) We add some additional locking to synchronize vmtruncate() and ext4_end_io_work(). This approach may have performance implications so we need to be careful. All of the above proposals may require more substantial changes, so we may consider to take the following patch as a bandaid. Signed-off-by: Jiaying Zhang <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: add error checking to calls to ext4_handle_dirty_metadata()Theodore Ts'o3-28/+89
Call ext4_std_error() in various places when we can't bail out cleanly, so the file system can be marked as in error. Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ux500: allow 5500 and 8500 to be built togetherRabin Vincent2-12/+18
Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2011-01-10ux500: modem_irq is only for 5500Rabin Vincent1-0/+5
Signed-off-by: Rabin Vincent <[email protected]> [Modified to hit the right file] Signed-off-by: Linus Walleij <[email protected]>
2011-01-10ux500: dynamic SOC detectionRabin Vincent8-136/+212
Dynamically detect the DBx500 SOC an revision based on the ASIC ID. Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2011-01-10ux500: rename MOP board KconfigRabin Vincent2-2/+2
Rename the MOP board Kconfig entries to the same name as the machine type, so that the machine_is_*() macros work correctly. Signed-off-by: Rabin Vincent <[email protected]> [Updated to match changes in the tree] Signed-off-by: Linus Walleij <[email protected]>
2011-01-10ux500: remove build-time changing macrosRabin Vincent9-117/+123
To allow the possiblity of building U8500 and U5500 support in the same image. Signed-off-by: Rabin Vincent <[email protected]> [Rebased to latest changes in Russells tree] Signed-off-by: Linus Walleij <[email protected]>
2011-01-10ext4: fix trimming of a single groupJan Kara1-1/+1
When ext4_trim_fs() is called to trim a part of a single group, the logic will wrongly set last block of the interval to 'len' instead of 'first_block + len'. Thus a shorter interval is possibly trimmed. Fix it. CC: Lukas Czerner <[email protected]> Cc: [email protected] Signed-off-by: Jan Kara <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: fix uninitialized variable in ext4_register_li_requestAndrew Morton1-1/+1
fs/ext4/super.c: In function 'ext4_register_li_request': fs/ext4/super.c:2936: warning: 'ret' may be used uninitialized in this function It looks buggy to me, too. Cc: Lukas Czerner <[email protected]> Cc: [email protected] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: dynamically allocate the jbd2_inode in ext4_inode_info as necessaryTheodore Ts'o7-25/+74
Replace the jbd2_inode structure (which is 48 bytes) with a pointer and only allocate the jbd2_inode when it is needed --- that is, when the file system has a journal present and the inode has been opened for writing. This allows us to further slim down the ext4_inode_info structure. Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: drop i_state_flags on architectures with 64-bit longsTheodore Ts'o3-9/+25
We can store the dynamic inode state flags in the high bits of EXT4_I(inode)->i_flags, and eliminate i_state_flags. This saves 8 bytes from the size of ext4_inode_info structure, which when multiplied by the number of the number of in the inode cache, can save a lot of memory. Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: reorder ext4_inode_info structure elements to remove unneeded paddingTheodore Ts'o1-3/+4
By reordering the elements in the ext4_inode_info structure, we can reduce the padding needed on an x86_64 system by 16 bytes. Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: drop ec_type from the ext4_ext_cache structureTheodore Ts'o3-28/+18
We can encode the ec_type information by using ee_len == 0 to denote EXT4_EXT_CACHE_NO, ee_start == 0 to denote EXT4_EXT_CACHE_GAP, and if neither is true, then the cache type must be EXT4_EXT_CACHE_EXTENT. This allows us to reduce the size of ext4_ext_inode by another 8 bytes. (ec_type is 4 bytes, plus another 4 bytes of padding) Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: use ext4_lblk_t instead of sector_t for logical blocksTheodore Ts'o4-5/+5
This fixes a number of places where we used sector_t instead of ext4_lblk_t for logical blocks, which for ext4 are still 32-bit data types. No point wasting space in the ext4_inode_info structure, and requiring 64-bit arithmetic on 32-bit systems, when it isn't necessary. Signed-off-by: "Theodore Ts'o" <[email protected]>
2011-01-10ext4: replace i_delalloc_reserved_flag with EXT4_STATE_DELALLOC_RESERVEDTheodore Ts'o5-8/+9
Remove the short element i_delalloc_reserved_flag from the ext4_inode_info structure and replace it a new bit in i_state_flags. Since we have an ext4_inode_info for every ext4 inode cached in the inode cache, any savings we can produce here is a very good thing from a memory utilization perspective. Signed-off-by: "Theodore Ts'o" <[email protected]>