]> asedeno.scripts.mit.edu Git - linux.git/log
linux.git
13 years agohwmon: (w83795) Get rid of VRLSB_SHIFT
Jean Delvare [Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)]
hwmon: (w83795) Get rid of VRLSB_SHIFT

VRLSB_SHIFT is a non-sense, the actual shift depends on the sensor
type (fans need 4, other sensors need 6). Get rid of it to prevent
any confusion. Also get rid of the useless masking, the meaningful
bits are always the MSb so there's nothing to mask out after
shifting.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Avoid reading the same register twice
Jean Delvare [Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)]
hwmon: (w83795) Avoid reading the same register twice

Shorten driver load time by avoiding duplicate register access during
initialization. This saves 112 ms on modprobe on my test system.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Rework beep_enable implementation
Jean Delvare [Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)]
hwmon: (w83795) Rework beep_enable implementation

Handle beep_enable just like all other beep bits. It doesn't need
anything special, so let's avoid redundant code. This also saves a
duplicate register read at initialization time.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Report PECI agent Tbase values
Jean Delvare [Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)]
hwmon: (w83795) Report PECI agent Tbase values

On systems with PECI, report PECI agent Tbase temperature values.
This is informative only.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Properly handle negative temperatures
Jean Delvare [Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)]
hwmon: (w83795) Properly handle negative temperatures

The temperature registers hold regular 2's complement values, no need
to add any arithmetics.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Rename temperature limit attributes
Jean Delvare [Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)]
hwmon: (w83795) Rename temperature limit attributes

Follow the standard for temperature limit attribute naming, so that
libsensors will pick the values.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Fix PWM duty cycle frequency attributes
Jean Delvare [Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)]
hwmon: (w83795) Fix PWM duty cycle frequency attributes

The PWM duty cycle frequenty attributes are improperly named
(fanN_div instead of pwmN_div) and contain raw values instead of
actual frequencies. Rename them and fix their contents.

Also improve the logic when the user asks for a new frequency, to
always pick the closest supported frequency. The algorithm could
certainly be optimized, but the operation is infrequent enough that
I don't think it's worth the effort.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Add support for dynamic in0-2 limits
Jean Delvare [Thu, 28 Oct 2010 18:31:46 +0000 (20:31 +0200)]
hwmon: (w83795) Add support for dynamic in0-2 limits

The W83795G can be configured to set the in0, in1 and/or in2 voltage
limits dynamically based on VID input pins. Switch the respective
sysfs attributes to read-only.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Fix LSB reading of fan speeds
Jean Delvare [Thu, 28 Oct 2010 18:31:46 +0000 (20:31 +0200)]
hwmon: (w83795) Fix LSB reading of fan speeds

Misplaced parentheses caused the wrong register value to be read,
resulting in random LSB for fan speed values and limits.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Clean up probe function
Jean Delvare [Thu, 28 Oct 2010 18:31:46 +0000 (20:31 +0200)]
hwmon: (w83795) Clean up probe function

* The data structure is zalloc'd, so no need to set individual fields
  to 0 explicitly.
* Refactor the handling of pins that can be used for either
  temperature or voltage monitoring.
* Misc other clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Fix in17-in20 gain factor
Jean Delvare [Thu, 28 Oct 2010 18:31:46 +0000 (20:31 +0200)]
hwmon: (w83795) Fix in17-in20 gain factor

Gain bit set means 1x gain and cleared means 8x gain, not the other
way around.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Only start monitoring if needed
Jean Delvare [Thu, 28 Oct 2010 18:31:46 +0000 (20:31 +0200)]
hwmon: (w83795) Only start monitoring if needed

This saves an SMBus write if monitoring was already enabled.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Add const markers
Jean Delvare [Thu, 28 Oct 2010 18:31:46 +0000 (20:31 +0200)]
hwmon: (w83795) Add const markers

Attribute structures can be made const. Same for the I2C address
list.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Only create fan[1-8]_target files when needed
Jean Delvare [Thu, 28 Oct 2010 18:31:46 +0000 (20:31 +0200)]
hwmon: (w83795) Only create fan[1-8]_target files when needed

Only create fan[1-8]_target files when the fan in question can be
controlled (PWM output is present.) Also name these files according
to the standard.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Move PWM attributes to a dedidated array
Jean Delvare [Thu, 28 Oct 2010 18:31:46 +0000 (20:31 +0200)]
hwmon: (w83795) Move PWM attributes to a dedidated array

Use a dedicated 2D array for PWM attributes. This way, PWM attributes
are handled the same way as other attributes, this is more consistent.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Use 2D arrays for many device attributes
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Use 2D arrays for many device attributes

Use 2D arrays for in, fan, temp and dts device attributes. Using
linear arrays is too risky as we have to skip some groups depending
on the device model and configuration. Adding or removing an
attribute would let the driver build silently but then it would crash
at runtime. With 2D arrays, the consistency checking happens at build
time, which is much safer.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Merge w83795_create_files and w83795_remove_files
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Merge w83795_create_files and w83795_remove_files

Functions w83795_create_files and w83795_remove_files iterate over
the same set of files, just calling a different function. Merge them
into a single function which takes the action as a parameter. This
saves code, and also ensure that file creation and deletion are in
sync.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Move file creation to a separate function too
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Move file creation to a separate function too

