1. 22 5月, 2010 40 次提交
    • M
      MIPS: Alchemy: add sysdev for IRQ PM. · 0f0d85bc
      Manuel Lauss 提交于
      Use a sysdev to implement PM methods for the Au1000 interrupt controllers.
      Signed-off-by: NManuel Lauss <manuel.lauss@gmail.com>
      To: Linux-MIPS <linux-mips@linux-mips.org>
      Patchwork: http://patchwork.linux-mips.org/patch/1114/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0f0d85bc
    • M
      MIPS: Alchemy: Fix up residual devboard poweroff/reboot code. · 7b5fcd69
      Manuel Lauss 提交于
      Clean out stray unused board_reset() calls in pb1x boards, the PB1000 is
      different from the rest and gets private methods.
      
      (Cleanup after 32fd6901)
      Signed-off-by: NManuel Lauss <manuel.lauss@gmail.com>
      To: Linux-MIPS <linux-mips@linux-mips.org>
      Patchwork: http://patchwork.linux-mips.org/patch/1085/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      7b5fcd69
    • W
      MIPS: Loongson: update cpu-feature-overrides.h · b8853aa3
      Wu Zhangjin 提交于
      Loongson doesn't support MIPSR2, therefore, MIPSR2 vectored interrupts
      (cpu_has_vint) and MIPSR2 external interrupt controller mode
      (cpu_has_veic) are 0.
      Signed-off-by: NWu Zhangjin <wuzhangjin@gmail.com>
      Cc: Linux-MIPS <linux-mips@linux-mips.org>
      Patchwork: http://patchwork.linux-mips.org/patch/1112/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b8853aa3
    • J
      MIPS: Use set_cpus_allowed_ptr · ed1bbdef
      Julia Lawall 提交于
      From: Julia Lawall <julia@diku.dk>
      
      Use set_cpus_allowed_ptr rather than set_cpus_allowed.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression E1,E2;
      @@
      
      - set_cpus_allowed(E1, cpumask_of_cpu(E2))
      + set_cpus_allowed_ptr(E1, cpumask_of(E2))
      
      @@
      expression E;
      identifier I;
      @@
      
      - set_cpus_allowed(E, I)
      + set_cpus_allowed_ptr(E, &I)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      To: peterz@infradead.org
      To: mingo@elte.hu
      To: tglx@linutronix.de
      To: oleg@redhat.com
      To: linux-mips@linux-mips.org
      To: linux-kernel@vger.kernel.org
      To: kernel-janitors@vger.kernel.org
      Patchwork: http://patchwork.linux-mips.org/patch/1087/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ed1bbdef
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 8b108c60
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (59 commits)
        HID: fix up 'EMBEDDED' mess in Kconfig
        HID: roccat: cleanup preprocessor macros
        HID: roccat: refactor special event handling
        HID: roccat: fix special button support
        HID: roccat: Correctly mark init and exit functions
        HID: hidraw: Use Interrupt Endpoint for OUT Transfers if Available
        HID: hid-samsung: remove redundant key mappings
        HID: add omitted hid-zydacron.c file
        HID: hid-samsung: add support for Creative Desktop Wireless 6000
        HID: picolcd: Eliminate use after free
        HID: Zydacron Remote Control driver
        HID: Use kmemdup
        HID: magicmouse: fix input registration
        HID: make Prodikeys driver standalone config option
        HID: Prodikeys PC-MIDI HID Driver
        HID: hidraw: fix indentation
        HID: ntrig: add filtering module parameters
        HID: ntrig: add sysfs access to filter parameters
        HID: ntrig: add sensitivity and responsiveness support
        HID: add multi-input quirk for eGalax Touchcontroller
        ...
      8b108c60
    • L
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 · 7ce1418f
      Linus Torvalds 提交于
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (31 commits)
        dquot: Detect partial write error to quota file in write_blk() and add printk_ratelimit for quota error messages
        ocfs2: Fix lock inversion in quotas during umount
        ocfs2: Use __dquot_transfer to avoid lock inversion
        ocfs2: Fix NULL pointer deref when writing local dquot
        ocfs2: Fix estimate of credits needed for quota allocation
        ocfs2: Fix quota locking
        ocfs2: Avoid unnecessary block mapping when refreshing quota info
        ocfs2: Do not map blocks from local quota file on each write
        quota: Refactor dquot_transfer code so that OCFS2 can pass in its references
        quota: unify quota init condition in setattr
        quota: remove sb_has_quota_active in get/set_info
        quota: unify ->set_dqblk
        quota: unify ->get_dqblk
        ext3: make barrier options consistent with ext4
        quota: Make quota stat accounting lockless.
        suppress warning: "quotatypes" defined but not used
        ext3: Fix waiting on transaction during fsync
        jbd: Provide function to check whether transaction will issue data barrier
        ufs: add ufs speciffic ->setattr call
        BKL: Remove BKL from ext2 filesystem
        ...
      7ce1418f
    • L
      Merge branch 'omap-for-linus' of... · a6f03986
      Linus Torvalds 提交于
      Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
      
      * 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (113 commits)
        omap4: Add support for i2c init
        omap: Fix i2c platform init code for omap4
        OMAP2 clock: fix recursive spinlock attempt when CONFIG_CPU_FREQ=y
        OMAP powerdomain, hwmod, omap_device: add some credits
        OMAP4 powerdomain: Support LOWPOWERSTATECHANGE for powerdomains
        OMAP3 clock: add support for setting the divider for sys_clkout2 using clk_set_rate
        OMAP4 powerdomain: Fix pwrsts flags for ALWAYS ON domains
        OMAP: timers: Fix clock source names for OMAP4
        OMAP4 clock: Support clk_set_parent
        OMAP4: PRCM: Add offset defines for all CM registers
        OMAP4: PRCM: Add offset defines for all PRM registers
        OMAP4: PRCM: Remove duplicate definition of base addresses
        OMAP4: PRM: Remove MPU internal code name and apply PRCM naming convention
        OMAP4: CM: Remove non-functional registers in ES1.0
        OMAP: hwmod: Replace WARN by pr_warning for clockdomain check
        OMAP: hwmod: Rename hwmod name for the MPU
        OMAP: hwmod: Do not exit the iteration if one clock init failed
        OMAP: hwmod: Replace WARN by pr_warning if clock lookup failed
        OMAP: hwmod: Remove IS_ERR check with omap_clk_get_by_name return value
        OMAP: hwmod: Fix wrong pointer iteration in oh->slaves
        ...
      a6f03986
    • L
      Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · e0bc5d4a
      Linus Torvalds 提交于
      * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        i2c-nforce2: Remove redundant error messages on ACPI conflict
        i2c: Use <linux/io.h> instead of <asm/io.h>
        i2c-algo-pca: Fix coding style issues
        i2c-dev: Fix all coding style issues
        i2c-core: Fix some coding style issues
        i2c-gpio: Move initialization code to subsys_initcall()
        i2c-parport: Make template structure const
        i2c-dev: Remove unnecessary casts
        at24: Fall back to byte or word reads if needed
        i2c-stub: Expose the default functionality flags
        i2c/scx200_acb: Make PCI device ids constant
        i2c-i801: Fix all checkpatch warnings
        i2c-i801: All newer devices have all the optional features
        i2c-i801: Let the user disable selected driver features
      e0bc5d4a
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 · 7f02ab3c
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (25 commits)
        serial: Tidy REMOTE_DEBUG
        serial: isicomm: handle running out of slots
        serial: bfin_sport_uart: Use resource size to fix off-by-one error
        tty: fix obsolete comment on tty_insert_flip_string_fixed_flag
        serial: Add driver for the Altera UART
        serial: Add driver for the Altera JTAG UART
        serial: timbuart: make sure last byte is sent when port is closed
        serial: two branches the same in timbuart_set_mctrl()
        serial: uartlite: move from byte accesses to word accesses
        tty: n_gsm: depends on NET
        tty: n_gsm line discipline
        serial: TTY: new ldiscs for staging
        serial: bfin_sport_uart: drop redundant cpu depends
        serial: bfin_sport_uart: drop the experimental markings
        serial: bfin_sport_uart: pull in bfin_sport.h for SPORT defines
        serial: bfin_sport_uart: only enable SPORT TX if data is to be sent
        serial: bfin_sport_uart: drop useless status masks
        serial: bfin_sport_uart: zero sport_uart_port if allocated dynamically
        serial: bfin_sport_uart: protect changes to uart_port
        serial: bfin_sport_uart: add support for CTS/RTS via GPIOs
        ...
      7f02ab3c
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 · d6fb1db0
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (38 commits)
        net: Expose all network devices in a namespaces in sysfs
        hotplug: netns aware uevent_helper
        kobj: Send hotplug events in the proper namespace.
        netlink: Implment netlink_broadcast_filtered
        net/sysfs: Fix the bitrot in network device kobject namespace support
        netns: Teach network device kobjects which namespace they are in.
        kobject: Send hotplug events in all network namespaces
        driver-core: fix Typo in drivers/base/core.c for CONFIG_MODULE
        pci: check caps from sysfs file open to read device dependent config space
        sysfs: add struct file* to bin_attr callbacks
        sysfs: Remove usage of S_BIAS to avoid merge conflict with the vfs tree
        sysfs: Don't use enums in inline function declaration.
        sysfs-namespaces: add a high-level Documentation file
        sysfs: Comment sysfs directory tagging logic
        driver core: Implement ns directory support for device classes.
        sysfs: Implement sysfs_delete_link
        sysfs: Add support for tagged directories with untagged members.
        sysfs: Implement sysfs tagged directory support.
        kobj: Add basic infrastructure for dealing with namespaces.
        sysfs: Remove double free sysfs_get_sb
        ...
      d6fb1db0
    • R
      interrupt.h: fix fatal kernel-doc error · b4e6b097
      Randy Dunlap 提交于
      Fix kernel-doc fatal error:
      /** beginning a non-kernel-doc comment block:
      (That alone does not kill kernel-doc, but the 'enum' was
      totally confusing to it.)
      
      Error(/lnx/src/TMP/linux-2.6.34-git6//include/linux/interrupt.h:88): cannot understand prototype: 'enum '
      make[2]: *** [Documentation/DocBook/genericirq.xml] Error 1
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b4e6b097
    • J
      dquot: Detect partial write error to quota file in write_blk() and add... · 1907131b
      Jiaying Zhang 提交于
      dquot: Detect partial write error to quota file in write_blk() and add printk_ratelimit for quota error messages
      
      This patch changes quota_tree.c:write_blk() to detect error caused by partial
      write to quota file and add a macro to limit control printed quota error
      messages so we won't fill up dmesg with a corrupted quota file.
      Signed-off-by: NJiaying Zhang <jiayingz@google.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      1907131b
    • J
      ocfs2: Fix lock inversion in quotas during umount · c06bcbfa
      Jan Kara 提交于
      We cannot cancel delayed work from ocfs2_local_free_info because that is called
      with dqonoff_mutex held and the work it cancels requires dqonoff_mutex to
      finish. Cancel the work before acquiring dqonoff_mutex.
      Acked-by: NJoel Becker <Joel.Becker@oracle.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      c06bcbfa
    • J
      ocfs2: Use __dquot_transfer to avoid lock inversion · 52a9ee28
      Jan Kara 提交于
      dquot_transfer() acquires own references to dquots via dqget(). Thus it waits
      for dq_lock which creates a lock inversion because dq_lock ranks above
      transaction start but transaction is already started in ocfs2_setattr(). Fix
      the problem by passing own references directly to __dquot_transfer.
      Acked-by: NJoel Becker <Joel.Becker@oracle.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      52a9ee28
    • J
      ocfs2: Fix NULL pointer deref when writing local dquot · 741e1289
      Jan Kara 提交于
      commit_dqblk() can write quota info to global file. That is actually a bad
      thing to do because if we are just modifying local quota file, we are not
      prepared (do not hold proper locks, do not have transaction credits) to do
      a modification of the global quota file. So do not use commit_dqblk() and
      instead call our writing function directly.
      Acked-by: NJoel Becker <Joel.Becker@oracle.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      741e1289
    • J
      ocfs2: Fix estimate of credits needed for quota allocation · 832d09cf
      Jan Kara 提交于
      We were missing reservation of a journal credit for modification of quota
      file inode when creating new dquot structure in the global quota file.
      Acked-by: NJoel Becker <Joel.Becker@oracle.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      832d09cf
    • J
      ocfs2: Fix quota locking · fb8dd8d7
      Jan Kara 提交于
      OCFS2 had three issues with quota locking:
      a) When reading dquot from global quota file, we started a transaction while
         holding dqio_mutex which is prone to deadlocks because other paths do it
         the other way around
      b) During ocfs2_sync_dquot we were not protected against concurrent writers
         on the same node. Because we first copy data to local buffer, a race
         could happen resulting in old data being written to global quota file and
         thus causing quota inconsistency after a crash.
      c) ip_alloc_sem of quota files was acquired while a transaction is started
         in ocfs2_quota_write which can deadlock because we first get ip_alloc_sem
         and then start a transaction when extending quota files.
      
      We fix the problem a) by pulling all necessary code to ocfs2_acquire_dquot
      and ocfs2_release_dquot. Thus we no longer depend on generic dquot_acquire
      to do the locking and can force proper lock ordering.
      
      Problems b) and c) are fixed by locking i_mutex and ip_alloc_sem of
      global quota file in ocfs2_lock_global_qf and removing ip_alloc_sem from
      ocfs2_quota_read and ocfs2_quota_write.
      Acked-by: NJoel Becker <Joel.Becker@oracle.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      fb8dd8d7
    • J
      ocfs2: Avoid unnecessary block mapping when refreshing quota info · ae4f6ef1
      Jan Kara 提交于
      The position of global quota file info does not change. So we do not have
      to do logical -> physical block translation every time we reread it from
      disk. Thus we can also avoid taking ip_alloc_sem.
      Acked-by: NJoel Becker <Joel.Becker@oracle.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      ae4f6ef1
    • J
      ocfs2: Do not map blocks from local quota file on each write · f64dd44e
      Jan Kara 提交于
      There is no need to map offset of local dquot structure to on disk block
      in each quota write. It is enough to map it just once and store the physical
      block number in quota structure in memory. Moreover this simplifies locking
      as we do not have to take ip_alloc_sem from quota write path.
      Acked-by: NJoel Becker <Joel.Becker@oracle.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      f64dd44e
    • J
      quota: Refactor dquot_transfer code so that OCFS2 can pass in its references · bc8e5f07
      Jan Kara 提交于
      Currently, __dquot_transfer() acquires its own references of dquot structures
      that will be put into inode. But for OCFS2, this creates a lock inversion
      between dq_lock (waited on in dqget) and transaction start (started in
      ocfs2_setattr). Currently, deadlock is impossible because dq_lock is acquired
      only during dquot_acquire and dquot_release and we already hold a reference to
      dquot structures in ocfs2_setattr so neither of these functions can be called
      while we call dquot_transfer. But this is rather subtle and it is hard to teach
      lockdep about it. So provide __dquot_transfer function that can be passed dquot
      references directly. OCFS2 can then pass acquired dquot references directly to
      __dquot_transfer with proper locking.
      Signed-off-by: NJan Kara <jack@suse.cz>
      bc8e5f07
    • D
      quota: unify quota init condition in setattr · 12755627
      Dmitry Monakhov 提交于
      Quota must being initialized if size or uid/git changes requested.
      But initialization performed in two different places:
      in case of i_size file system is responsible for dquot init
      , but in case of uid/gid init will be called internally in
      dquot_transfer().
      This ambiguity makes code harder to understand.
      Let's move this logic to one common helper function.
      Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      12755627
    • C
      quota: remove sb_has_quota_active in get/set_info · fcbc59f9
      Christoph Hellwig 提交于
      The methods already do these checks, so remove them in the quotactl
      implementation to allow non-VFS quota implementations to also support
      these calls.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      fcbc59f9
    • C
      quota: unify ->set_dqblk · c472b432
      Christoph Hellwig 提交于
      Pass the larger struct fs_disk_quota to the ->set_dqblk operation so
      that the Q_SETQUOTA and Q_XSETQUOTA operations can be implemented
      with a single filesystem operation and we can retire the ->set_xquota
      operation.  The additional information (RT-subvolume accounting and
      warn counts) are left zero for the VFS quota implementation.
      
      Add new fieldmask values for setting the numer of blocks and inodes
      values which is required for the VFS quota, but wasn't for XFS.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      c472b432
    • C
      quota: unify ->get_dqblk · b9b2dd36
      Christoph Hellwig 提交于
      Pass the larger struct fs_disk_quota to the ->get_dqblk operation so
      that the Q_GETQUOTA and Q_XGETQUOTA operations can be implemented
      with a single filesystem operation and we can retire the ->get_xquota
      operation.  The additional information (RT-subvolume accounting and
      warn counts) are left zero for the VFS quota implementation.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      b9b2dd36
    • E
      ext3: make barrier options consistent with ext4 · 0636c73e
      Eric Sandeen 提交于
      ext4 was updated to accept barrier/nobarrier mount options
      in addition to the older barrier=0/1.  The barrier story
      is complex enough, we should help people by making the options
      the same at least, even if the defaults are different.
      
      This patch allows the barrier/nobarrier mount options for ext3,
      while keeping nobarrier the default.
      
      It also unconditionally displays barrier status in show_options,
      and prints a message at mount time if barriers are not enabled,
      just as ext4 does.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      0636c73e
    • D
      quota: Make quota stat accounting lockless. · dde95888
      Dmitry Monakhov 提交于
      Quota stats is mostly writable data structure. Let's alloc percpu
      bucket for each value.
      
      NOTE: dqstats_read() function is racy against dqstats_{inc,dec}
      and may return inconsistent value. But this is ok since absolute
      accuracy is not required.
      Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      dde95888
    • S
      suppress warning: "quotatypes" defined but not used · da8d1ba2
      Sergey Senozhatsky 提交于
      Suppress compilation warning: "quotatypes" defined but not used.
      quotatypes is used only when CONFIG_QUOTA_DEBUG or CONFIG_PRINT_QUOTA_WARNING
      is/are defined.
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      da8d1ba2
    • J
      ext3: Fix waiting on transaction during fsync · 52779708
      Jan Kara 提交于
      log_start_commit() returns 1 only when it started a transaction
      commit. Thus in case transaction commit is already running, we
      fail to wait for the commit to finish. Fix the issue by always
      waiting for the commit regardless of the log_start_commit return
      value.
      Signed-off-by: NJan Kara <jack@suse.cz>
      52779708
    • J
      jbd: Provide function to check whether transaction will issue data barrier · 03f4d804
      Jan Kara 提交于
      Provide a function which returns whether a transaction with given tid
      will send a barrier to the filesystem device. The function will be used
      by ext3 to detect whether fsync needs to send a separate barrier or not.
      Signed-off-by: NJan Kara <jack@suse.cz>
      03f4d804
    • D
      ufs: add ufs speciffic ->setattr call · 311b9549
      Dmitry Monakhov 提交于
      generic setattr not longer responsible for quota transfer.
      use ufs_setattr for all ufs's inodes.
      Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      311b9549
    • J
      BKL: Remove BKL from ext2 filesystem · e0a5cbac
      Jan Blunck 提交于
      The BKL is still used in ext2_put_super(), ext2_fill_super(), ext2_sync_fs()
      ext2_remount() and ext2_write_inode(). From these calls ext2_put_super(),
      ext2_fill_super() and ext2_remount() are protected against each other by
      the struct super_block s_umount rw semaphore. The call in ext2_write_inode()
      could only protect the modification of the ext2_sb_info through
      ext2_update_dynamic_rev() against concurrent ext2_sync_fs() or ext2_remount().
      ext2_fill_super() and ext2_put_super() can be left out because you need a
      valid filesystem reference in all three cases, which you do not have when
      you are one of these functions.
      
      If the BKL is only protecting the modification of the ext2_sb_info it can
      safely be removed since this is protected by the struct ext2_sb_info s_lock.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: NJan Kara <jack@suse.cz>
      e0a5cbac
    • J
      ext2: Add ext2_sb_info s_lock spinlock · c15271f4
      Jan Blunck 提交于
      Add a spinlock that protects against concurrent modifications of
      s_mount_state, s_blocks_last, s_overhead_last and the content of the
      superblock's buffer pointed to by sbi->s_es. The spinlock is now used in
      ext2_xattr_update_super_block() which was setting the
      EXT2_FEATURE_COMPAT_EXT_ATTR flag on the superblock without protection
      before. Likewise the spinlock is used in ext2_show_options() to have a
      consistent view of the mount options.
      
      This is a preparation patch for removing the BKL from ext2 in the next
      patch.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NJan Kara <jack@suse.cz>
      c15271f4
    • J
      ext2: Move ext2_write_super() out of ext2_setup_super() · 4c96a68b
      Jan Blunck 提交于
      Move ext2_write_super() out of ext2_setup_super() as a preparation for the
      next patch that adds a new lock for superblock fields.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      4c96a68b
    • J
      ext2: Fold ext2_commit_super() into ext2_sync_super() · ee6921eb
      Jan Blunck 提交于
      Both function originally did similar things except that ext2_sync_super()
      is returning after the call to sync_dirty_buffer(sbh). Therefore this
      patch adds a wait flag to tell ext2_sync_super() if it has to call
      sync_dirty_buffer() to wait for in-progress I/O to finish.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      ee6921eb
    • J
      ext2: Remove duplicate code from ext2_sync_fs() · 20da9baf
      Jan Blunck 提交于
      Depending in the state (valid or unchecked) of the filesystem either
      ext2_sync_super() or ext2_commit_super() is called. If the filesystem is
      currently valid (it is checked), we first mark it unchecked and afterwards
      duplicate the work that ext2_sync_super() is doing later. Therefore this
      patch removes the duplicate code and calls ext2_sync_super() directly after
      marking the filesystem unchecked.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      20da9baf
    • J
      ext2: Set the write time in ext2_sync_fs() · 269c8db3
      Jan Blunck 提交于
      This is probably a typo since the write time should actually be updated by
      ext2_sync_fs() instead of the mount time.
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      269c8db3
    • J
      ext2: Use ext2_clear_super_error() in ext2_sync_fs() · 2b8120ef
      Jan Blunck 提交于
      ext2_sync_fs() used to duplicate the code from ext2_clear_super_error().
      Signed-off-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      2b8120ef
    • D
      ext3: init statistics after journal recovery v2 · 41d1a636
      Dmitry Monakhov 提交于
      Currently block/inode/dir counters are initialized before journal was
      recovered. In fact after journal recovery this info will probably
      change which results in incorrect numbers returned from statfs(2).
      BUG:#15768
      Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      41d1a636
    • F
      ext2: remove useless call to brelse() in ext2_free_inode() · 524e4a1d
      Francis Moreau 提交于
      This patch removes a useless call to brelse(bitmap_bh) since at that
      point bitmap_bh is NULL and slightly cleans up bitmap_bh handling.
      Signed-off-by: NFrancis Moreau <francis.moro@gmail.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      524e4a1d
    • D
      quota: optimize mark_dirty logic · eabf290d
      Dmitry Monakhov 提交于
      - Skip locking if quota is dirty already.
      - Return old quota state to help fs-specciffic implementation to optimize
        case where quota was dirty already.
      Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      eabf290d