1. 05 10月, 2010 28 次提交
    • F
      autofs4: Only declare function when CONFIG_COMPAT is defined · 5a44a73b
      Felipe Contreras 提交于
      The patch solves the following warnings message when CONFIG_COMPAT
      is not defined:
      
      fs/autofs4/root.c:31: warning: ‘autofs4_root_compat_ioctl’ declared ‘static’ but never defined
      Signed-off-by: NFelipe Contreras <felipe.contreras@gmail.com>
      Cc: Ian Kent <raven@themaw.net>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      5a44a73b
    • M
      autofs: Only declare function when CONFIG_COMPAT is defined · 26daad80
      Márton Németh 提交于
      The patch solves the following warnings message when CONFIG_COMPAT
      is not defined:
      
      fs/autofs/root.c:30: warning: ‘autofs_root_compat_ioctl’ declared ‘static’ but never defined
      Signed-off-by: NMárton Németh <nm127@freemail.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      26daad80
    • P
      ncpfs: Lock socket in ncpfs while setting its callbacks · 2a4df5d3
      Petr Vandrovec 提交于
      Otherwise partially updated pointers could be seen if
      pointer update is not atomic.
      Signed-off-by: NPetr Vandrovec <petr@vandrovec.name>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      2a4df5d3
    • A
      fs/locks.c: prepare for BKL removal · b89f4321
      Arnd Bergmann 提交于
      This prepares the removal of the big kernel lock from the
      file locking code. We still use the BKL as long as fs/lockd
      uses it and ceph might sleep, but we can flip the definition
      to a private spinlock as soon as that's done.
      All users outside of fs/lockd get converted to use
      lock_flocks() instead of lock_kernel() where appropriate.
      
      Based on an earlier patch to use a spinlock from Matthew
      Wilcox, who has attempted this a few times before, the
      earliest patch from over 10 years ago turned it into
      a semaphore, which ended up being slower than the BKL
      and was subsequently reverted.
      
      Someone should do some serious performance testing when
      this becomes a spinlock, since this has caused problems
      before. Using a spinlock should be at least as good
      as the BKL in theory, but who knows...
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NMatthew Wilcox <willy@linux.intel.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Miklos Szeredi <mszeredi@suse.cz>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Sage Weil <sage@newdream.net>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-fsdevel@vger.kernel.org
      b89f4321
    • P
      BKL: Remove BKL from ncpfs · 2e54eb96
      Petr Vandrovec 提交于
      Dozen of changes in ncpfs to provide some locking other than BKL.
      
      In readdir cache unlock and mark complete first page as last operation,
      so it can be used for synchronization, as code intended.
      
      When updating dentry name on case insensitive filesystems do at least
      some basic locking...
      
      Hold i_mutex when updating inode fields.
      
      Push some ncp_conn_is_valid down to ncp_request.  Connection can become
      invalid at any moment, and fewer error code paths to test the better.
      
      Use i_size_{read,write} to modify file size.
      
      Set inode's backing_dev_info as ncpfs has its own special bdi.
      
      In ioctl unbreak ioctls invoked on filesystem mounted 'ro' - tests are
      for inode writeable or owner match, but were turned to filesystem
      writeable and inode writeable or owner match.  Also collect all permission
      checks in single place.
      
      Add some locking, and remove comments saying that it would be cool to
      add some locks to the code.
      
      Constify some pointers.
      Signed-off-by: NPetr Vandrovec <petr@vandrovec.name>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      2e54eb96
    • A
      BKL: Remove BKL from OCFS2 · 60056794
      Arnd Bergmann 提交于
      The BKL in ocfs2/dlmfs is used in put_super, fill_super and remount_fs
      that are all three protected by the superblocks s_umount rw_semaphore.
      
      The use in ocfs2_control_open is evidently unrelated and the function
      is protected by ocfs2_control_lock.
      
      Therefore it is safe to remove the BKL entirely.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Cc: Joel Becker <joel.becker@oracle.com>
      60056794
    • A
      BKL: Remove BKL from squashfs · 3dbc4b32
      Arnd Bergmann 提交于
      The BKL is only used in put_super and fill_super, which are both protected
      by the superblocks s_umount rw_semaphore. Therefore it is safe to remove
      the BKL entirely.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
      3dbc4b32
    • A
      BKL: Remove BKL from jffs2 · 1a028dd2
      Arnd Bergmann 提交于
      The BKL is only used in put_super, fill_super and remount_fs that are all
      three protected by the superblocks s_umount rw_semaphore. Therefore it is
      safe to remove the BKL entirely.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      1a028dd2
    • A
      BKL: Remove BKL from ecryptfs · 18dfe89d
      Arnd Bergmann 提交于
      The BKL is only used in fill_super, which is protected by the superblocks
      s_umount rw_semaphorei, and in fasync, which does not do anything that
      could require the BKL. Therefore it is safe to remove the BKL entirely.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Dustin Kirkland <kirkland@canonical.com>
      Cc: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
      Cc: ecryptfs-devel@lists.launchpad.net
      18dfe89d
    • A
      BKL: Remove BKL from afs · 77f2fe03
      Arnd Bergmann 提交于
      The BKL is only used in put_super and fill_super, which are both protected
      by the superblocks s_umount rw_semaphore. Therefore it is safe to remove
      the BKL entirely.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: linux-afs@lists.infradead.org
      Cc: David Howells <dhowells@redhat.com>
      77f2fe03
    • A
      BKL: Remove BKL from USB gadgetfs · cdbd2b01
      Arnd Bergmann 提交于
      The BKL is only used in fill_super, which is  protected by the superblocks
      s_umount rw_semaphore. Therefore it is safe to remove the BKL entirely.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: linux-usb@vger.kernel.org
      cdbd2b01
    • A
      BKL: Remove BKL from autofs4 · 00e300e1
      Arnd Bergmann 提交于
      autofs4 uses the BKL only to guard its ioctl operations.
      This can be trivially converted to use a mutex, as we have
      done with most device drivers before.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ian Kent <raven@themaw.net>
      00e300e1
    • A
      BKL: Remove BKL from isofs · 4f819a78
      Arnd Bergmann 提交于
      As in other file systems, we can replace the big kernel lock
      with a private mutex in isofs. This means we can now access
      multiple file systems concurrently, but it also means that
      we serialize readdir and lookup across sleeping operations
      which previously released the big kernel lock. This should
      not matter though, as these operations are in practice
      serialized through the hardware access.
      
      The isofs_get_blocks functions now does not take any lock
      any more, it used to recursively get the BKL. After looking
      at the code for hours, I convinced myself that it was never
      needed here anyway, because it only reads constant fields
      of the inode and writes to a buffer head array that is
      at this time only visible to the caller.
      
      The get_sb and fill_super operations do not need the locking
      at all because they operate on a file system that is either
      about to be created or to be destroyed but in either case
      is not visible to other threads.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      4f819a78
    • A
      BKL: Remove BKL from fat · 3768744c
      Arnd Bergmann 提交于
      The lock_kernel in fat_put_super is not needed because
      it only protects the super block itself and we know that
      no other thread can reach it because we are about to
      kfree the object.
      
      In the two fill_super functions, this converts the locking
      to use lock_super like elsewhere in the fat code. This
      is probably not needed either, but is consistent and puts
      us on the safe side.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Jan Blunck <jblunck@infradead.org>
      3768744c
    • J
      BKL: Remove BKL from ext2 filesystem · 3e44f9f1
      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@infradead.org>
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      3e44f9f1
    • J
      BKL: Remove BKL from do_new_mount() · 6841c050
      Jan Blunck 提交于
      After pushing down the BKL to the get_sb/fill_super operations of the
      filesystems that still make usage of the BKL it is safe to remove it from
      do_new_mount().
      
      I've read through all the code formerly covered by the BKL inside
      do_kern_mount() and have satisfied myself that it doesn't need the BKL
      any more.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      6841c050
    • J
      BKL: Remove BKL from cgroup · 38d018db
      Jan Blunck 提交于
      The BKL is only used in remount_fs and get_sb that are both protected by
      the superblocks s_umount rw_semaphore. Therefore it is safe to remove the
      BKL entirely.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      38d018db
    • J
      BKL: Remove BKL from NTFS · efdffb54
      Jan Blunck 提交于
      The BKL is only used in put_super, fill_super and remount_fs that are all
      three protected by the superblocks s_umount rw_semaphore. Therefore it is
      safe to remove the BKL entirely.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      efdffb54
    • J
      BKL: Remove BKL from NILFS2 · d6d4c19c
      Jan Blunck 提交于
      The BKL is only used in put_super, fill_super and remount_fs that are all
      three protected by the superblocks s_umount rw_semaphore. Therefore it is
      safe to remove the BKL entirely.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      d6d4c19c
    • J
      BKL: Remove BKL from JFS · 22b26db6
      Jan Blunck 提交于
      The BKL is only used in put_super, fill_super and remount_fs that are all
      three protected by the superblocks s_umount rw_semaphore. Therefore it is
      safe to remove the BKL entirely.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      22b26db6
    • J
      BKL: Remove BKL from HFS · 8526fb37
      Jan Blunck 提交于
      The BKL is only used in put_super and fill_super that are both protected by
      the superblocks s_umount rw_semaphore. Therefore it is safe to remove the
      BKL entirely.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      8526fb37
    • J
      BKL: Remove BKL from ext4 filesystem · f2143c4e
      Jan Blunck 提交于
      The BKL is still used in ext4_put_super(), ext4_fill_super() and
      ext4_remount(). All three calles are protected against concurrent calls by
      the s_umount rw semaphore of struct super_block.
      
      Therefore the BKL is protecting nothing in this case.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Acked-by: N"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      f2143c4e
    • J
      BKL: Remove BKL from ext3_put_super() and ext3_remount() · 77b54a46
      Jan Blunck 提交于
      The BKL lock is protecting the remounting against a potential call to
      ext3_put_super(). This could not happen, since this is protected by the
      s_umount rw semaphore of struct super_block.
      
      Therefore I think the BKL is protecting nothing here.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      77b54a46
    • J
      BKL: Remove BKL from ext3 fill_super() · d646cf82
      Jan Blunck 提交于
      The BKL is protecting nothing than two memory allocations here.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      d646cf82
    • J
      BKL: Remove BKL from CifsFS · b0991aa3
      Jan Blunck 提交于
      The BKL is only used in put_super and fill_super that are both protected by
      the superblocks s_umount rw_semaphore. Therefore it is safe to remove the
      BKL entirely.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Cc: Steve French <smfrench@gmail.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      b0991aa3
    • J
      BKL: Remove BKL from BFS · ba13d597
      Jan Blunck 提交于
      The BKL is only used in put_super and fill_super that are both protected by
      the superblocks s_umount rw_semaphore. Therefore it is safe to remove the BKL
      entirely.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      ba13d597
    • J
      BKL: Remove BKL from Amiga FFS · 74c41429
      Jan Blunck 提交于
      The BKL is only used in put_super, fill_super and remount_fs that are all
      three protected by the superblocks s_umount rw_semaphore. Therefore it is
      safe to remove the BKL entirely.
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      74c41429
    • J
      BKL: Explicitly add BKL around get_sb/fill_super · db719222
      Jan Blunck 提交于
      This patch is a preparation necessary to remove the BKL from do_new_mount().
      It explicitly adds calls to lock_kernel()/unlock_kernel() around
      get_sb/fill_super operations for filesystems that still uses the BKL.
      
      I've read through all the code formerly covered by the BKL inside
      do_kern_mount() and have satisfied myself that it doesn't need the BKL
      any more.
      
      do_kern_mount() is already called without the BKL when mounting the rootfs
      and in nfsctl. do_kern_mount() calls vfs_kern_mount(), which is called
      from various places without BKL: simple_pin_fs(), nfs_do_clone_mount()
      through nfs_follow_mountpoint(), afs_mntpt_do_automount() through
      afs_mntpt_follow_link(). Both later functions are actually the filesystems
      follow_link inode operation. vfs_kern_mount() is calling the specified
      get_sb function and lets the filesystem do its job by calling the given
      fill_super function.
      
      Therefore I think it is safe to push down the BKL from the VFS to the
      low-level filesystems get_sb/fill_super operation.
      
      [arnd: do not add the BKL to those file systems that already
             don't use it elsewhere]
      Signed-off-by: NJan Blunck <jblunck@infradead.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Christoph Hellwig <hch@infradead.org>
      db719222
  2. 29 9月, 2010 8 次提交
  3. 28 9月, 2010 4 次提交