Function w83795_probe() is way too big, move file creation to a separate
function to make it more readable.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Move files removal to a separate function
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Move files removal to a separate function

Sysfs files must be removed on device removal but also when device
registration fails. Move the code to a separate function to avoid
code redundancy.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Improve detection routine
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Improve detection routine

Check for additional identification registers. Improve debugging
messages on failed detection.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Refactor bank selection
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Refactor bank selection

Move the bank selection code to a separate function, to avoid
duplicating it in read and write functions. Improve error reporting
on register access error.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Drop duplicate enum
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Drop duplicate enum

Enum chips and chip_types are redundant, get rid of the former. Fix
the detection code to properly identify the chip variant and name the
client accordingly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (w83795) Misc cleanups
Jean Delvare [Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)]
hwmon: (w83795) Misc cleanups

* Improve driver description.
* Drop unused macro.
* Drop unreachable code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: New driver for the W83795G/ADG monitoring chips
Wei Song [Thu, 28 Oct 2010 18:31:44 +0000 (20:31 +0200)]
hwmon: New driver for the W83795G/ADG monitoring chips

There is still much work needed, but I wanted to give Wei the credit
he deserves. I've merged some of my own fixes already, to make
gcc and checkpatch happy. Individual fixes and improvements from me
will follow.

[JD: Fix build errors]
[JD: Coding style cleanups]
[JD: Get rid of forward declarations]
[JD: Drop VID support]
[JD: Drop fault output control feature]
[JD: Use lowercase for inline function names]
[JD: Use strict variants of the strtol/ul functions]
[JD: Shorten the read and write function names]

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (s3c-hwmon) Depend on S3C_ADC
Maurus Cuelenaere [Thu, 28 Oct 2010 18:31:44 +0000 (20:31 +0200)]
hwmon: (s3c-hwmon) Depend on S3C_ADC

This way we don't need to modify Kconfig every time a new SoC comes along to
make this driver support it. Also fix some typos while I'm at it.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (s3c-hwmon) Use a real mutex
Thomas Gleixner [Thu, 28 Oct 2010 18:31:44 +0000 (20:31 +0200)]
hwmon: (s3c-hwmon) Use a real mutex

The semaphore which protects the ADC is semantically a mutex. Use a
real mutex.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm75) Trivial changes to pacify the checkpatch
Shubhrajyoti D [Thu, 28 Oct 2010 18:31:44 +0000 (20:31 +0200)]
hwmon: (lm75) Trivial changes to pacify the checkpatch

Some trivial changes to pacify the checkpatch.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm75) Make the writing to sysfs more robust
Shubhrajyoti D [Thu, 28 Oct 2010 18:31:44 +0000 (20:31 +0200)]
hwmon: (lm75) Make the writing to sysfs more robust

Currently we get the checkpatch warning
consider using strict_strtol in preference to simple_strtol.
Also we should not allow any partially numeric values.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Add support for the W83L771W/G
Jean Delvare [Thu, 28 Oct 2010 18:31:44 +0000 (20:31 +0200)]
hwmon: (lm90) Add support for the W83L771W/G

I was wondering if that chip ever existed publicly... Apparently yes,
so add support for it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (lm90) Add support for update_interval sysfs attribute
Guenter Roeck [Thu, 28 Oct 2010 18:31:44 +0000 (20:31 +0200)]
hwmon: (lm90) Add support for update_interval sysfs attribute

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Introduce capability flag to indicate broken ALERT functionality
Guenter Roeck [Thu, 28 Oct 2010 18:31:44 +0000 (20:31 +0200)]
hwmon: (lm90) Introduce capability flag to indicate broken ALERT functionality

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Introduce chip parameter structure
Guenter Roeck [Thu, 28 Oct 2010 18:31:43 +0000 (20:31 +0200)]
hwmon: (lm90) Introduce chip parameter structure

Instead of using switch/case and if statements in probe, define chip specific
functionality in a parameter structure array.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Rearrange code to no longer require forward declarations
Guenter Roeck [Thu, 28 Oct 2010 18:31:43 +0000 (20:31 +0200)]
hwmon: (lm90) Rearrange code to no longer require forward declarations

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Add support for max6695 and max6696
Guenter Roeck [Thu, 28 Oct 2010 18:31:43 +0000 (20:31 +0200)]
hwmon: (lm90) Add support for max6695 and max6696

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Add support for extra features of max6659
Guenter Roeck [Thu, 28 Oct 2010 18:31:43 +0000 (20:31 +0200)]
hwmon: (lm90) Add support for extra features of max6659

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Add explicit support for max6659
Guenter Roeck [Thu, 28 Oct 2010 18:31:43 +0000 (20:31 +0200)]
hwmon: (lm90) Add explicit support for max6659

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Simplify set_temp11 register calculations
Guenter Roeck [Thu, 28 Oct 2010 18:31:43 +0000 (20:31 +0200)]
hwmon: (lm90) Simplify set_temp11 register calculations

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Introduce function to delete sysfs files
Guenter Roeck [Thu, 28 Oct 2010 18:31:43 +0000 (20:31 +0200)]
hwmon: (lm90) Introduce function to delete sysfs files

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Introduce device feature bits
Guenter Roeck [Thu, 28 Oct 2010 18:31:43 +0000 (20:31 +0200)]
hwmon: (lm90) Introduce device feature bits

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (lm90) Fix checkpatch errors
Guenter Roeck [Thu, 28 Oct 2010 18:31:42 +0000 (20:31 +0200)]
hwmon: (lm90) Fix checkpatch errors

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: Add tempX_emergency attribute to sysfs ABI
Guenter Roeck [Thu, 28 Oct 2010 18:31:42 +0000 (20:31 +0200)]
hwmon: Add tempX_emergency attribute to sysfs ABI

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (k8temp) Remove superfluous CPU family check
Andreas Herrmann [Thu, 28 Oct 2010 18:31:42 +0000 (20:31 +0200)]
hwmon: (k8temp) Remove superfluous CPU family check

