1. 07 12月, 2009 1 次提交
  2. 21 11月, 2009 1 次提交
    • D
      SLOW_WORK: Fix CIFS to pass THIS_MODULE to slow_work_register_user() · 0109d7e6
      David Howells 提交于
      As of the patch:
      
      	SLOW_WORK: Wait for outstanding work items belonging to a module to clear
      
      	Wait for outstanding slow work items belonging to a module to clear
      	when unregistering that module as a user of the facility.  This
      	prevents the put_ref code of a work item from being taken away before
      	it returns.
      
      slow_work_register_user() takes a module pointer as an argument.  CIFS must now
      pass THIS_MODULE as that argument, lest the following error be observed:
      
      	fs/cifs/cifsfs.c: In function 'init_cifs':
      	fs/cifs/cifsfs.c:1040: error: too few arguments to function 'slow_work_register_user'
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      0109d7e6
  3. 25 9月, 2009 2 次提交
    • S
      0f59e61c
    • J
      cifs: convert oplock breaks to use slow_work facility (try #4) · 3bc303c2
      Jeff Layton 提交于
      This is the fourth respin of the patch to convert oplock breaks to
      use the slow_work facility.
      
      A customer of ours was testing a backport of one of the earlier
      patchsets, and hit a "Busy inodes after umount..." problem. An oplock
      break job had raced with a umount, and the superblock got torn down and
      its memory reused. When the oplock break job tried to dereference the
      inode->i_sb, the kernel oopsed.
      
      This patchset has the oplock break job hold an inode and vfsmount
      reference until the oplock break completes.  With this, there should be
      no need to take a tcon reference (the vfsmount implicitly holds one
      already).
      
      Currently, when an oplock break comes in there's a chance that the
      oplock break job won't occur if the allocation of the oplock_q_entry
      fails. There are also some rather nasty races in the allocation and
      handling these structs.
      
      Rather than allocating oplock queue entries when an oplock break comes
      in, add a few extra fields to the cifsFileInfo struct. Get rid of the
      dedicated cifs_oplock_thread as well and queue the oplock break job to
      the slow_work thread pool.
      
      This approach also has the advantage that the oplock break jobs can
      potentially run in parallel rather than be serialized like they are
      today.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      3bc303c2
  4. 24 9月, 2009 1 次提交
    • T
      fs: Make unload_nls() NULL pointer safe · 6d729e44
      Thomas Gleixner 提交于
      Most call sites of unload_nls() do:
      	if (nls)
      		unload_nls(nls);
      
      Check the pointer inside unload_nls() like we do in kfree() and
      simplify the call sites.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Steve French <sfrench@us.ibm.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6d729e44
  5. 22 9月, 2009 1 次提交
  6. 02 9月, 2009 2 次提交
  7. 04 8月, 2009 1 次提交
  8. 10 7月, 2009 1 次提交
  9. 26 6月, 2009 1 次提交
    • S
      [CIFS] remove bkl usage from umount begin · ad8034f1
      Steve French 提交于
      The lock_kernel call moved into the fs for umount_begin
      is not needed.  This adds a check to make sure we don't
      call umount_begin twice on the same fs.
      
      umount_begin for cifs is probably not needed and
      may eventually be able to be removed, but in
      the meantime this smaller patch is safe and
      gets rid of the bkl from this path which provides
      some benefit.
      
      Acked-by: Jeff Layton <redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ad8034f1
  10. 25 6月, 2009 1 次提交
  11. 15 6月, 2009 1 次提交
  12. 13 6月, 2009 2 次提交
  13. 12 6月, 2009 1 次提交
    • C
      push BKL down into ->put_super · 6cfd0148
      Christoph Hellwig 提交于
      Move BKL into ->put_super from the only caller.  A couple of
      filesystems had trivial enough ->put_super (only kfree and NULLing of
      s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs,
      hugetlbfs, omfs, qnx4, shmem, all others got the full treatment.  Most
      of them probably don't need it, but I'd rather sort that out individually.
      Preferably after all the other BKL pushdowns in that area.
      
      [AV: original used to move lock_super() down as well; these changes are
      removed since we don't do lock_super() at all in generic_shutdown_super()
      now]
      [AV: fuse, btrfs and xfs are known to need no damn BKL, exempt]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6cfd0148
  14. 28 5月, 2009 1 次提交
  15. 09 5月, 2009 2 次提交
  16. 17 4月, 2009 2 次提交
    • J
      cifs: remove dnotify thread code · 5144ebf4
      Jeff Layton 提交于
      cifs: remove dnotify thread code
      
      Al Viro recently removed the dir_notify code from the kernel along with
      the CIFS code that used it. We can also get rid of the dnotify thread
      as well.
      
      In actuality, it never had anything to do with dir_notify anyway. All
      it did was unnecessarily wake up all the tasks waiting on the response
      queues every 15s. Previously that happened to prevent tasks from hanging
      indefinitely when the server went unresponsive, but we put those to
      sleep with proper timeouts now so there's no reason to keep this around.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      5144ebf4
    • J
      cifs: vary timeout on writes past EOF based on offset (try #5) · fbec9ab9
      Jeff Layton 提交于
      This is the fourth version of this patch:
      
      The first three generated a compiler warning asking for explicit curly
      braces.
      
      The first two didn't handle update the size correctly when writes that
      didn't start at the eof were done.
      
      The first patch also didn't update the size correctly when it explicitly
      set via truncate().
      
      This patch adds code to track the client's current understanding of the
      size of the file on the server separate from the i_size, and then to use
      this info to semi-intelligently set the timeout for writes past the EOF.
      
      This helps prevent timeouts when trying to write large, sparse files on
      windows servers.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      fbec9ab9
  17. 28 3月, 2009 1 次提交
  18. 01 1月, 2009 1 次提交
    • A
      kill ->dir_notify() · 6badd79b
      Al Viro 提交于
      Remove the hopelessly misguided ->dir_notify().  The only instance (cifs)
      has been broken by design from the very beginning; the objects it creates
      are never destroyed, keep references to struct file they can outlive, nothing
      that could possibly evict them exists on close(2) path *and* no locking
      whatsoever is done to prevent races with close(), should the previous, er,
      deficiencies someday be dealt with.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6badd79b
  19. 29 12月, 2008 1 次提交
  20. 26 12月, 2008 3 次提交
  21. 17 11月, 2008 1 次提交
  22. 15 11月, 2008 2 次提交
    • J
      cifs: reinstate sharing of SMB sessions sans races · 14fbf50d
      Jeff Layton 提交于
      We do this by abandoning the global list of SMB sessions and instead
      moving to a per-server list. This entails adding a new list head to the
      TCP_Server_Info struct. The refcounting for the cifsSesInfo is moved to
      a non-atomic variable. We have to protect it by a lock anyway, so there's
      no benefit to making it an atomic. The list and refcount are protected
      by the global cifs_tcp_ses_lock.
      
      The patch also adds a new routines to find and put SMB sessions and
      that properly take and put references under the lock.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      14fbf50d
    • J
      cifs: disable sharing session and tcon and add new TCP sharing code · e7ddee90
      Jeff Layton 提交于
      The code that allows these structs to be shared is extremely racy.
      Disable the sharing of SMB and tcon structs for now until we can
      come up with a way to do this that's race free.
      
      We want to continue to share TCP sessions, however since they are
      required for multiuser mounts. For that, implement a new (hopefully
      race-free) scheme. Add a new global list of TCP sessions, and take
      care to get a reference to it whenever we're dealing with one.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      e7ddee90
  23. 14 11月, 2008 2 次提交
    • S
      [CIFS] remove unused list, add new cifs sock list to prepare for mount/umount fix · fb396016
      Steve French 提交于
      Also adds two lines missing from the previous patch (for the need reconnect flag in the
      /proc/fs/cifs/DebugData handling)
      
      The new global_cifs_sock_list is added, and initialized in init_cifs but not used yet.
      Jeff Layton will be adding code in to use that and to remove the GlobalTcon and GlobalSMBSession
      lists.
      
      CC: Jeff Layton <jlayton@redhat.com>
      CC: Shirish Pargaonkar <shirishp@us.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      fb396016
    • S
      [CIFS] Fix cifs reconnection flags · 3b795210
      Steve French 提交于
      In preparation for Jeff's big umount/mount fixes to remove the possibility of
      various races in cifs mount and linked list handling of sessions, sockets and
      tree connections, this patch cleans up some repetitive code in cifs_mount,
      and addresses a problem with ses->status and tcon->tidStatus in which we
      were overloading the "need_reconnect" state with other status in that
      field.  So the "need_reconnect" flag has been broken out from those
      two state fields (need reconnect was not mutually exclusive from some of the
      other possible tid and ses states).  In addition, a few exit cases in
      cifs_mount were cleaned up, and a problem with a tcon flag (for lease support)
      was not being set consistently for the 2nd mount of the same share
      
      CC: Jeff Layton <jlayton@redhat.com>
      CC: Shirish Pargaonkar <shirishp@us.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      3b795210
  24. 23 10月, 2008 3 次提交
    • M
      [PATCH] move executable checking into ->permission() · f696a365
      Miklos Szeredi 提交于
      For execute permission on a regular files we need to check if file has
      any execute bits at all, regardless of capabilites.
      
      This check is normally performed by generic_permission() but was also
      added to the case when the filesystem defines its own ->permission()
      method.  In the latter case the filesystem should be responsible for
      performing this check.
      
      Move the check from inode_permission() inside filesystems which are
      not calling generic_permission().
      
      Create a helper function execute_ok() that returns true if the inode
      is a directory or if any execute bits are present in i_mode.
      
      Also fix up the following code:
      
       - coda control file is never executable
       - sysctl files are never executable
       - hfs_permission seems broken on MAY_EXEC, remove
       - hfsplus_permission is eqivalent to generic_permission(), remove
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      f696a365
    • C
      [PATCH] fix ->llseek for more directories · 3222a3e5
      Christoph Hellwig 提交于
      With this patch all directory fops instances that have a readdir
      that doesn't take the BKL are switched to generic_file_llseek.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      3222a3e5
    • S
      [CIFS] improve setlease handling · 84210e91
      Steve French 提交于
      fcntl(F_SETLEASE) currently is not exported by cifs (nor by local file
      systems) so cifs grants leases based on how other local processes have
      opened the file not by whether the file is cacheable (oplocked).  This
      adds the check to make sure that the file is cacheable on the client
      before checking whether we can grant the lease locally
      (generic_setlease).  It also adds a mount option for cifs (locallease)
      if the user wants to override this and try to grant leases even
      if the server did not grant oplock.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      84210e91
  25. 20 10月, 2008 1 次提交
  26. 12 8月, 2008 2 次提交
  27. 09 8月, 2008 1 次提交
  28. 27 7月, 2008 1 次提交
    • A
      [PATCH] sanitize ->permission() prototype · e6305c43
      Al Viro 提交于
      * kill nameidata * argument; map the 3 bits in ->flags anybody cares
        about to new MAY_... ones and pass with the mask.
      * kill redundant gfs2_iop_permission()
      * sanitize ecryptfs_permission()
      * fix remaining places where ->permission() instances might barf on new
        MAY_... found in mask.
      
      The obvious next target in that direction is permission(9)
      
      folded fix for nfs_permission() breakage from Miklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      e6305c43