07 Jan, 2009

4 commits

  • Several subsystem open handlers dereference the fops_get() return value
    without checking it for nullness. This opens a race condition between the
    open handler and module unloading.

    A module can be marked as being unloaded (MODULE_STATE_GOING) before its
    exit function is called and gets the chance to unregister the driver.
    During that window open handlers can still be called, and fops_get() will
    fail in try_module_get() and return a NULL pointer.

    This change checks the fops_get() return value and returns -ENODEV if NULL.

    Reported-by: Alan Jenkins
    Signed-off-by: Laurent Pinchart
    Acked-by: Takashi Iwai
    Cc: Al Viro
    Cc: Dave Airlie
    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Laurent Pinchart
     
  • Use the newly introduced pci_ioremap_bar() function in drivers/misc.
    pci_ioremap_bar() just takes a pci device and a bar number, with the goal
    of making it really hard to get wrong, while also having a central place
    to stick sanity checks.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • Sparse output following warnings.

    mm/vmalloc.c:1436:6: warning: symbol 'vread' was not declared. Should it be static?
    mm/vmalloc.c:1474:6: warning: symbol 'vwrite' was not declared. Should it be static?

    However, it is used by /dev/kmem. fixed here.

    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     
  • Show node to memory section relationship with symlinks in sysfs

    Add /sys/devices/system/node/nodeX/memoryY symlinks for all
    the memory sections located on nodeX. For example:
    /sys/devices/system/node/node1/memory135 -> ../../memory/memory135
    indicates that memory section 135 resides on node1.

    Also revises documentation to cover this change as well as updating
    Documentation/ABI/testing/sysfs-devices-memory to include descriptions
    of memory hotremove files 'phys_device', 'phys_index', and 'state'
    that were previously not described there.

    In addition to it always being a good policy to provide users with
    the maximum possible amount of physical location information for
    resources that can be hot-added and/or hot-removed, the following
    are some (but likely not all) of the user benefits provided by
    this change.
    Immediate:
    - Provides information needed to determine the specific node
    on which a defective DIMM is located. This will reduce system
    downtime when the node or defective DIMM is swapped out.
    - Prevents unintended onlining of a memory section that was
    previously offlined due to a defective DIMM. This could happen
    during node hot-add when the user or node hot-add assist script
    onlines _all_ offlined sections due to user or script inability
    to identify the specific memory sections located on the hot-added
    node. The consequences of reintroducing the defective memory
    could be ugly.
    - Provides information needed to vary the amount and distribution
    of memory on specific nodes for testing or debugging purposes.
    Future:
    - Will provide information needed to identify the memory
    sections that need to be offlined prior to physical removal
    of a specific node.

    Symlink creation during boot was tested on 2-node x86_64, 2-node
    ppc64, and 2-node ia64 systems. Symlink creation during physical
    memory hot-add tested on a 2-node x86_64 system.

    Signed-off-by: Gary Hade
    Signed-off-by: Badari Pulavarty
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gary Hade
     

06 Jan, 2009