The family check in k8temp is not required because the driver is
already bound to a northbridge device only used with K8 CPUs.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agonuma: fix slab_node(MPOL_BIND)
Eric Dumazet [Wed, 27 Oct 2010 17:33:43 +0000 (19:33 +0200)]
numa: fix slab_node(MPOL_BIND)

When a node contains only HighMem memory, slab_node(MPOL_BIND)
dereferences a NULL pointer.

[ This code seems to go back all the way to commit 19770b32609b: "mm:
  filter based on a nodemask as well as a gfp_mask".  Which was back in
  April 2008, and it got merged into 2.6.26.  - Linus ]

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <cl@linux.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoStaging: brcm80211: fix usage of roundup in structures
Greg Kroah-Hartman [Thu, 28 Oct 2010 16:55:53 +0000 (09:55 -0700)]
Staging: brcm80211: fix usage of roundup in structures

Now that the roundup macro is sane, it can't be used in structure
definitions, or the build breaks..  For now, create a "broken_roundup()"
macro to get everything building again, but in the end, fixing these
structures to use a proper size value is the correct thing to do.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: fix up network device reference counting
Greg Kroah-Hartman [Thu, 28 Oct 2010 16:54:23 +0000 (09:54 -0700)]
Staging: bcm: fix up network device reference counting

The way network devices are reference counted does not include poking
around in the reference count itself.  This breaks when the reference
count is changed to be a different type.  Fix the driver to do the
proper function calls instead.

Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: keucr: fix up US_ macro change
Greg Kroah-Hartman [Thu, 28 Oct 2010 16:53:38 +0000 (09:53 -0700)]
Staging: keucr: fix up US_ macro change

The usb tree renamed the USB storage defines to make more sense, so this
driver needs the changes as well so that things will compile properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge 'staging-next' to Linus's tree
Greg Kroah-Hartman [Thu, 28 Oct 2010 16:44:56 +0000 (09:44 -0700)]
Merge 'staging-next' to Linus's tree

