01 Apr, 2009

2 commits

  • struct tty_operations::proc_fops took it's place and there is one less
    create_proc_read_entry() user now!

    Signed-off-by: Alexey Dobriyan
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Used for gradual switch of TTY drivers from using ->read_proc which helps
    with gradual switch from ->read_proc for the whole tree.

    As side effect, fix possible race condition when ->data initialized after
    PDE is hooked into proc tree.

    ->proc_fops takes precedence over ->read_proc.

    Signed-off-by: Alexey Dobriyan
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

31 Mar, 2009

38 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    wireless: remove duplicated .ndo_set_mac_address
    netfilter: xtables: fix IPv6 dependency in the cluster match
    tg3: Add GRO support.
    niu: Add GRO support.
    ucc_geth: Fix use-after-of_node_put() in ucc_geth_probe().
    gianfar: Fix use-after-of_node_put() in gfar_of_init().
    kernel: remove HIPQUAD()
    netpoll: store local and remote ip in net-endian
    netfilter: fix endian bug in conntrack printks
    dmascc: fix incomplete conversion to network_device_ops
    gso: Fix support for linear packets
    skbuff.h: fix missing kernel-doc
    ni5010: convert to net_device_ops

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask:
    oprofile: Thou shalt not call __exit functions from __init functions
    cpumask: remove the now-obsoleted pcibus_to_cpumask(): generic
    cpumask: remove cpumask_t from core
    cpumask: convert rcutorture.c
    cpumask: use new cpumask_ functions in core code.
    cpumask: remove references to struct irqaction's mask field.
    cpumask: use mm_cpumask() wrapper: kernel/fork.c
    cpumask: use set_cpu_active in init/main.c
    cpumask: remove node_to_first_cpu
    cpumask: fix seq_bitmap_*() functions.
    cpumask: remove dangerous CPU_MASK_ALL_PTR, &CPU_MASK_ALL

    Linus Torvalds
     
  • * 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
    hwmon: (fschmd) Add support for the FSC Hades IC
    hwmon: (fschmd) Add support for the FSC Syleus IC
    i2c-i801: Instantiate FSC hardware montioring chips
    dmi: Let dmi_walk() users pass private data
    hwmon: Define a standard interface for chassis intrusion detection
    Move the pcf8591 driver to hwmon
    hwmon: (w83627ehf) Only expose in6 or temp3 on the W83667HG
    hwmon: (w83627ehf) Add support for W83667HG
    hwmon: (w83627ehf) Invert fan pin variables logic
    hwmon: (hdaps) Fix Thinkpad X41 axis inversion
    hwmon: (hdaps) Allow inversion of separate axis
    hwmon: (ds1621) Clean up documentation
    hwmon: (ds1621) Avoid unneeded register access
    hwmon: (ds1621) Clean up register access
    hwmon: (ds1621) Reorder code statements

    Linus Torvalds
     
  • * 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (33 commits)
    lockdep: fix deadlock in lockdep_trace_alloc
    lockdep: annotate reclaim context (__GFP_NOFS), fix SLOB
    lockdep: annotate reclaim context (__GFP_NOFS), fix
    lockdep: build fix for !PROVE_LOCKING
    lockstat: warn about disabled lock debugging
    lockdep: use stringify.h
    lockdep: simplify check_prev_add_irq()
    lockdep: get_user_chars() redo
    lockdep: simplify get_user_chars()
    lockdep: add comments to mark_lock_irq()
    lockdep: remove macro usage from mark_held_locks()
    lockdep: fully reduce mark_lock_irq()
    lockdep: merge the !_READ mark_lock_irq() helpers
    lockdep: merge the _READ mark_lock_irq() helpers
    lockdep: simplify mark_lock_irq() helpers #3
    lockdep: further simplify mark_lock_irq() helpers
    lockdep: simplify the mark_lock_irq() helpers
    lockdep: split up mark_lock_irq()
    lockdep: generate usage strings
    lockdep: generate the state bit definitions
    ...

    Linus Torvalds
     
  • * 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc:
    Revert "proc: revert /proc/uptime to ->read_proc hook"
    proc 2/2: remove struct proc_dir_entry::owner
    proc 1/2: do PDE usecounting even for ->read_proc, ->write_proc
    proc: fix sparse warnings in pagemap_read()
    proc: move fs/proc/inode-alloc.txt comment into a source file

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    PCI PM: Make pci_prepare_to_sleep() disable wake-up if needed
    radeonfb: Use __pci_complete_power_transition()
    PCI PM: Introduce __pci_[start|complete]_power_transition() (rev. 2)
    PCI PM: Restore config spaces of all devices during early resume
    PCI PM: Make pci_set_power_state() handle devices with no PM support
    PCI PM: Put devices into low power states during late suspend (rev. 2)
    PCI PM: Move pci_restore_standard_config to pci-driver.c
    PCI PM: Use pci_set_power_state during early resume
    PCI PM: Consistently use variable name "error" for pm call return values
    kexec: Change kexec jump code ordering
    PM: Change hibernation code ordering
    PM: Change suspend code ordering
    PM: Rework handling of interrupts during suspend-resume
    PM: Introduce functions for suspending and resuming device interrupts

    Linus Torvalds
     
  • Fix this build error when REISERFS_FS_POSIX_ACL is not set:

    fs/reiserfs/inode.c: In function 'reiserfs_new_inode':
    fs/reiserfs/inode.c:1919: warning: passing argument 1 of 'reiserfs_inherit_default_acl' from incompatible pointer type
    fs/reiserfs/inode.c:1919: warning: passing argument 2 of 'reiserfs_inherit_default_acl' from incompatible pointer type
    fs/reiserfs/inode.c:1919: warning: passing argument 3 of 'reiserfs_inherit_default_acl' from incompatible pointer type
    fs/reiserfs/inode.c:1919: error: too many arguments to function 'reiserfs_inherit_default_acl'

    due to a missing transaction-handle argument in the non-acl
    compatibility function.

    Signed-off-by: Alexander Beregalov
    Acked-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Alexander Beregalov
     
  • Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
    as correctly noted at bug #12454. Someone can lookup entry with NULL
    ->owner, thus not pinning enything, and release it later resulting
    in module refcount underflow.

    We can keep ->owner and supply it at registration time like ->proc_fops
    and ->data.

    But this leaves ->owner as easy-manipulative field (just one C assignment)
    and somebody will forget to unpin previous/pin current module when
    switching ->owner. ->proc_fops is declared as "const" which should give
    some thoughts.

    ->read_proc/->write_proc were just fixed to not require ->owner for
    protection.

    rmmod'ed directories will be empty and return "." and ".." -- no harm.
    And directories with tricky enough readdir and lookup shouldn't be modular.
    We definitely don't want such modular code.

    Removing ->owner will also make PDE smaller.

    So, let's nuke it.

    Kudos to Jeff Layton for reminding about this, let's say, oversight.

    http://bugzilla.kernel.org/show_bug.cgi?id=12454

    Signed-off-by: Alexey Dobriyan

    Alexey Dobriyan
     
  • * 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (53 commits)
    drm: detect hdmi monitor by hdmi identifier (v3)
    drm: drm_fops.c unlock missing on error path
    drm: reorder struct drm_ioctl_desc to save space on 64 bit builds
    radeon: add some new pci ids
    drm: read EDID extensions from monitor
    drm: Use a little stash on the stack to avoid kmalloc in most DRM ioctls.
    drm/radeon: add regs required for occlusion queries support
    drm/i915: check the return value from the copy from user
    drm/radeon: fix logic in r600_page_table_init() to match ati_gart
    drm/radeon: r600 ptes are 64-bit, cleanup cleanup function.
    drm/radeon: don't call irq changes on r600 suspend/resume
    drm/radeon: fix r600 writeback across suspend/resume
    drm/radeon: fix r600 writeback setup.
    drm: fix warnings about new mappings in info code.
    drm/radeon: NULL noise: drivers/gpu/drm/radeon/radeon_*.c
    drm/radeon: fix r600 pci mapping calls.
    drm/radeon: r6xx/r7xx: fix possible oops in r600_page_table_cleanup()
    radeon: call the correct idle function, logic got inverted.
    drm/radeon: RS600: fix interrupt handling
    drm/r600: fix rptr address along lines of previous fixes to radeon.
    ...

    Linus Torvalds
     
  • * 'iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (60 commits)
    dma-debug: make memory range checks more consistent
    dma-debug: warn of unmapping an invalid dma address
    dma-debug: fix dma_debug_add_bus() definition for !CONFIG_DMA_API_DEBUG
    dma-debug/x86: register pci bus for dma-debug leak detection
    dma-debug: add a check dma memory leaks
    dma-debug: add checks for kernel text and rodata
    dma-debug: print stacktrace of mapping path on unmap error
    dma-debug: Documentation update
    dma-debug: x86 architecture bindings
    dma-debug: add function to dump dma mappings
    dma-debug: add checks for sync_single_sg_*
    dma-debug: add checks for sync_single_range_*
    dma-debug: add checks for sync_single_*
    dma-debug: add checking for [alloc|free]_coherent
    dma-debug: add add checking for map/unmap_sg
    dma-debug: add checking for map/unmap_page/single
    dma-debug: add core checking functions
    dma-debug: add debugfs interface
    dma-debug: add kernel command line parameters
    dma-debug: add initialization code
    ...

    Fix trivial conflicts due to whitespace changes in arch/x86/kernel/pci-nommu.c

    Linus Torvalds
     
  • The radeonfb driver needs to program the device's PMCSR directly due
    to some quirky hardware it has to handle (see
    http://bugzilla.kernel.org/show_bug.cgi?id=12846 for details) and
    after doing that it needs to call the platform (usually ACPI) to
    finish the power transition of the device. Currently it uses
    pci_set_power_state() for this purpose, however making a specific
    assumption about the internal behavior of this function, which has
    changed recently so that this assumption is no longer satisfied.
    For this reason, introduce __pci_complete_power_transition() that may
    be called by the radeonfb driver to complete the power transition of
    the device. For symmetry, introduce __pci_start_power_transition().

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Jesse Barnes

    Rafael J. Wysocki
     
  • Introduce helper functions allowing us to prevent device drivers from
    getting any interrupts (without disabling interrupts on the CPU)
    during suspend (or hibernation) and to make them start to receive
    interrupts again during the subsequent resume. These functions make it
    possible to keep timer interrupts enabled while the "late" suspend and
    "early" resume callbacks provided by device drivers are being
    executed. In turn, this allows device drivers' "late" suspend and
    "early" resume callbacks to sleep, execute ACPI callbacks etc.

    The functions introduced here will be used to rework the handling of
    interrupts during suspend (hibernation) and resume. Namely,
    interrupts will only be disabled on the CPU right before suspending
    sysdevs, while device drivers will be prevented from receiving
    interrupts, with the help of the new helper function, before their
    "late" suspend callbacks run (and analogously during resume).

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Ingo Molnar

    Rafael J. Wysocki
     
  • At the moment, dmi_walk() lacks flexibility, users can't pass data to
    the callback function. Add a pointer for private data to make this
    function more flexible.

    Signed-off-by: Jean Delvare
    Cc: Hans de Goede
    Cc: Matthew Garrett
    Cc: Roland Dreier

    Jean Delvare
     
  • * reiserfs-updates: (35 commits)
    reiserfs: rename [cn]_* variables
    reiserfs: rename p_._ variables
    reiserfs: rename p_s_tb to tb
    reiserfs: rename p_s_inode to inode
    reiserfs: rename p_s_bh to bh
    reiserfs: rename p_s_sb to sb
    reiserfs: strip trailing whitespace
    reiserfs: cleanup path functions
    reiserfs: factor out buffer_info initialization
    reiserfs: add atomic addition of selinux attributes during inode creation
    reiserfs: use generic readdir for operations across all xattrs
    reiserfs: journaled xattrs
    reiserfs: use generic xattr handlers
    reiserfs: remove i_has_xattr_dir
    reiserfs: make per-inode xattr locking more fine grained
    reiserfs: eliminate per-super xattr lock
    reiserfs: simplify xattr internal file lookups/opens
    reiserfs: Clean up xattrs when REISERFS_FS_XATTR is unset
    reiserfs: remove IS_PRIVATE helpers
    reiserfs: remove link detection code
    ...

    Fixed up conflicts manually due to:
    - quota name cleanups vs variable naming changes:
    fs/reiserfs/inode.c
    fs/reiserfs/namei.c
    fs/reiserfs/stree.c
    fs/reiserfs/xattr.c
    - exported include header cleanups
    include/linux/reiserfs_fs.h

    Linus Torvalds
     
  • This patch is a simple s/p_._//g to the reiserfs code. This is the
    fifth in a series of patches to rip out some of the awful variable
    naming in reiserfs.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This patch is a simple s/p_s_tb/tb/g to the reiserfs code. This is the
    fourth in a series of patches to rip out some of the awful variable
    naming in reiserfs.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This patch is a simple s/p_s_inode/inode/g to the reiserfs code. This
    is the third in a series of patches to rip out some of the awful
    variable naming in reiserfs.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This patch is a simple s/p_s_bh/bh/g to the reiserfs code. This is the
    second in a series of patches to rip out some of the awful variable
    naming in reiserfs.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This patch is a simple s/p_s_sb/sb/g to the reiserfs code. This is the
    first in a series of patches to rip out some of the awful variable
    naming in reiserfs.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This patch strips trailing whitespace from the reiserfs code.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • Some time ago, some changes were made to make security inode attributes
    be atomically written during inode creation. ReiserFS fell behind in
    this area, but with the reworking of the xattr code, it's now fairly
    easy to add.

    The following patch adds the ability for security attributes to be added
    automatically during inode creation.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • The current reiserfs xattr implementation open codes reiserfs_readdir
    and frees the path before calling the filldir function. Typically, the
    filldir function is something that modifies the file system, such as a
    chown or an inode deletion that also require reading of an inode
    associated with each direntry. Since the file system is modified, the
    path retained becomes invalid for the next run. In addition, it runs
    backwards in attempt to minimize activity.

    This is clearly suboptimal from a code cleanliness perspective as well
    as performance-wise.

    This patch implements a generic reiserfs_for_each_xattr that uses the
    generic readdir and a specific filldir routine that simply populates an
    array of dentries and then performs a specific operation on them. When
    all files have been operated on, it then calls the operation on the
    directory itself.

    The result is a noticable code reduction and better performance.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • Deadlocks are possible in the xattr code between the journal lock and the
    xattr sems.

    This patch implements journalling for xattr operations. The benefit is
    twofold:
    * It gets rid of the deadlock possibility by always ensuring that xattr
    write operations are initiated inside a transaction.
    * It corrects the problem where xattr backing files aren't considered any
    differently than normal files, despite the fact they are metadata.

    I discussed the added journal load with Chris Mason, and we decided that
    since xattrs (versus other journal activity) is fairly rare, the introduction
    of larger transactions to support journaled xattrs wouldn't be too big a deal.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • Christoph Hellwig had asked me quite some time ago to port the reiserfs
    xattrs to the generic xattr interface.

    This patch replaces the reiserfs-specific xattr handling code with the
    generic struct xattr_handler.

    However, since reiserfs doesn't split the prefix and name when accessing
    xattrs, it can't leverage generic_{set,get,list,remove}xattr without
    needlessly reconstructing the name on the back end.

    Update 7/26/07: Added missing dput() to deletion path.
    Update 8/30/07: Added missing mark_inode_dirty when i_mode is used to
    represent an ACL and no previous ACL existed.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • The per-inode locking can be made more fine-grained to surround just the
    interaction with the filesystem itself. This really only applies to
    protecting reads during a write, since concurrent writes are barred with
    inode->i_mutex at the vfs level.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • With the switch to using inode->i_mutex locking during lookups/creation
    in the xattr root, the per-super xattr lock is no longer needed.

    This patch removes it.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • The current reiserfs xattr implementation will not clean up old xattr
    files if files are deleted when REISERFS_FS_XATTR is unset. This
    results in inaccessible lost files, wasting space.

    This patch compiles in basic xattr knowledge, such as how to delete them
    and change ownership for quota tracking. If the file system has never
    used xattrs, then the operation is quite fast: it returns immediately
    when it sees there is no .reiserfs_priv directory.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • There are a number of helper functions for marking a reiserfs inode
    private that were leftover from reiserfs did its own thing wrt to
    private inodes. S_PRIVATE has been in the kernel for some time, so this
    patch removes the helpers and uses IS_PRIVATE instead.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • Although reiserfs can currently handle severe errors such as journal failure,
    it cannot handle less severe errors like metadata i/o failure. The following
    patch adds a reiserfs_error() function akin to the one in ext3.

    Subsequent patches will use this new error handler to handle errors more
    gracefully in general.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This patch kills off reiserfs_journal_abort as it is never called, and
    combines __reiserfs_journal_abort_{soft,hard} into one function called
    reiserfs_abort_journal, which performs the same work. It is silent
    as opposed to the old version, since the message was always issued
    after a regular 'abort' message.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • ReiserFS panics can be somewhat inconsistent.
    In some cases:
    * a unique identifier may be associated with it
    * the function name may be included
    * the device may be printed separately

    This patch aims to make warnings more consistent. reiserfs_warning() prints
    the device name, so printing it a second time is not required. The function
    name for a warning is always helpful in debugging, so it is now automatically
    inserted into the output. Hans has stated that every warning should have
    a unique identifier. Some cases lack them, others really shouldn't have them.
    reiserfs_warning() now expects an id associated with each message. In the
    rare case where one isn't needed, "" will suffice.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • uniqueness2type and type2uniquness issue a warning when the value is
    unknown. When called from reiserfs_warning, this causes a re-entrancy
    problem and deadlocks on the error buffer lock.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • ReiserFS warnings can be somewhat inconsistent.
    In some cases:
    * a unique identifier may be associated with it
    * the function name may be included
    * the device may be printed separately

    This patch aims to make warnings more consistent. reiserfs_warning() prints
    the device name, so printing it a second time is not required. The function
    name for a warning is always helpful in debugging, so it is now automatically
    inserted into the output. Hans has stated that every warning should have
    a unique identifier. Some cases lack them, others really shouldn't have them.
    reiserfs_warning() now expects an id associated with each message. In the
    rare case where one isn't needed, "" will suffice.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This patch makes leaf_paste_entries more consistent with respect to the
    other leaf operations. Using buffer_info instead of buffer_head
    directly allows us to get a superblock pointer for use in error
    handling.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This patch fixes up the reiserfs code such that transaction ids are
    always unsigned ints. In places they can currently be signed ints or
    unsigned longs.

    The former just causes an annoying clm-2200 warning and may join a
    transaction when it should wait.

    The latter is just for correctness since the disk format uses a 32-bit
    transaction id. There aren't any runtime problems that result from it
    not wrapping at the correct location since the value is truncated
    correctly even on big endian systems. The 0 value might make it to
    disk, but the mount-time checks will bump it to 10 itself.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • The following patch adds the fields for tracking mount counts and last
    fsck timestamps to the superblock. It also increments the mount count
    on every read-write mount.

    Reiserfsprogs 3.6.21 added support for these fields.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • …l/git/tip/linux-2.6-tip

    * 'x86-stage-3-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (190 commits)
    Revert "cpuacct: reduce one NULL check in fast-path"
    Revert "x86: don't compile vsmp_64 for 32bit"
    x86: Correct behaviour of irq affinity
    x86: early_ioremap_init(), use __fix_to_virt(), because we are sure it's safe
    x86: use default_cpu_mask_to_apicid for 64bit
    x86: fix set_extra_move_desc calling
    x86, PAT, PCI: Change vma prot in pci_mmap to reflect inherited prot
    x86/dmi: fix dmi_alloc() section mismatches
    x86: e820 fix various signedness issues in setup.c and e820.c
    x86: apic/io_apic.c define msi_ir_chip and ir_ioapic_chip all the time
    x86: irq.c keep CONFIG_X86_LOCAL_APIC interrupts together
    x86: irq.c use same path for show_interrupts
    x86: cpu/cpu.h cleanup
    x86: Fix a couple of sparse warnings in arch/x86/kernel/apic/io_apic.c
    Revert "x86: create a non-zero sized bm_pte only when needed"
    x86: pci-nommu.c cleanup
    x86: io_delay.c cleanup
    x86: rtc.c cleanup
    x86: i8253 cleanup
    x86: kdebugfs.c cleanup
    ...

    Linus Torvalds
     
  • * 'bkl-removal' of git://git.lwn.net/linux-2.6:
    Fix a lockdep warning in fasync_helper()
    Add a missing unlock_kernel() in raw_open()

    Linus Torvalds