36 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
    dm snapshot: extend exception store functions
    dm snapshot: split out exception store implementations
    dm snapshot: rename struct exception_store
    dm snapshot: separate out exception store interface
    dm mpath: move trigger_event to system workqueue
    dm: add name and uuid to sysfs
    dm table: rework reference counting
    dm: support barriers on simple devices
    dm request: extend target interface
    dm request: add caches
    dm ioctl: allow dm_copy_name_and_uuid to return only one field
    dm log: ensure log bitmap fits on log device
    dm log: move region_size validation
    dm log: avoid reinitialising io_req on every operation
    dm: consolidate target deregistration error handling
    dm raid1: fix error count
    dm log: fix dm_io_client leak on error paths
    dm snapshot: change yield to msleep
    dm table: drop reference at unbind

    Linus Torvalds
     
  • Supply dm_add_exception as a callback to the read_metadata function.
    Add a status function ready for a later patch and name the functions
    consistently.

    Signed-off-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Jonathan Brassow
     
  • Move the existing snapshot exception store implementations out into
    separate files. Later patches will place these behind a new
    interface in preparation for alternative implementations.

    Signed-off-by: Alasdair G Kergon

    Alasdair G Kergon
     
  • Rename struct exception_store to dm_exception_store.

    Signed-off-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Jonathan Brassow
     
  • Pull structures that bridge the gap between snapshot and
    exception store out of dm-snap.h and put them in a new
    .h file - dm-exception-store.h. This file will define the
    API for new exception stores.

    Ultimately, dm-snap.h is unnecessary, since only dm-snap.c
    should be using it.

    Signed-off-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Jonathan Brassow
     
  • The same workqueue is used both for sending uevents and processing queued I/O.
    Deadlock has been reported in RHEL5 when sending a uevent was blocked waiting
    for the queued I/O to be processed. Use scheduled_work() for the asynchronous
    uevents instead.

    Signed-off-by: Alasdair G Kergon

    Alasdair G Kergon
     
  • Implement simple read-only sysfs entry for device-mapper block device.

    This patch adds a simple sysfs directory named "dm" under block device
    properties and implements
    - name attribute (string containing mapped device name)
    - uuid attribute (string containing UUID, or empty string if not set)

    The kobject is embedded in mapped_device struct, so no additional
    memory allocation is needed for initializing sysfs entry.

    During the processing of sysfs attribute we need to lock mapped device
    which is done by a new function dm_get_from_kobj, which returns the md
    associated with kobject and increases the usage count.

    Each 'show attribute' function is responsible for its own locking.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Rework table reference counting.

    The existing code uses a reference counter. When the last reference is
    dropped and the counter reaches zero, the table destructor is called.
    Table reference counters are acquired/released from upcalls from other
    kernel code (dm_any_congested, dm_merge_bvec, dm_unplug_all).
    If the reference counter reaches zero in one of the upcalls, the table
    destructor is called from almost random kernel code.

    This leads to various problems:
    * dm_any_congested being called under a spinlock, which calls the
    destructor, which calls some sleeping function.
    * the destructor attempting to take a lock that is already taken by the
    same process.
    * stale reference from some other kernel code keeps the table
    constructed, which keeps some devices open, even after successful
    return from "dmsetup remove". This can confuse lvm and prevent closing
    of underlying devices or reusing device minor numbers.

    The patch changes reference counting so that the table destructor can be
    called only at predetermined places.

    The table has always exactly one reference from either mapped_device->map
    or hash_cell->new_map. After this patch, this reference is not counted
    in table->holders. A pair of dm_create_table/dm_destroy_table functions
    is used for table creation/destruction.

    Temporary references from the other code increase table->holders. A pair
    of dm_table_get/dm_table_put functions is used to manipulate it.

    When the table is about to be destroyed, we wait for table->holders to
    reach 0. Then, we call the table destructor. We use active waiting with
    msleep(1), because the situation happens rarely (to one user in 5 years)
    and removing the device isn't performance-critical task: the user doesn't
    care if it takes one tick more or not.

    This way, the destructor is called only at specific points
    (dm_table_destroy function) and the above problems associated with lazy
    destruction can't happen.

    Finally remove the temporary protection added to dm_any_congested().

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Implement barrier support for single device DM devices

    This patch implements barrier support in DM for the common case of dm linear
    just remapping a single underlying device. In this case we can safely
    pass the barrier through because there can be no reordering between
    devices.

    NB. Any DM device might cease to support barriers if it gets
    reconfigured so code must continue to allow for a possible
    -EOPNOTSUPP on every barrier bio submitted. - agk

    Signed-off-by: Andi Kleen
    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Andi Kleen
     
  • This patch prepares some kmem_caches for request-based dm.

    Signed-off-by: Kiyoshi Ueda
    Signed-off-by: Jun'ichi Nomura
    Signed-off-by: Alasdair G Kergon

    Kiyoshi Ueda
     
  • Allow NULL buffer in dm_copy_name_and_uuid if you only want to return one of
    the fields.

    (Required by a following patch that adds these fields to sysfs.)

    Signed-off-by: Milan Broz
    Reviewed-by: Alasdair G Kergon
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Check that the log bitmap will fit within the log device.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • Move log size validation from mirror target to log constructor.

    Removed PAGE_SIZE restriction we no longer think necessary.

    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon

    Milan Broz
     
  • rw_header function updates three members of io_req data every time
    when I/O is processed. bi_rw and notify.fn are never modified once
    they get initialized, and so they can be set in advance.

    header_to_disk() can also be pulled out of write_header() since only one
    caller needs it and write_header() can be replaced by rw_header()
    directly.

    Signed-off-by: Takahiro Yasui
    Signed-off-by: Alasdair G Kergon

    Takahiro Yasui
     
  • Change dm_unregister_target to return void and use BUG() for error
    reporting.

    dm_unregister_target can only fail because of programming bug in the
    target driver. It can't fail because of user's behavior or disk errors.

    This patch changes unregister_target to return void and use BUG if
    someone tries to unregister non-registered target or unregister target
    that is in use.

    This patch removes code duplication (testing of error codes in all dm
    targets) and reports bugs in just one place, in dm_unregister_target. In
    some target drivers, these return codes were ignored, which could lead
    to a situation where bugs could be missed.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Always increase the error count when I/O on a leg of a mirror fails.

    The error count is used to decide whether to select an alternative
    mirror leg. If the target doesn't use the "handle_errors" feature, the
    error count is not updated and the bio can get requeued forever by the
    read callback.

    Fix it by increasing error_count before the handle_errors feature
    checking.

    Cc: stable@kernel.org
    Signed-off-by: Milan Broz
    Signed-off-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Jonathan Brassow
     
  • In create_log_context function, dm_io_client_destroy function needs
    to be called, when memory allocation of disk_header, sync_bits and
    recovering_bits failed, but dm_io_client_destroy is not called.

    Cc: stable@kernel.org
    Signed-off-by: Takahiro Yasui
    Acked-by: Jonathan Brassow
    Signed-off-by: Alasdair G Kergon

    Takahiro Yasui
     
  • Change yield() to msleep(1). If the thread had realtime priority,
    yield() doesn't really yield, so the yielding process would loop
    indefinitely and cause machine lockup.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • Move one dm_table_put() so that the last reference in the thread
    gets dropped in __unbind().

    This is required for a following patch,
    dm-table-rework-reference-counting.patch, which will change the logic in
    such a way that table destructor is called only at specific points in
    the code.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Alasdair G Kergon

    Mikulas Patocka
     
  • * 'for-next' of git://git.o-hand.com/linux-mfd: (30 commits)
    mfd: Fix section mismatch in da903x
    mfd: move drivers/i2c/chips/menelaus.c to drivers/mfd
    mfd: move drivers/i2c/chips/tps65010.c to drivers/mfd
    mfd: dm355evm msp430 driver
    mfd: Add missing break from wm3850-core
    mfd: Add WM8351 support
    mfd: Support configurable numbers of DCDCs and ISINKs on WM8350
    mfd: Handle missing WM8350 platform data
    mfd: Add WM8352 support
    mfd: Use irq_to_desc in twl4030 code
    power_supply: Add Dialog DA9030 battery charger driver
    mfd: Dialog DA9030 battery charger MFD driver
    mfd: Register WM8400 codec device
    mfd: Pass driver_data onto child devices
    mfd: Fix twl4030-core.c build error
    mfd: twl4030 regulator bug fixes
    mfd: twl4030: create some regulator devices
    mfd: twl4030: cleanup symbols and OMAP dependency
    mfd: twl4030: simplified child creation code
    power_supply: Add battery health reporting for WM8350
    ...

    Linus Torvalds
     
  • * 'i2c-next' of git://aeryn.fluff.org.uk/bjdooks/linux:
    i2c-omap: fix type of irq handler function
    i2c-s3c2410: Change IRQ to be plain integer.
    i2c-s3c2410: Allow more than one i2c-s3c2410 adapter
    i2c-s3c2410: Remove default platform data.
    i2c-s3c2410: Use platform data for gpio configuration
    i2c-s3c2410: Fixup style problems from checkpatch.pl
    i2c-omap: Enable I2C wakeups for 34xx
    i2c-omap: reprogram OCP_SYSCONFIG register after reset
    i2c-omap: convert 'rev1' flag to generic 'rev' u8
    i2c-omap: fix I2C timeouts due to recursive omap_i2c_{un,}idle()
    i2c-omap: Clean-up i2c-omap
    i2c-omap: Don't compile in OMAP15xx I2C ISR for non-OMAP15xx builds
    i2c-omap: Mark init-only functions as __init
    i2c-omap: Add support for omap34xx
    i2c-omap: FIFO handling support and broken hw workaround for i2c-omap
    i2c-omap: Add high-speed support to omap-i2c
    i2c-omap: Close suspected race between omap_i2c_idle() and omap_i2c_isr()
    i2c-omap: Do not use interruptible wait call in omap_i2c_xfer_msg

    Fix up apparently-trivial conflict in drivers/i2c/busses/i2c-s3c2410.c

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (22 commits)
    HID: fix error condition propagation in hid-sony driver
    HID: fix reference count leak hidraw
    HID: add proper support for pensketch 12x9 tablet
    HID: don't allow DealExtreme usb-radio be handled by usb hid driver
    HID: fix default Kconfig setting for TopSpeed driver
    HID: driver for TopSeed Cyberlink quirky remote
    HID: make boot protocol drivers depend on EMBEDDED
    HID: avoid sparse warning in HID_COMPAT_LOAD_DRIVER
    HID: hiddev cleanup -- handle all error conditions properly
    HID: force feedback driver for GreenAsia 0x12 PID
    HID: switch specialized drivers from "default y" to !EMBEDDED
    HID: set proper dev.parent in hidraw
    HID: add dynids facility
    HID: use GFP_KERNEL in hid_alloc_buffers
    HID: usbhid, use usb_endpoint_xfer_int
    HID: move usbhid flags to usbhid.h
    HID: add n-trig digitizer support
    HID: add phys and name ioctls to hidraw
    HID: struct device - replace bus_id with dev_name(), dev_set_name()
    HID: automatically call usbhid_set_leds in usbhid driver
    ...

    Linus Torvalds
     
  • When using "min()", the types of both sides should match. With the cpu
    mask changes, the type of num_online_cpus() will now depend on config
    options. Use "min_t()" with an explicit type instead.

    And make the rx/tx case look the same too, just for sanity.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (44 commits)
    qlge: Fix sparse warnings for tx ring indexes.
    qlge: Fix sparse warning regarding rx buffer queues.
    qlge: Fix sparse endian warning in ql_hw_csum_setup().
    qlge: Fix sparse endian warning for inbound packet control block flags.
    qlge: Fix sparse warnings for byte swapping in qlge_ethool.c
    myri10ge: print MAC and serial number on probe failure
    pkt_sched: cls_u32: Fix locking in u32_change()
    iucv: fix cpu hotplug
    af_iucv: Free iucv path/socket in path_pending callback
    af_iucv: avoid left over IUCV connections from failing connects
    af_iucv: New error return codes for connect()
    net/ehea: bitops work on unsigned longs
    Revert "net: Fix for initial link state in 2.6.28"
    tcp: Kill extraneous SPLICE_F_NONBLOCK checks.
    tcp: don't mask EOF and socket errors on nonblocking splice receive
    dccp: Integrate the TFRC library with DCCP
    dccp: Clean up ccid.c after integration of CCID plugins
    dccp: Lockless integration of CCID congestion-control plugins
    qeth: get rid of extra argument after printk to dev_* conversion
    qeth: No large send using EDDP for HiperSockets.
    ...

    Linus Torvalds
     
  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
    [CPUFREQ] Fix on resume, now preserves user policy min/max.
    [CPUFREQ] Add Celeron Core support to p4-clockmod.
    [CPUFREQ] add to speedstep-lib additional fsb values for core processors
    [CPUFREQ] Disable sysfs ui for p4-clockmod.
    [CPUFREQ] p4-clockmod: reduce noise
    [CPUFREQ] clean up speedstep-centrino and reduce cpumask_t usage

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    inotify: fix type errors in interfaces
    fix breakage in reiserfs_new_inode()
    fix the treatment of jfs special inodes
    vfs: remove duplicate code in get_fs_type()
    add a vfs_fsync helper
    sys_execve and sys_uselib do not call into fsnotify
    zero i_uid/i_gid on inode allocation
    inode->i_op is never NULL
    ntfs: don't NULL i_op
    isofs check for NULL ->i_op in root directory is dead code
    affs: do not zero ->i_op
    kill suid bit only for regular files
    vfs: lseek(fd, 0, SEEK_CUR) race condition

    Linus Torvalds
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Warnings:
    drivers/net/qlge/qlge_main.c:1474:34: warning: restricted degrades to integer
    drivers/net/qlge/qlge_main.c:1475:36: warning: restricted degrades to integer
    drivers/net/qlge/qlge_main.c:1592:51: warning: restricted degrades to integer
    drivers/net/qlge/qlge_main.c:1941:20: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:1941:20: expected restricted unsigned int [usertype] tid
    drivers/net/qlge/qlge_main.c:1941:20: got int [signed] index
    drivers/net/qlge/qlge_main.c:1945:24: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:1945:24: expected restricted unsigned int [usertype] txq_idx
    drivers/net/qlge/qlge_main.c:1945:24: got unsigned int [unsigned] [usertype] tx_ring_idx

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • Warnings:
    drivers/net/qlge/qlge_main.c:909:17: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:909:17: expected unsigned int [unsigned] [usertype] addr_lo
    drivers/net/qlge/qlge_main.c:909:17: got restricted unsigned int [usertype]
    drivers/net/qlge/qlge_main.c:911:17: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:911:17: expected unsigned int [unsigned] [usertype] addr_hi
    drivers/net/qlge/qlge_main.c:911:17: got restricted unsigned int [usertype]
    drivers/net/qlge/qlge_main.c:974:17: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:974:17: expected unsigned int [unsigned] [usertype] addr_lo
    drivers/net/qlge/qlge_main.c:974:17: got restricted unsigned int [usertype]
    drivers/net/qlge/qlge_main.c:975:17: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:975:17: expected unsigned int [unsigned] [usertype] addr_hi
    drivers/net/qlge/qlge_main.c:975:17: got restricted unsigned int [usertype]
    drivers/net/qlge/qlge_main.c:2132:16: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:2132:16: expected unsigned int [unsigned] [usertype] addr_lo
    drivers/net/qlge/qlge_main.c:2132:16: got restricted unsigned int [usertype]
    drivers/net/qlge/qlge_main.c:2133:16: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:2133:16: expected unsigned int [unsigned] [usertype] addr_hi
    drivers/net/qlge/qlge_main.c:2133:16: got restricted unsigned int [usertype]
    drivers/net/qlge/qlge_main.c:2212:15: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:2212:15: expected unsigned int [unsigned] [usertype] addr_lo
    drivers/net/qlge/qlge_main.c:2212:15: got restricted unsigned int [usertype]
    drivers/net/qlge/qlge_main.c:2214:15: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:2214:15: expected unsigned int [unsigned] [usertype] addr_hi
    drivers/net/qlge/qlge_main.c:2214:15: got restricted unsigned int [usertype]

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • Changed u16 to __sum16 usage.

    Warnings:
    drivers/net/qlge/qlge_main.c:1897:9: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:1897:9: expected unsigned short [usertype] *check
    drivers/net/qlge/qlge_main.c:1897:9: got restricted unsigned short *
    drivers/net/qlge/qlge_main.c:1903:9: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:1903:9: expected unsigned short [usertype] *check
    drivers/net/qlge/qlge_main.c:1903:9: got restricted unsigned short *
    drivers/net/qlge/qlge_main.c:1909:9: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_main.c:1909:9: expected unsigned short [unsigned] [short] [usertype]

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • Changed flags element from __le32 to 3 reserved bytes and one byte of
    flags. Changed flags bit definitions to reflect byte width instead of
    __le32 width.

    Warnings:
    drivers/net/qlge/qlge_main.c:1206:16: warning: restricted degrades to integer
    drivers/net/qlge/qlge_main.c:1207:16: warning: restricted degrades to integer
    drivers/net/qlge/qlge_main.c:1233:17: warning: restricted degrades to integer
    drivers/net/qlge/qlge_main.c:1276:17: warning: restricted degrades to integer
    drivers/net/qlge/qlge_main.c:1349:19: warning: restricted degrades to integer

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • drivers/net/qlge/qlge_ethtool.c:59:23: warning: cast to restricted type
    drivers/net/qlge/qlge_ethtool.c:59:21: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_ethtool.c:59:21: expected restricted unsigned short [usertype] irq_delay
    drivers/net/qlge/qlge_ethtool.c:59:21: got unsigned short [unsigned] [usertype]
    drivers/net/qlge/qlge_ethtool.c:61:8: warning: cast to restricted type
    drivers/net/qlge/qlge_ethtool.c:60:21: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_ethtool.c:60:21: expected restricted unsigned short [usertype] pkt_delay
    drivers/net/qlge/qlge_ethtool.c:60:21: got unsigned short [unsigned] [usertype]
    drivers/net/qlge/qlge_ethtool.c:82:23: warning: cast to restricted type
    drivers/net/qlge/qlge_ethtool.c:82:21: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_ethtool.c:82:21: expected restricted unsigned short [usertype] irq_delay
    drivers/net/qlge/qlge_ethtool.c:82:21: got unsigned short [unsigned] [usertype]
    drivers/net/qlge/qlge_ethtool.c:84:8: warning: cast to restricted type
    drivers/net/qlge/qlge_ethtool.c:83:21: warning: incorrect type in assignment (different base types)
    drivers/net/qlge/qlge_ethtool.c:83:21: expected restricted unsigned short [usertype] pkt_delay
    drivers/net/qlge/qlge_ethtool.c:83:21: got unsigned short [unsigned] [usertype]

    Signed-off-by: Ron Mercer
    Signed-off-by: David S. Miller

    Ron Mercer
     
  • To help board identification and diagnosis, print the MAC
    and serial number on probe failure if they are available.

    Signed-off-by: Brice Goglin
    Signed-off-by: David S. Miller

    Brice Goglin
     
  • The flags field of struct ehea_port is only used with test_bit(),
    clear_bit() and set_bit() and these interfaces only work on
    "unsigned long"s, so change the field to be an "unsigned long". Also,
    this field only has two bits defined for it (0 and 1) so will still be
    fine if someone builds this driver for a 32 bit arch (at least as far as
    this flags field is concerned).

    Also note that ehea_driver_flags is only used in ehca_main.c, so make it
    static in there.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: David S. Miller

    Stephen Rothwell
     
  • Fsync currently has a fdatawrite/fdatawait pair around the method call,
    and a mutex_lock/unlock of the inode mutex. All callers of fsync have
    to duplicate this, but we have a few and most of them don't quite get
    it right. This patch adds a new vfs_fsync that takes care of this.
    It's a little more complicated as usual as ->fsync might get a NULL file
    pointer and just a dentry from nfsd, but otherwise gets afile and we
    want to take the mapping and file operations from it when it is there.

    Notes on the fsync callers:

    - ecryptfs wasn't calling filemap_fdatawrite / filemap_fdatawait on the
    lower file
    - coda wasn't calling filemap_fdatawrite / filemap_fdatawait on the host
    file, and returning 0 when ->fsync was missing
    - shm wasn't calling either filemap_fdatawrite / filemap_fdatawait nor
    taking i_mutex. Now given that shared memory doesn't have disk
    backing not doing anything in fsync seems fine and I left it out of
    the vfs_fsync conversion for now, but in that case we might just
    not pass it through to the lower file at all but just call the no-op
    simple_sync_file directly.

    [and now actually export vfs_fsync]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • ... and don't bother in callers. Don't bother with zeroing i_blocks,
    while we are at it - it's already been zeroed.

    i_mode is not worth the effort; it has no common default value.

    Signed-off-by: Al Viro

    Al Viro