1. 17 1月, 2011 23 次提交
    • C
      fallocate should be a file operation · 2fe17c10
      Christoph Hellwig 提交于
      Currently all filesystems except XFS implement fallocate asynchronously,
      while XFS forced a commit.  Both of these are suboptimal - in case of O_SYNC
      I/O we really want our allocation on disk, especially for the !KEEP_SIZE
      case where we actually grow the file with user-visible zeroes.  On the
      other hand always commiting the transaction is a bad idea for fast-path
      uses of fallocate like for example in recent Samba versions.   Given
      that block allocation is a data plane operation anyway change it from
      an inode operation to a file operation so that we have the file structure
      available that lets us check for O_SYNC.
      
      This also includes moving the code around for a few of the filesystems,
      and remove the already unnedded S_ISDIR checks given that we only wire
      up fallocate for regular files.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2fe17c10
    • C
      make the feature checks in ->fallocate future proof · 64c23e86
      Christoph Hellwig 提交于
      Instead of various home grown checks that might need updates for new
      flags just check for any bit outside the mask of the features supported
      by the filesystem.  This makes the check future proof for any newly
      added flag.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      64c23e86
    • Y
      staging: smbfs building fix · eb745dbc
      Yang Ruirui 提交于
      Building error for smbfs:
      
      drivers/staging/smbfs/dir.c:286: error: static declaration of 'smbfs_dentry_operations' follows non-static declaration
      drivers/staging/smbfs/proto.h:42: error: previous declaration of 'smbfs_dentry_operations' was here
      drivers/staging/smbfs/dir.c:294: error: static declaration of 'smbfs_dentry_operations_case' follows non-static declaration
      drivers/staging/smbfs/proto.h:41: error: previous declaration of 'smbfs_dentry_operations_case' was here
      make[3]: *** [drivers/staging/smbfs/dir.o] Error 1
      make[2]: *** [drivers/staging/smbfs] Error 2
      make[1]: *** [drivers/staging] Error 2
      make[1]: *** Waiting for unfinished jobs....
      
      Fix it by removing static keywords
      Signed-off-by: NYang Ruirui <ruirui.r.yang@tieto.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      eb745dbc
    • A
      tidy up around finish_automount() · b1e75df4
      Al Viro 提交于
      do_add_mount() and mnt_clear_expiry() are not needed outside of
      namespace.c anymore, now that namei has finish_automount() to
      use.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b1e75df4
    • A
      don't drop newmnt on error in do_add_mount() · 15f9a3f3
      Al Viro 提交于
      That gets rid of the kludge in finish_automount() - we need
      to keep refcount on the vfsmount as-is until we evict it from
      expiry list.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      15f9a3f3
    • A
      Take the completion of automount into new helper · 19a167af
      Al Viro 提交于
      ... and shift it from namei.c to namespace.c
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      19a167af
    • A
      drivers/nfc/pn544.c: fix min_t warnings · e78bf5e6
      Andrew Morton 提交于
      Fix these:
      
        drivers/nfc/pn544.c: In function 'pn544_read':
        drivers/nfc/pn544.c:356: warning: comparison of distinct pointer types lacks a cast
        drivers/nfc/pn544.c:377: warning: comparison of distinct pointer types lacks a cast
        drivers/nfc/pn544.c: In function 'pn544_write':
        drivers/nfc/pn544.c:463: warning: comparison of distinct pointer types lacks a cast
        drivers/nfc/pn544.c:485: warning: comparison of distinct pointer types lacks a cast
      
      Cc: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e78bf5e6
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/scsi-post-merge-2.6 · 8a335bc6
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/scsi-post-merge-2.6:
        ocfs2: Make OCFS2_FS depend on CONFIGFS_FS
        dlm: Make DLM depend on CONFIGFS_FS
        net: Make NETCONSOLE_DYNAMIC depend on CONFIGFS_FS
        configfs: change depends -> select SYSFS
        [SCSI] sd,sr: kill compat SDEV_MEDIA_CHANGE event
        [SCSI] sd: implement sd_check_events()
      8a335bc6
    • J
      parisc: fix compile breakage caused by inlining maybe_mkwrite · 11537421
      James Bottomley 提交于
      On PARISC, we have an include of linux/mm.h inside our asm/pgtable.h, so
      this patch
      
        commit 14fd403f
        Author: Andrea Arcangeli <aarcange@redhat.com>
        Date:   Thu Jan 13 15:46:37 2011 -0800
      
            thp: export maybe_mkwrite
      
      causes us an unsatisfiable use of pte_mkwrite in linux/mm.h.
      
      The fix is to avoid including linux/mm.h in our pgtable.h, which
      unbreaks the build.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      11537421
    • A
      fix non-x86 build failure in pmdp_get_and_clear · b3697c02
      Andrea Arcangeli 提交于
      pmdp_get_and_clear/pmdp_clear_flush/pmdp_splitting_flush were trapped as
      BUG() and they were defined only to diminish the risk of build issues on
      not-x86 archs and to be consistent with the generic pte methods previously
      defined in include/asm-generic/pgtable.h.
      
      But they are causing more trouble than they were supposed to solve, so
      it's simpler not to define them when THP is off.
      
      This is also correcting the export of pmdp_splitting_flush which is
      currently unused (x86 isn't using the generic implementation in
      mm/pgtable-generic.c and no other arch needs that [yet]).
      Signed-off-by: NAndrea Arcangeli <aarcange@redhat.com>
      Sam Ravnborg <sam@ravnborg.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b3697c02
    • A
      VFS: Fix UP compile error in fs/namespace.c · 7e3d0eb0
      Al Viro 提交于
      mnt_longterm is there only on SMP
      Reported-and-tested-by: NJoachim Eastwood <manabian@gmail.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7e3d0eb0
    • N
      ocfs2: Make OCFS2_FS depend on CONFIGFS_FS · 7b1fff7e
      Nicholas Bellinger 提交于
      This patch fixes the following kconfig error after changing
      CONFIGFS_FS -> select SYSFS:
      
      fs/sysfs/Kconfig:1:error: recursive dependency detected!
      fs/sysfs/Kconfig:1:	symbol SYSFS is selected by CONFIGFS_FS
      fs/configfs/Kconfig:1:	symbol CONFIGFS_FS is selected by OCFS2_FS
      fs/ocfs2/Kconfig:1:	symbol OCFS2_FS depends on SYSFS
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: James Bottomley <James.Bottomley@suse.de>
      7b1fff7e
    • N
      dlm: Make DLM depend on CONFIGFS_FS · 86c747d2
      Nicholas Bellinger 提交于
      This patch fixes the following kconfig error after changing
      CONFIGFS_FS -> select SYSFS:
      
      fs/sysfs/Kconfig:1:error: recursive dependency detected!
      fs/sysfs/Kconfig:1:	symbol SYSFS is selected by CONFIGFS_FS
      fs/configfs/Kconfig:1:	symbol CONFIGFS_FS is selected by DLM
      fs/dlm/Kconfig:1:	symbol DLM depends on SYSFS
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: James Bottomley <James.Bottomley@suse.de>
      86c747d2
    • N
      net: Make NETCONSOLE_DYNAMIC depend on CONFIGFS_FS · d9f9ab51
      Nicholas Bellinger 提交于
      This patch fixes the following kconfig error after changing
      CONFIGFS_FS -> select SYSFS:
      
      fs/sysfs/Kconfig:1:error: recursive dependency detected!
      fs/sysfs/Kconfig:1:	symbol SYSFS is selected by CONFIGFS_FS
      fs/configfs/Kconfig:1:	symbol CONFIGFS_FS is selected by NETCONSOLE_DYNAMIC
      drivers/net/Kconfig:3390:	symbol NETCONSOLE_DYNAMIC depends on SYSFS
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: James Bottomley <James.Bottomley@suse.de>
      d9f9ab51
    • N
      configfs: change depends -> select SYSFS · e2051172
      Nicholas Bellinger 提交于
      This patch changes configfs to select SYSFS to fix the following:
      
      warning: (TARGET_CORE && GFS2_FS) selects CONFIGFS_FS which has unmet direct dependencies (SYSFS)
      Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Acked-by: NJoel Becker <jlbec@evilplan.org>
      e2051172
    • N
    • S
      fs/btrfs: Fix build of ctree · f8b18087
      Stefan Schmidt 提交于
      Fix the build failure in some configurations:
      
           CC [M]  fs/btrfs/ctree.o
        In file included from fs/btrfs/ctree.c:21:0:
        fs/btrfs/ctree.h:1003:17: error: field 'super_kobj' has incomplete type
        fs/btrfs/ctree.h:1074:17: error: field 'root_kobj' has incomplete type
        make[2]: *** [fs/btrfs/ctree.o] Error 1
        make[1]: *** [fs/btrfs] Error 2
        make: *** [fs] Error 2
      
      caused by commit 57cc7215 ("headers: kobject.h redux")
      
      We need to include kobject.h here.
      Reported-by: NJeff Garzik <jeff@garzik.org>
      Fix-suggested-by: NLi Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: NStefan Schmidt <stefan@datenfreihafen.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f8b18087
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus · 5520ebd3
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus:
        Squashfs: simplify CONFIG_SQUASHFS_LZO handling
        Squashfs: move squashfs_i() definition from squashfs.h
        Squashfs: get rid of default n in Kconfig
        Squashfs: add missing check in zlib_wrapper
        Squashfs: remove unnecessary variable in zlib_wrapper
        Squashfs: Add XZ compression configuration option
        Squashfs: add XZ compression support
      5520ebd3
    • R
      ACPI: Fix boot problem related to APEI with acpi_disabled set · d3072e6a
      Rafael J. Wysocki 提交于
      Commit 415e12b2 ("PCI/ACPI: Request _OSC control once for each root
      bridge (v3)") put the acpi_hest_init() call in acpi_pci_root_init() into
      a wrong place, presumably because the author confused acpi_pci_disabled
      with acpi_disabled.  Bring the code ordering in acpi_pci_root_init()
      back to sanity.
      
      Additionally, make sure that hest_disable is set when acpi_disabled is
      set, which is going to prevent acpi_hest_parse(), that still may be
      executed for acpi_disabled=1 through aer_acpi_firmware_first(), from
      crashing because of uninitialized hest_tab.
      Reported-and-tested-by: NAndres Salomon <dilinger@queued.net>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d3072e6a
    • R
      PCI / ACPI: Fix build of the AER driver for CONFIG_ACPI unset · fc8fe1e9
      Rafael J. Wysocki 提交于
      After commit 415e12b2 ("PCI/ACPI: Request _OSC control once for each
      root bridge (v3)") include/linux/pci-acpi.h is included by
      drivers/pci/pcie/aer/aerdrv.c and if CONFIG_ACPI is unset, the bogus and
      unnecessary alternative definition of acpi_find_root_bridge_handle()
      causes a build error to occur.
      
      Remove the offending piece of garbage.
      Reported-and-tested-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fc8fe1e9
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · f8206b92
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (23 commits)
        sanitize vfsmount refcounting changes
        fix old umount_tree() breakage
        autofs4: Merge the remaining dentry ops tables
        Unexport do_add_mount() and add in follow_automount(), not ->d_automount()
        Allow d_manage() to be used in RCU-walk mode
        Remove a further kludge from __do_follow_link()
        autofs4: Bump version
        autofs4: Add v4 pseudo direct mount support
        autofs4: Fix wait validation
        autofs4: Clean up autofs4_free_ino()
        autofs4: Clean up dentry operations
        autofs4: Clean up inode operations
        autofs4: Remove unused code
        autofs4: Add d_manage() dentry operation
        autofs4: Add d_automount() dentry operation
        Remove the automount through follow_link() kludge code from pathwalk
        CIFS: Use d_automount() rather than abusing follow_link()
        NFS: Use d_automount() rather than abusing follow_link()
        AFS: Use d_automount() rather than abusing follow_link()
        Add an AT_NO_AUTOMOUNT flag to suppress terminal automount
        ...
      f8206b92
    • A
      sanitize vfsmount refcounting changes · f03c6599
      Al Viro 提交于
      Instead of splitting refcount between (per-cpu) mnt_count
      and (SMP-only) mnt_longrefs, make all references contribute
      to mnt_count again and keep track of how many are longterm
      ones.
      
      Accounting rules for longterm count:
      	* 1 for each fs_struct.root.mnt
      	* 1 for each fs_struct.pwd.mnt
      	* 1 for having non-NULL ->mnt_ns
      	* decrement to 0 happens only under vfsmount lock exclusive
      
      That allows nice common case for mntput() - since we can't drop the
      final reference until after mnt_longterm has reached 0 due to the rules
      above, mntput() can grab vfsmount lock shared and check mnt_longterm.
      If it turns out to be non-zero (which is the common case), we know
      that this is not the final mntput() and can just blindly decrement
      percpu mnt_count.  Otherwise we grab vfsmount lock exclusive and
      do usual decrement-and-check of percpu mnt_count.
      
      For fs_struct.c we have mnt_make_longterm() and mnt_make_shortterm();
      namespace.c uses the latter in places where we don't already hold
      vfsmount lock exclusive and opencodes a few remaining spots where
      we need to manipulate mnt_longterm.
      
      Note that we mostly revert the code outside of fs/namespace.c back
      to what we used to have; in particular, normal code doesn't need
      to care about two kinds of references, etc.  And we get to keep
      the optimization Nick's variant had bought us...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      f03c6599
    • A
      fix old umount_tree() breakage · 7b8a53fd
      Al Viro 提交于
      Expiry-related code calls umount_tree() several times with
      the same list to collect vfsmounts to.  Which is fine, except
      that umount_tree() implicitly assumed that the list would
      be empty on each call - it moves the victims over there and
      then iterates through the list kicking them out.  It's *almost*
      idempotent, so everything nearly worked.  However, mnt->ghosts
      handling (and thus expirability checks) had been broken - that
      part was not idempotent...
      
      The fix is trivial - use local temporary list, splice it to
      the the collector list when we are through.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      7b8a53fd
  2. 16 1月, 2011 17 次提交