This merges the staging-next tree to Linus's tree and resolves
some conflicts that were present due to changes in other trees that were
affected by files here.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Thu, 28 Oct 2010 16:35:11 +0000 (09:35 -0700)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits)
  [media] af9015: Fix max I2C message size when used with tda18271
  [media] IR: initialize ir_raw_event in few more drivers
  [media] Guard a divide in v4l1 compat layer
  [media] imon: fix nomouse modprobe option
  [media] imon: remove redundant change_protocol call
  [media] imon: fix my egregious brown paper bag w/rdev/idev split
  [media] cafe_ccic: Configure ov7670 correctly
  [media] ov7670: allow configuration of image size, clock speed, and I/O method
  [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016]
  [media] af9015: map DigitalNow TinyTwin v2 remote
  [media] DigitalNow TinyTwin remote controller
  [media] af9015: RC fixes and improvements
  videodev2.h.xml: Update to reflect the latest changes at videodev2.h
  [media] v4l: document new Bayer and monochrome pixel formats
  [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028
  [media] firedtv: add parameter to fake ca_system_ids in CA_INFO
  [media] tm6000: fix a macro coding style issue
  tm6000: Remove some ugly debug code
  [media] Nova-S-Plus audio line input
  [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers
  ...

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Linus Torvalds [Thu, 28 Oct 2010 16:33:42 +0000 (09:33 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (66 commits)
  mmc: add new sdhci-pxa driver for Marvell SoCs
  mmc: make number of mmcblk minors configurable
  mmc_spi: Recover from CRC errors for r/w operation over SPI.
  mmc: sdhci-pltfm: add -pltfm driver for imx35/51
  mmc: sdhci-of-esdhc: factor out common stuff
  mmc: sdhci_pltfm: pass more data on custom init call
  mmc: sdhci: introduce get_ro private write-protect hook
  mmc: sdhci-pltfm: move .h file into appropriate subdir
  mmc: sdhci-pltfm: Add structure for host-specific data
  mmc: fix cb710 kconfig dependency warning
  mmc: cb710: remove debugging printk (info duplicated from mmc-core)
  mmc: cb710: clear irq handler on init() error path
  mmc: cb710: remove unnecessary msleep()
  mmc: cb710: implement get_cd() callback
  mmc: cb710: partially demystify clock selection
  mmc: add a file to debugfs for changing host clock at runtime
  mmc: sdhci: allow for eMMC 74 clock generation by controller
  mmc: sdhci: highspeed: check for mmc as well as sd cards
  mmc: sdhci: Add Moorestown device support
  mmc: sdhci: Intel Medfield support
  ...

13 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus
Linus Torvalds [Thu, 28 Oct 2010 16:32:05 +0000 (09:32 -0700)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus:
  hfsplus: free space correcly for files unlinked while open
  hfsplus: fix double lock typo in ioctl

13 years agoext4: fix compile with CONFIG_EXT4_FS_XATTR disabled
Ingo Molnar [Thu, 28 Oct 2010 07:56:31 +0000 (09:56 +0200)]
ext4: fix compile with CONFIG_EXT4_FS_XATTR disabled

Commit 5dabfc78dced ("ext4: rename {exit,init}_ext4_*() to
ext4_{exit,init}_*()") causes

  fs/ext4/super.c:4776: error: implicit declaration of function ‘ext4_init_xattr’

when CONFIG_EXT4_FS_XATTR is disabled.

It renamed init_ext4_xattr to ext4_init_xattr but forgot to update the
dummy definition in fs/ext4/xattr.h.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
Linus Torvalds [Thu, 28 Oct 2010 16:25:11 +0000 (09:25 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: (28 commits)
  net/9p: Return error on read with NULL buffer
  9p: Add datasync to client side TFSYNC/RFSYNC for dotl
  net/9p: Return error if we fail to encode protocol data
  fs/9p: Use generic_file_open with lookup_instantiate_filp
  fs/9p: Add missing iput in v9fs_vfs_lookup
  fs/9p: Use mknod 9p operation on create without open request
  net/9p: Add waitq to VirtIO transport.
  [net/9p]Serialize virtqueue operations to make VirtIO transport SMP safe.
  9p: Implement TREADLINK operation for 9p2000.L
  9p: Use V9FS_MAGIC in statfs
  9p: Implement TGETLOCK
  9p: Implement TLOCK
  [9p] Introduce client side TFSYNC/RFSYNC for dotl.
  [fs/9p] Add file_operations for cached mode in dotl protocol.
  fs/9p: Add access = client option to opt in acl evaluation.
  fs/9p: Implement create time inheritance
  fs/9p: Update ACL on chmod
  fs/9p: Implement setting posix acl
  fs/9p: Add xattr callbacks for POSIX ACL
  fs/9p: Implement POSIX ACL permission checking function
  ...

13 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
Linus Torvalds [Thu, 28 Oct 2010 16:24:14 +0000 (09:24 -0700)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  parisc: add tty driver to PDC console
  drivers/parisc/iosapic.c: Remove unnecessary kzalloc cast
  parisc: remove homegrown L1_CACHE_ALIGN macro
  arch/parisc: Removing undead ifdef CONFIG_PA20
  parisc: unwind - optimise linked-list searches for modules
  parisc: change to new flag variable
  drivers/char/agp/parisc-agp.c: eliminate memory leak
  parisc: kill __do_IRQ
  parisc: convert eisa interrupts to flow handlers
  parisc: convert gsc and dino pci interrupts to flow handlers
  parisc: convert suckyio interrupts to flow handlers
  parisc: convert iosapic interrupts to proper flow handlers
  parisc: convert cpu interrupts to proper flow handlers
  parisc: lay groundwork for killing __do_IRQ
  parisc: add prlimit64 syscall
  parisc: squelch warning when using dev_get_stats

13 years agommu_notifier.h: fix comment spelling
Figo.zhang [Tue, 26 Oct 2010 13:01:47 +0000 (21:01 +0800)]
mmu_notifier.h: fix comment spelling

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoFix install_process_keyring error handling
Andi Kleen [Thu, 28 Oct 2010 12:16:13 +0000 (13:16 +0100)]
Fix install_process_keyring error handling

Fix an incorrect error check that returns 1 for error instead of the
expected error code.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoparisc: fix compile failure with kmap_atomic changes
James Bottomley [Thu, 28 Oct 2010 15:14:41 +0000 (10:14 -0500)]
parisc: fix compile failure with kmap_atomic changes

Commit 3e4d3af501cc ("mm: stack based kmap_atomic()") overlooked the
fact that parisc uses kmap as a coherence mechanism, so even though we
have no highmem, we do need to supply our own versions of kmap (and
atomic).  This patch converts the parisc kmap to the form which is
needed to keep it compiling (it's a simple prototype and name change).

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Acked-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoFix compile brekage with !CONFIG_BLOCK
Ingo Molnar [Thu, 28 Oct 2010 14:39:24 +0000 (16:39 +0200)]
Fix compile brekage with !CONFIG_BLOCK

Today's git tree fails to build on !CONFIG_BLOCK, due to upstream commit
367a51a33902 ("fs: Add FITRIM ioctl"):

 include/linux/fs.h:36: error: expected specifier-qualifier-list before ‘uint64_t’
 include/linux/fs.h:36: error: expected specifier-qualifier-list before ‘uint64_t’
 include/linux/fs.h:36: error: expected specifier-qualifier-list before ‘uint64_t’

The commit adds uint64_t type usage to fs.h, but linux/types.h is not included
explicitly - it's only included implicitly via linux/blk_types.h, and there only if
CONFIG_BLOCK is enabled.

Add the explicit #include to fix this.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge git://git.infradead.org/battery-2.6
Linus Torvalds [Thu, 28 Oct 2010 15:35:15 +0000 (08:35 -0700)]
Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6:
  power_supply: Mark twl4030_charger as broken

13 years agonfs: testing the wrong variable
Dan Carpenter [Thu, 28 Oct 2010 06:05:57 +0000 (08:05 +0200)]
nfs: testing the wrong variable

The intent was to test "*desc" for allocation failures, but it tests
"desc" which is always a valid pointer here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agonfs: handle lock context allocation failures in nfs_create_request
Jeff Layton [Thu, 28 Oct 2010 14:10:37 +0000 (10:10 -0400)]
nfs: handle lock context allocation failures in nfs_create_request

nfs_get_lock_context can return NULL on an allocation failure.
Regression introduced by commit f11ac8db.

Reported-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoFixed Regression in NFS Direct I/O path
Steve Dickson [Thu, 28 Oct 2010 12:17:54 +0000 (08:17 -0400)]
Fixed Regression in NFS Direct I/O path

A typo, introduced by commit f11ac8db, in the nfs_direct_write()
routine causes writes with O_DIRECT set to fail with a ENOMEM error.

Found-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Thu, 28 Oct 2010 14:53:04 +0000 (07:53 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  cciss: remove overlapping PCI IDs
  block: cciss: fix information leak to userland
  drivers/block/aoe/aoeblk.c: ratelimit a warning printk
  drivers/block/z2ram.c: correct printing of sector_t
  aoe: don't use flush_scheduled_work()
  drivers/block/drbd/drbd_main.c: fix error path
  loop: Properly clear sysfs in autoclear mode

13 years agonet/9p: Return error on read with NULL buffer
Sanchit Garg [Wed, 27 Oct 2010 04:11:01 +0000 (09:41 +0530)]
net/9p: Return error on read with NULL buffer

This patch ensures that a read(fd, NULL, 10) returns  EFAULT on a 9p file.

Signed-off-by: Sanchit Garg <sancgarg@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: Add datasync to client side TFSYNC/RFSYNC for dotl
Venkateswararao Jujjuri (JV) [Fri, 22 Oct 2010 17:13:12 +0000 (10:13 -0700)]
9p: Add datasync to client side TFSYNC/RFSYNC for dotl

SYNOPSIS
    size[4] Tfsync tag[2] fid[4] datasync[4]

    size[4] Rfsync tag[2]

DESCRIPTION

    The Tfsync transaction transfers ("flushes") all modified in-core data of
    file identified by fid to the disk device (or other  permanent  storage
    device)  where that  file  resides.

    If datasync flag is specified data will be fleshed but does not flush
    modified metadata unless  that  metadata  is  needed  in order to allow a
    subsequent data retrieval to be correctly handled.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agonet/9p: Return error if we fail to encode protocol data
Aneesh Kumar K.V [Tue, 19 Oct 2010 03:47:02 +0000 (09:17 +0530)]
net/9p: Return error if we fail to encode protocol data

We need to return error in case we fail to encode data in protocol buffer.
This patch also return error in case of a failed copy_from_user.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Use generic_file_open with lookup_instantiate_filp
Aneesh Kumar K.V [Wed, 22 Sep 2010 07:12:30 +0000 (12:42 +0530)]
fs/9p: Use generic_file_open with lookup_instantiate_filp

We need to do O_LARGEFILE check even in case of 9p. Use the
generic_file_open helper

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Add missing iput in v9fs_vfs_lookup
Aneesh Kumar K.V [Wed, 22 Sep 2010 06:54:23 +0000 (12:24 +0530)]
fs/9p: Add missing iput in v9fs_vfs_lookup

Make sure we drop inode reference in the error path

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Use mknod 9p operation on create without open request
Aneesh Kumar K.V [Tue, 12 Oct 2010 07:32:25 +0000 (13:02 +0530)]
fs/9p: Use mknod 9p operation on create without open request

A create without LOOKUP_OPEN flag set is due to mknod of regular
files. Use mknod 9P operation for the same

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agonet/9p: Add waitq to VirtIO transport.
Venkateswararao Jujjuri (JV) [Thu, 30 Sep 2010 01:33:41 +0000 (18:33 -0700)]
net/9p: Add waitq to VirtIO transport.

If there is not enough space for the PDU on the VirtIO ring, current
code returns -EIO propagating the error to user.

This patch introduced a wqit_queue on the channel, and lets the process
wait on this queue until VirtIO ring frees up.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago[net/9p]Serialize virtqueue operations to make VirtIO transport SMP safe.
Venkateswararao Jujjuri (JV) [Thu, 30 Sep 2010 01:06:54 +0000 (18:06 -0700)]
[net/9p]Serialize virtqueue operations to make VirtIO transport SMP safe.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: Implement TREADLINK operation for 9p2000.L
M. Mohan Kumar [Tue, 28 Sep 2010 14:29:25 +0000 (19:59 +0530)]
9p: Implement TREADLINK operation for 9p2000.L

Synopsis

size[4] TReadlink tag[2] fid[4]
size[4] RReadlink tag[2] target[s]

Description
Readlink is used to return the contents of the symoblic link
        referred by fid. Contents of symboic link is returned as a
        response.

target[s] - Contents of the symbolic link referred by fid.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: Use V9FS_MAGIC in statfs
M. Mohan Kumar [Mon, 27 Sep 2010 08:47:24 +0000 (14:17 +0530)]
9p: Use V9FS_MAGIC in statfs

Use V9FS_MAGIC as the file system type while filling kernel statfs
strucutre instead of using host file system magic number. Also move
the definition of V9FS_MAGIC from v9fs.h to standard magic.h file.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: Implement TGETLOCK
M. Mohan Kumar [Mon, 27 Sep 2010 06:52:13 +0000 (12:22 +0530)]
9p: Implement TGETLOCK

Synopsis

    size[4] TGetlock tag[2] fid[4] getlock[n]
    size[4] RGetlock tag[2] getlock[n]

Description

TGetlock is used to test for the existence of byte range posix locks on a file
identified by given fid. The reply contains getlock structure. If the lock could
be placed it returns F_UNLCK in type field of getlock structure.  Otherwise it
returns the details of the conflicting locks in the getlock structure

    getlock structure:
      type[1] - Type of lock: F_RDLCK, F_WRLCK
      start[8] - Starting offset for lock
      length[8] - Number of bytes to check for the lock
             If length is 0, check for lock in all bytes starting at the location
            'start' through to the end of file
      pid[4] - PID of the process that wants to take lock/owns the task
               in case of reply
      client[4] - Client id of the system that owns the process which
                  has the conflicting lock

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: Implement TLOCK
M. Mohan Kumar [Mon, 27 Sep 2010 06:04:24 +0000 (11:34 +0530)]
9p: Implement TLOCK

Synopsis

    size[4] TLock tag[2] fid[4] flock[n]
    size[4] RLock tag[2] status[1]

Description

Tlock is used to acquire/release byte range posix locks on a file
identified by given fid. The reply contains status of the lock request

    flock structure:
        type[1] - Type of lock: F_RDLCK, F_WRLCK, F_UNLCK
        flags[4] - Flags could be either of
          P9_LOCK_FLAGS_BLOCK - Blocked lock request, if there is a
            conflicting lock exists, wait for that lock to be released.
          P9_LOCK_FLAGS_RECLAIM - Reclaim lock request, used when client is
            trying to reclaim a lock after a server restrart (due to crash)
        start[8] - Starting offset for lock
        length[8] - Number of bytes to lock
          If length is 0, lock all bytes starting at the location 'start'
          through to the end of file
        pid[4] - PID of the process that wants to take lock
        client_id[4] - Unique client id

        status[1] - Status of the lock request, can be
          P9_LOCK_SUCCESS(0), P9_LOCK_BLOCKED(1), P9_LOCK_ERROR(2) or
          P9_LOCK_GRACE(3)
          P9_LOCK_SUCCESS - Request was successful
          P9_LOCK_BLOCKED - A conflicting lock is held by another process
          P9_LOCK_ERROR - Error while processing the lock request
          P9_LOCK_GRACE - Server is in grace period, it can't accept new lock
            requests in this period (except locks with
            P9_LOCK_FLAGS_RECLAIM flag set)

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago[9p] Introduce client side TFSYNC/RFSYNC for dotl.
Venkateswararao Jujjuri (JV) [Thu, 23 Sep 2010 00:19:19 +0000 (17:19 -0700)]
[9p] Introduce client side TFSYNC/RFSYNC for dotl.

SYNOPSIS
    size[4] Tfsync tag[2] fid[4]

    size[4] Rfsync tag[2]

DESCRIPTION

The Tfsync transaction transfers ("flushes") all modified in-core data of
file identified by fid to the disk device (or other  permanent  storage
device)  where that  file  resides.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago[fs/9p] Add file_operations for cached mode in dotl protocol.
Venkateswararao Jujjuri (JV) [Wed, 22 Sep 2010 23:30:52 +0000 (16:30 -0700)]
[fs/9p] Add file_operations for cached mode in dotl protocol.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Add access = client option to opt in acl evaluation.
Aneesh Kumar K.V [Mon, 27 Sep 2010 18:57:41 +0000 (00:27 +0530)]
fs/9p: Add access = client option to opt in acl evaluation.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Implement create time inheritance
Aneesh Kumar K.V [Mon, 27 Sep 2010 18:57:40 +0000 (00:27 +0530)]
fs/9p: Implement create time inheritance

Inherit default ACL on create

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Update ACL on chmod
Aneesh Kumar K.V [Mon, 27 Sep 2010 18:57:40 +0000 (00:27 +0530)]
fs/9p: Update ACL on chmod

We need update the acl value on chmod

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Implement setting posix acl
Aneesh Kumar K.V [Mon, 27 Sep 2010 18:57:40 +0000 (00:27 +0530)]
fs/9p: Implement setting posix acl

This patch also update mode bits, as a normal file system.
I am not sure wether we should do that, considering that
a setxattr on the server will again update the ACL/mode value

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Add xattr callbacks for POSIX ACL
Aneesh Kumar K.V [Mon, 27 Sep 2010 18:57:39 +0000 (00:27 +0530)]
fs/9p: Add xattr callbacks for POSIX ACL

This patch implement fetching POSIX ACL from the server

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Implement POSIX ACL permission checking function
Aneesh Kumar K.V [Mon, 27 Sep 2010 18:57:39 +0000 (00:27 +0530)]
fs/9p: Implement POSIX ACL permission checking function

The ACL value is fetched as a part of inode initialization
from the server and the permission checking function use the
cached value of the ACL

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agonet/9p: Add a Warning to catch NULL fids passed to p9_client_clunk().
jvrao [Wed, 25 Aug 2010 16:27:06 +0000 (16:27 +0000)]
net/9p: Add a Warning to catch NULL fids passed to p9_client_clunk().

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Remove the redundant rsize calculation in v9fs_file_write()
jvrao [Mon, 30 Aug 2010 18:23:20 +0000 (13:23 -0500)]
fs/9p: Remove the redundant rsize calculation in v9fs_file_write()

the same calculation is done in p9_client_write

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: Add a Direct IO support for non-cached operations.
jvrao [Tue, 24 Aug 2010 15:43:28 +0000 (15:43 +0000)]
9p: Add a Direct IO support for non-cached operations.

The presence of v9fs_direct_IO() in the address space ops vector
allowes open() O_DIRECT flags which would have failed otherwise.

In the non-cached mode, we shunt off direct read and write requests before
the VFS gets them, so this method should never be called.

Direct IO is not 'yet' supported in the cached mode. Hence when
this routine is called through generic_file_aio_read(), the read/write fails
with an error.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agonet/9p: This patch implements TLERROR/RLERROR on the 9P client.
Arun R Bharadwaj [Wed, 28 Jul 2010 08:47:26 +0000 (14:17 +0530)]
net/9p: This patch implements TLERROR/RLERROR on the 9P client.

Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: mkdir fix for setting S_ISGID bit as per parent directory
Harsh Prateek Bora [Wed, 18 Aug 2010 06:01:52 +0000 (06:01 +0000)]
fs/9p: mkdir fix for setting S_ISGID bit as per parent directory

The current implementation of 9p client mkdir function does not
set the S_ISGID mode bit for the directory being created if the
parent directory has this bit set. This patch fixes this problem
so that the newly created directory inherits the gid from parent
directory and not from the process creating this directory, when
the S_ISGID bit is set in parent directory.

Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: Pass the correct end of buffer to p9dirent_read
Sripathi Kodi [Mon, 9 Aug 2010 11:33:10 +0000 (11:33 +0000)]
9p: Pass the correct end of buffer to p9dirent_read

A patch was accepted recently for sending correct buffer size to p9stat_read.
We need a similar patch in v9fs_dir_readdir_dotl to send correct end of buffer
to p9dirent_read.

Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: setrlimit fix for 9p write
Harsh Prateek Bora [Tue, 3 Aug 2010 11:55:40 +0000 (11:55 +0000)]
fs/9p: setrlimit fix for 9p write

Current 9p client file write code does not check for RLIMIT_FSIZE resource.
This bug was found by running LTP test case for setrlimit. This bug is fixed
by calling generic_write_checks before sending the write request to the
server.
Without this patch: the write function is allowed to write above the
RLIMIT_FSIZE set by user.
With this patch: the write function checks for RLIMIT_SIZE and writes upto
the size limit.

Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: remove unneeded checks
Dan Carpenter [Wed, 4 Aug 2010 16:29:03 +0000 (16:29 +0000)]
9p: remove unneeded checks

git_t is unsigned an can never be less than zero.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agocciss: remove overlapping PCI IDs
Mike Miller [Thu, 28 Oct 2010 12:33:27 +0000 (06:33 -0600)]
cciss: remove overlapping PCI IDs

This patch removes the controller overlap between cciss and hpsa. It was
decided that no overlap should exist. All new controllers will use the hpsa
SCSI based driver.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoblock: cciss: fix information leak to userland
Vasiliy Kulikov [Thu, 28 Oct 2010 12:31:55 +0000 (06:31 -0600)]
block: cciss: fix information leak to userland

Structure IOCTL_Command_struct is copied to userland with
some padding fields at the end of the struct unitialized.
It leads to leaking of contents of kernel stack memory.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agodrivers/block/aoe/aoeblk.c: ratelimit a warning printk
Andrew Morton [Thu, 28 Oct 2010 12:15:26 +0000 (06:15 -0600)]
drivers/block/aoe/aoeblk.c: ratelimit a warning printk

As described in https://bugzilla.kernel.org/show_bug.cgi?id=19922

: I had an AoE device go down overnight, and while a server was trying to
: write to it, it was also writing this message to its logs:
:
: 209                 printk(KERN_INFO "aoe: device %ld.%d is not up\n",
: 210                         d->aoemajor, d->aoeminor);
:
: The message appeared many times per second, and over several hours
: produced about 7.5 gigabytes of log files, filling up all free space on
: the root filesystem.

Cc: "Ed L. Cashin" <ecashin@coraid.com>
Suggested-by: Roman Mamedov <roman@rm.pp.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agodrivers/block/z2ram.c: correct printing of sector_t
Geert Uytterhoeven [Thu, 28 Oct 2010 12:15:26 +0000 (06:15 -0600)]
drivers/block/z2ram.c: correct printing of sector_t

If CONFIG_LBDAF=y, `sector_t' becomes `u64' instead of `unsigned long':

drivers/block/z2ram.c: In function ¡do_z2_request¢:
drivers/block/z2ram.c:83: warning: format %lu expects type `long unsigned int', but argument 2 has type `sector_t'

Hence always cast it to `unsigned long long' for printing.  Also do the
pr_err() dance, while we're at it.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoaoe: don't use flush_scheduled_work()
Tejun Heo [Thu, 28 Oct 2010 12:15:26 +0000 (06:15 -0600)]
aoe: don't use flush_scheduled_work()

flush_scheduled_work() is deprecated and scheduled to be removed.
Directly cancel aoedev->work on free instead of depending on
flush_scheduled_works().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: "Ed L. Cashin" <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agodrivers/block/drbd/drbd_main.c: fix error path
Nicolas Kaiser [Thu, 28 Oct 2010 12:15:26 +0000 (06:15 -0600)]
drivers/block/drbd/drbd_main.c: fix error path

Failure to create drbd_ee_mempool appears not to get checked.  Looks like
a copy-and-paste problem to me.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agopower_supply: Mark twl4030_charger as broken
Anton Vorontsov [Thu, 28 Oct 2010 08:44:16 +0000 (12:44 +0400)]
power_supply: Mark twl4030_charger as broken

The driver is not buildable without MFD changes. For now, let's
disable the driver as it breaks build for major platforms (i.e. x86).

  CC [M]  drivers/power/twl4030_charger.o
drivers/power/twl4030_charger.c: In function 'twl4030_clear_set_boot_bci':
drivers/power/twl4030_charger.c:105: error: 'TWL4030_PM_MASTER_BOOT_BCI' undeclared (first use in this function)
drivers/power/twl4030_charger.c:105: error: (Each undeclared identifier is reported only once
drivers/power/twl4030_charger.c:105: error: for each function it appears in.)
drivers/power/twl4030_charger.c: In function 'twl4030_bci_have_vbus':
drivers/power/twl4030_charger.c:137: error: 'TWL4030_PM_MASTER_STS_HW_CONDITIONS' undeclared (first use in this function)
drivers/power/twl4030_charger.c: In function 'twl4030_bci_probe':
drivers/power/twl4030_charger.c:477: warning: overflow in implicit constant conversion
drivers/power/twl4030_charger.c:485: warning: overflow in implicit constant conversion
make[2]: *** [drivers/power/twl4030_charger.o] Error 1

We can re-enable it if MFD tree will finally merge into 2.6.37.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
13 years agoMerge branch 'upstream-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Thu, 28 Oct 2010 04:54:31 +0000 (21:54 -0700)]
Merge branch 'upstream-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

* 'upstream-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (50 commits)
  ext4,jbd2: convert tracepoints to use major/minor numbers
  ext4: optimize orphan_list handling for ext4_setattr
  ext4: fix unbalanced mutex unlock in error path of ext4_li_request_new
  ext4: fix compile error in ext4_fallocate()
  ext4: move ext4_mb_{get,put}_buddy_cache_lock and make them static
  ext4: rename mark_bitmap_end() to ext4_mark_bitmap_end()
  ext4: move flush_completed_IO to fs/ext4/fsync.c and make it static
  ext4: rename {ext,idx}_pblock and inline small extent functions
  ext4: make various ext4 functions be static
  ext4: rename {exit,init}_ext4_*() to ext4_{exit,init}_*()
  ext4: fix kernel oops if the journal superblock has a non-zero j_errno
  ext4: update writeback_index based on last page scanned
  ext4: implement writeback livelock avoidance using page tagging
  ext4: tidy up a void argument in inode.c
  ext4: add batched_discard into ext4 feature list
  ext4: Add batched discard support for ext4
  fs: Add FITRIM ioctl
  ext4: Use return value from sb_issue_discard()
  ext4: Check return value of sb_getblk() and friends
  ext4: use bio layer instead of buffer layer in mpage_da_submit_io
  ...

13 years agoMerge branch 'next' into upstream-merge
Theodore Ts'o [Thu, 28 Oct 2010 03:44:47 +0000 (23:44 -0400)]
Merge branch 'next' into upstream-merge

Conflicts:
fs/ext4/inode.c
fs/ext4/mballoc.c
include/trace/events/ext4.h

13 years agoMerge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Thu, 28 Oct 2010 03:37:06 +0000 (20:37 -0700)]
Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms: enable unmappable vram for evergreen
  drm/radeon/kms: fix tiled db height calculation on 6xx/7xx
  drm/radeon/kms: fix handling of tex lookup disable in cs checker on r2xx