1. 24 7月, 2012 10 次提交
    • P
      CIFS: Extend credit mechanism to process request type · a891f0f8
      Pavel Shilovsky 提交于
      Split all requests to echos, oplocks and others - each group uses
      its own credit slot. This is indicated by new flags
      
      CIFS_ECHO_OP and CIFS_OBREAK_OP
      
      that are not used now for CIFS. This change is required to support
      SMB2 protocol because of different processing of these commands.
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NPavel Shilovsky <pshilovsky@samba.org>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      a891f0f8
    • P
      316cf94a
    • J
      cifs: reinstate sec=ntlmv2 mount option · 7659624f
      Jeff Layton 提交于
      sec=ntlmv2 as a mount option got dropped in the mount option overhaul.
      
      Cc: Sachin Prabhu <sprabhu@redhat.com>
      Cc: <stable@vger.kernel.org> # 3.4+
      Reported-by: NGünter Kukkukk <linux@kukkukk.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      7659624f
    • J
      cifs: rename cifs_sign_smb2 to cifs_sign_smbv · 762a4206
      Jeff Layton 提交于
      "smb2" makes me think of the SMB2.x protocol, which isn't at all what
      this function is for...
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      762a4206
    • J
      cifs: remove bogus reset of smb_buf_length in smb_send routines · d971e065
      Jeff Layton 提交于
      There's a comment here about how we don't want to modify this length,
      but nothing in this function actually does.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      d971e065
    • J
      cifs: move file_lock off stack in cifs_push_posix_locks · c5fd363d
      Jeff Layton 提交于
      struct file_lock is pretty large, so we really don't want that on the
      stack in a potentially long call chain. Reorganize the arguments to
      CIFSSMBPosixLock to eliminate the need for that.
      
      Eliminate the get_flag and simply use a non-NULL pLockInfo to indicate
      that this is a "get" operation. In order to do that, need to add a new
      loff_t argument for the start_offset.
      Reported-by: NAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      c5fd363d
    • J
      cifs: remove extraneous newlines from cERROR and cFYI calls · ac3aa2f8
      Jeff Layton 提交于
      Those macros add a newline on their own, so there's not any need to
      embed one in the message itself.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      ac3aa2f8
    • J
      cifs: after upcalling for krb5 creds, invalidate key rather than revoking it · 00401ff7
      Jeff Layton 提交于
      Calling key_revoke here isn't ideal as further requests for the key will
      end up returning -EKEYREVOKED until it gets purged from the cache. What we
      really intend here is to force a new upcall on the next request_key.
      
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      00401ff7
    • J
      locks: fix checking of fcntl_setlease argument · 0ec4f431
      J. Bruce Fields 提交于
      The only checks of the long argument passed to fcntl(fd,F_SETLEASE,.)
      are done after converting the long to an int.  Thus some illegal values
      may be let through and cause problems in later code.
      
      [ They actually *don't* cause problems in mainline, as of Dave Jones's
        commit 8d657eb3 "Remove easily user-triggerable BUG from
        generic_setlease", but we should fix this anyway.  And this patch will
        be necessary to fix real bugs on earlier kernels. ]
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0ec4f431
    • L
      Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · a66d2c8f
      Linus Torvalds 提交于
      Pull the big VFS changes from Al Viro:
       "This one is *big* and changes quite a few things around VFS.  What's in there:
      
         - the first of two really major architecture changes - death to open
           intents.
      
           The former is finally there; it was very long in making, but with
           Miklos getting through really hard and messy final push in
           fs/namei.c, we finally have it.  Unlike his variant, this one
           doesn't introduce struct opendata; what we have instead is
           ->atomic_open() taking preallocated struct file * and passing
           everything via its fields.
      
           Instead of returning struct file *, it returns -E...  on error, 0
           on success and 1 in "deal with it yourself" case (e.g.  symlink
           found on server, etc.).
      
           See comments before fs/namei.c:atomic_open().  That made a lot of
           goodies finally possible and quite a few are in that pile:
           ->lookup(), ->d_revalidate() and ->create() do not get struct
           nameidata * anymore; ->lookup() and ->d_revalidate() get lookup
           flags instead, ->create() gets "do we want it exclusive" flag.
      
           With the introduction of new helper (kern_path_locked()) we are rid
           of all struct nameidata instances outside of fs/namei.c; it's still
           visible in namei.h, but not for long.  Come the next cycle,
           declaration will move either to fs/internal.h or to fs/namei.c
           itself.  [me, miklos, hch]
      
         - The second major change: behaviour of final fput().  Now we have
           __fput() done without any locks held by caller *and* not from deep
           in call stack.
      
           That obviously lifts a lot of constraints on the locking in there.
           Moreover, it's legal now to call fput() from atomic contexts (which
           has immediately simplified life for aio.c).  We also don't need
           anti-recursion logics in __scm_destroy() anymore.
      
           There is a price, though - the damn thing has become partially
           asynchronous.  For fput() from normal process we are guaranteed
           that pending __fput() will be done before the caller returns to
           userland, exits or gets stopped for ptrace.
      
           For kernel threads and atomic contexts it's done via
           schedule_work(), so theoretically we might need a way to make sure
           it's finished; so far only one such place had been found, but there
           might be more.
      
           There's flush_delayed_fput() (do all pending __fput()) and there's
           __fput_sync() (fput() analog doing __fput() immediately).  I hope
           we won't need them often; see warnings in fs/file_table.c for
           details.  [me, based on task_work series from Oleg merged last
           cycle]
      
         - sync series from Jan
      
         - large part of "death to sync_supers()" work from Artem; the only
           bits missing here are exofs and ext4 ones.  As far as I understand,
           those are going via the exofs and ext4 trees resp.; once they are
           in, we can put ->write_super() to the rest, along with the thread
           calling it.
      
         - preparatory bits from unionmount series (from dhowells).
      
         - assorted cleanups and fixes all over the place, as usual.
      
        This is not the last pile for this cycle; there's at least jlayton's
        ESTALE work and fsfreeze series (the latter - in dire need of fixes,
        so I'm not sure it'll make the cut this cycle).  I'll probably throw
        symlink/hardlink restrictions stuff from Kees into the next pile, too.
        Plus there's a lot of misc patches I hadn't thrown into that one -
        it's large enough as it is..."
      
      * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (127 commits)
        ext4: switch EXT4_IOC_RESIZE_FS to mnt_want_write_file()
        btrfs: switch btrfs_ioctl_balance() to mnt_want_write_file()
        switch dentry_open() to struct path, make it grab references itself
        spufs: shift dget/mntget towards dentry_open()
        zoran: don't bother with struct file * in zoran_map
        ecryptfs: don't reinvent the wheels, please - use struct completion
        don't expose I_NEW inodes via dentry->d_inode
        tidy up namei.c a bit
        unobfuscate follow_up() a bit
        ext3: pass custom EOF to generic_file_llseek_size()
        ext4: use core vfs llseek code for dir seeks
        vfs: allow custom EOF in generic_file_llseek code
        vfs: Avoid unnecessary WB_SYNC_NONE writeback during sys_sync and reorder sync passes
        vfs: Remove unnecessary flushing of block devices
        vfs: Make sys_sync writeout also block device inodes
        vfs: Create function for iterating over block devices
        vfs: Reorder operations during sys_sync
        quota: Move quota syncing to ->sync_fs method
        quota: Split dquot_quota_sync() to writeback and cache flushing part
        vfs: Move noop_backing_dev_info check from sync into writeback
        ...
      a66d2c8f
  2. 23 7月, 2012 30 次提交
    • L
      Merge tag 'mmc-merge-for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc · a6be1fcb
      Linus Torvalds 提交于
      Pull MMC updates from Chris Ball:
       "MMC highlights for 3.6:
      
        Core:
         - Rename cd-gpio to slot-gpio and extend it to support more slot GPIO
           functions, such as write-protect.
         - Add a function to get regulators (Vdd and Vccq) for a host.
      
        Drivers:
         - sdhci-pxav2, sdhci-pxav3: Add device tree support.
         - sdhi: Add device tree support.
         - sh_mmcif: Add support for regulators, device tree, slot-gpio.
         - tmio: Add regulator support, use slot-gpio."
      
      * tag 'mmc-merge-for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (62 commits)
        mmc: sdhci-dove: Prepare for common clock framework
        mmc: sdhci-dove: Add SDHCI_QUIRK_NO_HISPD_BIT
        mmc: omap_hsmmc: ensure probe returns error upon resource failure
        mmc: mxs-mmc: Add wp-inverted property
        mmc: esdhc: Fix DMA_MASK to not break mx25 DMA access
        mmc: core: reset signal voltage on power up
        mmc: sd: Fix sd current limit setting
        mmc: omap_hsmmc: add clk_prepare and clk_unprepare
        mmc: sdhci: When a UHS switch fails, cycle power if regulator is used
        mmc: atmel-mci: modify CLKDIV displaying in debugfs
        mmc: atmel-mci: fix incorrect setting of host->data to NULL
        mmc: sdhci: poll for card even when card is logically unremovable
        mmc: sdhci: Introduce new flag SDHCI_USING_RETUNING_TIMER
        mmc: sdio: Change pr_warning to pr_warn_ratelimited
        mmc: core: Simplify and fix for SD switch processing
        mmc: sdhci: restore host settings when card is removed
        mmc: sdhci: fix incorrect command used in tuning
        mmc: sdhci-pci: CaFe has broken card detection
        mmc: sdhci: Report failure reasons for all cases in sdhci_add_host()
        mmc: s3cmci: Convert s3cmci driver to gpiolib API
        ...
      a6be1fcb
    • L
      Merge branch 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5b160bd4
      Linus Torvalds 提交于
      Pull x86/mce changes from Ingo Molnar:
       "This tree improves the AMD thresholding bank code and includes a
        memory fault signal handling fixlet."
      
      * 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Fix siginfo_t->si_addr value for non-recoverable memory faults
        x86, MCE, AMD: Update copyrights and boilerplate
        x86, MCE, AMD: Give proper names to the thresholding banks
        x86, MCE, AMD: Make error_count read only
        x86, MCE, AMD: Cleanup reading of error_count
        x86, MCE, AMD: Print decimal thresholding values
        x86, MCE, AMD: Move shared bank to node descriptor
        x86, MCE, AMD: Remove local_allocate_... wrapper
        x86, MCE, AMD: Remove shared banks sysfs linking
        x86, amd_nb: Export model 0x10 and later PCI id
      5b160bd4
    • S
      mmc: sdhci-dove: Prepare for common clock framework · 30b87c60
      Sebastian Hesselbarth 提交于
      As mach-dove is moving towards common clock framework prepare
      the sdhci driver to grab its clock.
      Signed-off-by: NSebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      30b87c60
    • S
      mmc: sdhci-dove: Add SDHCI_QUIRK_NO_HISPD_BIT · a9ca1d54
      Sebastian Hesselbarth 提交于
      The sdio controller on dove doesn't have a bit to indicate
      high-speed. With the quirk set it fixes accessing high-speed
      sdcards.
      Signed-off-by: NSebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      a9ca1d54
    • K
      mmc: omap_hsmmc: ensure probe returns error upon resource failure · 9c17d08c
      Kevin Hilman 提交于
      If platform_get_resource_by_name() fails, driver probe is aborted an
      should return an error so the driver is not bound to the device.
      
      However, in the current error path of platform_get_resource_by_name(),
      probe returns zero since the return value (ret) is not properly set.
      With a zero return value, the driver core assumes probe was successful
      and will bind the driver to the device.
      
      Fix this by ensuring that probe returns an error code in this failure
      path.
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      Acked-by: NVenkatraman S <svenkatr@ti.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      9c17d08c
    • M
      mmc: mxs-mmc: Add wp-inverted property · b6e76f10
      Marek Vasut 提交于
      The write-protect GPIO is inverted on some boards. Handle such case.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      b6e76f10
    • W
      mmc: esdhc: Fix DMA_MASK to not break mx25 DMA access · 9a0985b7
      Wilson Callan 提交于
      Patch to not set reserved bits in i.MX25 PROCTL register.  DMA stops
      working if those bits get set.
      Signed-off-by: NWilson Callan <wilson.callan@savantsystems.com>
      Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      9a0985b7
    • L
      Merge tag 'pm-for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 7100e505
      Linus Torvalds 提交于
      Pull power management updates from Rafael Wysocki:
      
       - ACPI conversion to PM handling based on struct dev_pm_ops.
       - Conversion of a number of platform drivers to PM handling based on
         struct dev_pm_ops and removal of empty legacy PM callbacks from a
         couple of PCI drivers.
       - Suspend-to-both for in-kernel hibernation from Bojan Smojver.
       - cpuidle fixes and cleanups from ShuoX Liu, Daniel Lezcano and Preeti
         Murthy.
       - cpufreq bug fixes from Jonghwa Lee and Stephen Boyd.
       - Suspend and hibernate fixes from Srivatsa Bhat and Colin Cross.
       - Generic PM domains framework updates.
       - RTC CMOS wakeup signaling update from Paul Fox.
       - sparse warnings fixes from Sachin Kamat.
       - Build warnings fixes for the generic PM domains framework and PM
         sysfs code.
       - sysfs switch for printing device suspend times from Sameer Nanda.
       - Documentation fix from Oskar Schirmer.
      
      * tag 'pm-for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (70 commits)
        cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch
        EXYNOS: bugfix on retrieving old_index from freqs.old
        PM / Sleep: call early resume handlers when suspend_noirq fails
        PM / QoS: Use NULL pointer instead of plain integer in qos.c
        PM / QoS: Use NULL pointer instead of plain integer in pm_qos.h
        PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock
        PM / Sleep: Add missing static storage class specifiers in main.c
        cpuilde / ACPI: remove time from acpi_processor_cx structure
        cpuidle / ACPI: remove usage from acpi_processor_cx structure
        cpuidle / ACPI : remove latency_ticks from acpi_processor_cx structure
        rtc-cmos: report wakeups from interrupt handler
        PM / Sleep: Fix build warning in sysfs.c for CONFIG_PM_SLEEP unset
        PM / Domains: Fix build warning for CONFIG_PM_RUNTIME unset
        olpc-xo15-sci: Use struct dev_pm_ops for power management
        PM / Domains: Replace plain integer with NULL pointer in domain.c file
        PM / Domains: Add missing static storage class specifier in domain.c file
        PM / crypto / ux500: Use struct dev_pm_ops for power management
        PM / IPMI: Remove empty legacy PCI PM callbacks
        tpm_nsc: Use struct dev_pm_ops for power management
        tpm_tis: Use struct dev_pm_ops for power management
        ...
      7100e505
    • L
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · cb47c183
      Linus Torvalds 提交于
      Pull target updates from Nicholas Bellinger:
       "There have been lots of work in a number of areas this past round.
        The highlights include:
      
         - Break out target_core_cdb.c emulation into SPC/SBC ops (hch)
         - Add a parse_cdb method to target backend drivers (hch)
         - Move sync_cache + write_same + unmap into spc_ops (hch)
         - Use target_execute_cmd for WRITEs in iscsi_target + srpt (hch)
         - Offload WRITE I/O backend submission in tcm_qla2xxx + tcm_fc (hch +
           nab)
         - Refactor core_update_device_list_for_node() into enable/disable
           funcs (agrover)
         - Replace the TCM processing thread with a TMR work queue (hch)
         - Fix regression in transport_add_device_to_core_hba from TMR
           conversion (DanC)
         - Remove racy, now-redundant check of sess_tearing_down with qla2xxx
           (roland)
         - Add range checking, fix reading of data len + possible underflow in
           UNMAP (roland)
         - Allow for target_submit_cmd() returning errors + convert fabrics
           (roland + nab)
         - Drop bogus struct file usage for iSCSI/SCTP (viro)"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (54 commits)
        iscsi-target: Drop bogus struct file usage for iSCSI/SCTP
        target: NULL dereference on error path
        target: Allow for target_submit_cmd() returning errors
        target: Check number of unmap descriptors against our limit
        target: Fix possible integer underflow in UNMAP emulation
        target: Fix reading of data length fields for UNMAP commands
        target: Add range checking to UNMAP emulation
        target: Add generation of LOGICAL BLOCK ADDRESS OUT OF RANGE
        target: Make unnecessarily global se_dev_align_max_sectors() static
        target: Remove se_session.sess_wait_list
        qla2xxx: Remove racy, now-redundant check of sess_tearing_down
        target: Check sess_tearing_down in target_get_sess_cmd()
        sbp-target: Consolidate duplicated error path code in sbp_handle_command()
        target: Un-export target_get_sess_cmd()
        qla2xxx: Get rid of redundant qla_tgt_sess.tearing_down
        target: Make core_disable_device_list_for_node use pre-refactoring lock ordering
        target: refactor core_update_device_list_for_node()
        target: Eliminate else using boolean logic
        target: Misc retval cleanups
        target: Remove hba param from core_dev_add_lun
        ...
      cb47c183
    • L
      Merge tag 'regulator-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 4d460fd3
      Linus Torvalds 提交于
      Pull regulator updates from Mark Brown:
       "Lots and lots of fixes from Axel and some others here, plus some
        framework enhancements which continue the theme of factoring code out
        of the drivers and into the core.
      
         - Initial framework support for GPIO controlled enable signals,
           saving a bunch of code in drivers.
         - Move fixed regulator enable time and voltage mapping table
           specifications to data.
         - Used some of the recent framework enhancements to make voltage
           change notifications more useful, passing the voltage in as an
           argument to the notification.
         - Fixed the pattern used for finding individual regulators on a
           device to not rely on the node name, supporting the use of multiple
           PMICs of the same type in the system.
         - New drivers for Maxim MAX77686, TI LP872x and LP8788, Samsung
           S2MPS11, and Wolfson Arizona microphone supplies and LDOs."
      
      * tag 'regulator-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (176 commits)
        regulator: add new lp8788 regulator driver
        regulator: mc13xxx: Remove extern function declaration for mc13xxx_sw_regulator
        regulator: tps65910: set input_supply on desc unconditionally
        regulator: palmas: Fix calcuating selector in palmas_map_voltage_smps
        regulator: lp872x: Simplify implementation of lp872x_find_regulator_init_data()
        regulator: twl: Fix list_voltate for twl6030ldo_ops
        regulator: twl: Convert twl6030ldo_ops to [get|set]_voltage_sel
        regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo
        regulator: s5m8767: Properly handle gpio_request failure
        regulator: max8997: Properly handle gpio_request failure
        regulator: tps62360: use devm_* for gpio request
        regulator: tps6586x: add support for input supply
        regulator: tps65217: Add device tree support
        regulator: aat2870: Remove unused min_uV and max_uV from struct aat2870_regulator
        regulator: aat2870: Convert to regulator_list_voltage_table
        regulator: da9052: initialize of_node param for regulator register
        regulator: Add REGULATOR_STATUS_UNDEFINED.
        regulator: Fix a typo in regulator_mode_to_status() core function.
        regulator: s2mps11: Use sec_reg_write rather than sec_reg_update when mask is 0xff
        regulator: s2mps11: Fix wrong setting for config.dev
        ...
      4d460fd3
    • L
      Merge tag 'regmap-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 7cd58b0a
      Linus Torvalds 提交于
      Pull regmap updates from Mark Brown:
       "A few fixes plus a few features, the most generally useful thing being
        the register paging support which can be used by quite a few devices:
      
         - Support for wake IRQs in regmap-irq
         - Support for register paging
         - Support for explicitly specified endianness, mostly for MMIO."
      
      * tag 'regmap-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: Fix incorrect arguments to kzalloc() call
        regmap: Add hook for printk logging for debugging during early init
        regmap: Fix work_buf switching for page update during virtual range access.
        regmap: Add support for register indirect addressing.
        regmap: Move lock out from internal function _regmap_update_bits().
        regmap: mmio: Staticize regmap_mmio_gen_context()
        regmap: Remove warning on stubbed dev_get_regmap()
        regmap: Implement support for wake IRQs
        regmap: Don't try to map non-existant IRQs
        regmap: Constify regmap_irq_chip
        regmap: mmio: request native endian formatting
        regmap: allow busses to request formatting with specific endianness
      7cd58b0a
    • A
      8cae6f71
    • A
      11e62a8f
    • A
      765927b2
    • A
      spufs: shift dget/mntget towards dentry_open() · bf349a44
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      bf349a44
    • A
      zoran: don't bother with struct file * in zoran_map · 3b6456d2
      Al Viro 提交于
      all we need it for is file->private_data, which is assign-once, already
      assigned by that point and, incidentally, its value is already in use
      by zoran ->mmap() anyway.  So just store that pointer instead...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      3b6456d2
    • A
      ecryptfs: don't reinvent the wheels, please - use struct completion · 3b8b4871
      Al Viro 提交于
      ... and keep the sodding requests on stack - they are small enough.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      3b8b4871
    • A
      don't expose I_NEW inodes via dentry->d_inode · 8fc37ec5
      Al Viro 提交于
      	d_instantiate(dentry, inode);
      	unlock_new_inode(inode);
      
      is a bad idea; do it the other way round...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8fc37ec5
    • A
      tidy up namei.c a bit · 32a7991b
      Al Viro 提交于
      locking/unlocking for rcu walk taken to a couple of inline helpers
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      32a7991b
    • A
      unobfuscate follow_up() a bit · 3c0a6163
      Al Viro 提交于
      really convoluted test in there has grown up during struct mount
      introduction; what it checks is that we'd reached the root of
      mount tree.
      3c0a6163
    • E
      ext3: pass custom EOF to generic_file_llseek_size() · de9b9422
      Eric Sandeen 提交于
      Use the new custom EOF argument to generic_file_llseek_size so
      that SEEK_END will go to the max hash value for htree dirs
      in ext3 rather than to i_size_read()
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      de9b9422
    • E
      ext4: use core vfs llseek code for dir seeks · ec7268ce
      Eric Sandeen 提交于
      Use the new functionality in generic_file_llseek_size() to
      accept a custom EOF position, and un-cut-and-paste all the
      vfs llseek code from ext4.
      
      Also fix up comments on ext4_llseek() to reflect reality.
      Signed-off-by: NEric Sandeen <sandeen@redaht.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ec7268ce
    • E
      vfs: allow custom EOF in generic_file_llseek code · e8b96eb5
      Eric Sandeen 提交于
      For ext3/4 htree directories, using the vfs llseek function with
      SEEK_END goes to i_size like for any other file, but in reality
      we want the maximum possible hash value.  Recent changes
      in ext4 have cut & pasted generic_file_llseek() back into fs/ext4/dir.c,
      but replicating this core code seems like a bad idea, especially
      since the copy has already diverged from the vfs.
      
      This patch updates generic_file_llseek_size to accept
      both a custom maximum offset, and a custom EOF position.  With this
      in place, ext4_dir_llseek can pass in the appropriate maximum hash
      position for both maxsize and eof, and get what it wants.
      
      As far as I know, this does not fix any bugs - nfs in the kernel
      doesn't use SEEK_END, and I don't know of any user who does.  But
      some ext4 folks seem keen on doing the right thing here, and I can't
      really argue.
      
      (Patch also fixes up some comments slightly)
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      e8b96eb5
    • J
      vfs: Avoid unnecessary WB_SYNC_NONE writeback during sys_sync and reorder sync passes · 4ea425b6
      Jan Kara 提交于
      wakeup_flusher_threads(0) will queue work doing complete writeback for each
      flusher thread. Thus there is not much point in submitting another work doing
      full inode WB_SYNC_NONE writeback by writeback_inodes_sb().
      
      After this change it does not make sense to call nonblocking ->sync_fs and
      block device flush before calling sync_inodes_sb() because
      wakeup_flusher_threads() is completely asynchronous and thus these functions
      would be called in parallel with inode writeback running which will effectively
      void any work they do. So we move sync_inodes_sb() call before these two
      functions.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      4ea425b6
    • J
      vfs: Remove unnecessary flushing of block devices · d0e91b13
      Jan Kara 提交于
      It is not necessary to write block devices twice. The reason why we first did
      flush and then proper sync is that
        for_each_bdev() {
          write_bdev()
          wait_for_completion()
        }
      is much slower than
        for_each_bdev()
          write_bdev()
        for_each_bdev()
          wait_for_completion()
      when there is bigger amount of data. But as is seen in the above, there's no real
      need to scan pages and submit them twice. We just need to separate the submission
      and waiting part. This patch does that.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d0e91b13
    • J
      vfs: Make sys_sync writeout also block device inodes · a8c7176b
      Jan Kara 提交于
      In case block device does not have filesystem mounted on it, sys_sync will just
      ignore it and doesn't writeout its dirty pages. This is because writeback code
      avoids writing inodes from superblock without backing device and
      blockdev_superblock is such a superblock.  Since it's unexpected that sync
      doesn't writeout dirty data for block devices be nice to users and change the
      behavior to do so. So now we iterate over all block devices on blockdev_super
      instead of iterating over all superblocks when syncing block devices.
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a8c7176b
    • J
      vfs: Create function for iterating over block devices · 5c0d6b60
      Jan Kara 提交于
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5c0d6b60
    • J
      vfs: Reorder operations during sys_sync · b3de6531
      Jan Kara 提交于
      Change the order of operations during sync from
      
      for_each_sb {
              writeback_inodes_sb();
              sync_fs(nowait);
              __sync_blockdev(nowait);
      }
      for_each_sb {
              sync_inodes_sb();
              sync_fs(wait);
              __sync_blockdev(wait);
      }
      
      to
      
      for_each_sb
              writeback_inodes_sb();
      for_each_sb
              sync_fs(nowait);
      for_each_sb
              __sync_blockdev(nowait);
      for_each_sb
              sync_inodes_sb();
      for_each_sb
              sync_fs(wait);
      for_each_sb
              __sync_blockdev(wait);
      
      This is a preparation for the following patches in this series.
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b3de6531
    • J
      quota: Move quota syncing to ->sync_fs method · a1177825
      Jan Kara 提交于
      Since the moment writes to quota files are using block device page cache and
      space for quota structures is reserved at the moment they are first accessed we
      have no reason to sync quota before inode writeback. In fact this order is now
      only harmful since quota information can easily change during inode writeback
      (either because conversion of delayed-allocated extents or simply because of
      allocation of new blocks for simple filesystems not using page_mkwrite).
      
      So move syncing of quota information after writeback of inodes into ->sync_fs
      method. This way we do not have to use ->quota_sync callback which is primarily
      intended for use by quotactl syscall anyway and we get rid of calling
      ->sync_fs() twice unnecessarily. We skip quota syncing for OCFS2 since it does
      proper quota journalling in all cases (unlike ext3, ext4, and reiserfs which
      also support legacy non-journalled quotas) and thus there are no dirty quota
      structures.
      
      CC: "Theodore Ts'o" <tytso@mit.edu>
      CC: Joel Becker <jlbec@evilplan.org>
      CC: reiserfs-devel@vger.kernel.org
      Acked-by: NSteven Whitehouse <swhiteho@redhat.com>
      Acked-by: NDave Kleikamp <shaggy@kernel.org>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a1177825
    • J
      quota: Split dquot_quota_sync() to writeback and cache flushing part · ceed1723
      Jan Kara 提交于
      Split off part of dquot_quota_sync() which writes dquots into a quota file
      to a separate function. In the next patch we will use the function from
      filesystems and we do not want to abuse ->quota_sync quotactl callback more
      than necessary.
      Acked-by: NSteven Whitehouse <swhiteho@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ceed1723