1. 21 5月, 2008 1 次提交
  2. 20 5月, 2008 1 次提交
  3. 17 5月, 2008 3 次提交
  4. 16 5月, 2008 2 次提交
  5. 15 5月, 2008 6 次提交
  6. 14 5月, 2008 1 次提交
    • S
      [CIFS] don't explicitly do a FindClose on rewind when directory search has ended · 77c57ec8
      Steve French 提交于
      Do the following series of operations on a CIFS share:
      
          opendir(dir)
          readdir(dir)
          unlink(file in dir)
          rewinddir(dir)
          readdir(dir)
      
      If the readdir read all entries in the directory this will make CIFS throw an error like this:
      
           CIFS VFS: Send error in FindClose = -9
      
      CIFS requests "Close at end of search" of the server by setting this bit when issuing FindFirst or FindNext.  Therefore when all search entries are returned, the server may return "end of search" and close the search implicitly when this bit is set by the client on the request.  We check for this when a readdir is explicitly closed - but when the client notices that a directory has changed after the last operation, we attempt to close the directory before reopening by reissuing a second FindFirst. But, the directory may already been implicitly closed (due to end of search) because the first readdir finished. So we only want to issue a FindClose call in this case when we don't expect it to already be closed.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      77c57ec8
  7. 13 5月, 2008 4 次提交
    • S
      [CIFS] cleanup old checkpatch warnings · 582d21e5
      Steve French 提交于
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      582d21e5
    • M
      [CIFS] CIFSSMBPosixLock should return -EINVAL on error · ed5f0370
      Marcin Slusarz 提交于
      all other codepaths in this function return negative values on errors
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ed5f0370
    • J
      fix memory leak in CIFSFindNext · 6353450a
      Jeff Layton 提交于
      When CIFSFindNext gets back an -EBADF from a call, it sets the return
      code of the function to 0 and eventually exits. Doing this makes the
      cleanup at the end of the function skip freeing the SMB buffer, so
      we need to make sure we free the buffer explicitly when doing this.
      
      If we don't you end up with errors like this when unplugging the cifs
      kernel module:
      
      slab error in kmem_cache_destroy(): cache `cifs_request': Can't free all objects
       [<c046bdbf>] kmem_cache_destroy+0x61/0xf3
       [<e0f03045>] cifs_destroy_request_bufs+0x14/0x28 [cifs]
       [<e0f2016e>] exit_cifs+0x1e/0x80 [cifs]
       [<c043aeae>] sys_delete_module+0x192/0x1b8
       [<c04451fd>] audit_syscall_entry+0x14b/0x17d
       [<c0405413>] syscall_call+0x7/0xb
       =======================
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      6353450a
    • J
      [CIFS] CIFS currently allows for permissions to be changed on files, even · d0a9c078
      Jeff Layton 提交于
      when unix extensions and cifsacl support are disabled. These
      permissions changes are "ephemeral" however. They are lost whenever
      a share is mounted and unmounted, or when memory pressure forces
      the inode out of the cache.
      
      Because of this, we'd like to introduce a behavior change to make
      CIFS behave more like local DOS/Windows filesystems. When unix
      extensions and cifsacl support aren't enabled, then don't silently
      ignore changes to permission bits that can't be reflected on the
      server.
      
      Still, there may be people relying on the current behavior for
      certain applications. This patch adds a new "dynperm" (and a
      corresponding "nodynperm") mount option that will be intended
      to make the client fall back to legacy behavior when setting
      these modes.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      d0a9c078
  8. 12 5月, 2008 5 次提交
    • L
      Add new 'cond_resched_bkl()' helper function · c3921ab7
      Linus Torvalds 提交于
      It acts exactly like a regular 'cond_resched()', but will not get
      optimized away when CONFIG_PREEMPT is set.
      
      Normal kernel code is already preemptable in the presense of
      CONFIG_PREEMPT, so cond_resched() is optimized away (see commit
      02b67cc3 "sched: do not do
      cond_resched() when CONFIG_PREEMPT").
      
      But when wanting to conditionally reschedule while holding a lock, you
      need to use "cond_sched_lock(lock)", and the new function is the BKL
      equivalent of that.
      
      Also make fs/locks.c use it.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c3921ab7
    • S
      [CIFS] don't allow demultiplex thread to exit until kthread_stop is called · e691b9d1
      Steve French 提交于
      cifs_demultiplex_thread can exit under several conditions:
      
      1) if it's signaled
      2) if there's a problem with session setup
      3) if kthread_stop is called on it
      
      The first two are problems. If kthread_stop is called on the thread,
      there is no guarantee that it will still be up. We need to have the
      thread stay up until kthread_stop is called on it.
      
      One option would be to not even try to tear things down until after
      kthread_stop is called. However, in the case where there is a problem
      setting up the session, there's no real reason to try continuing the
      loop.
      
      This patch allows the thread to clean up and prepare for exit under all
      three conditions, but it has the thread go to sleep until kthread_stop
      is called. This allows us to simplify the shutdown code somewhat since
      we can be reasonably sure that the thread won't exit after being
      signaled but before kthread_stop is called.
      
      It also removes the places where the thread itself set the tsk variable
      since it appeared that it could have a potential race where the thread
      might never be shut down.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Acked-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      e691b9d1
    • J
      [CIFS] when not using unix extensions, check for and set ATTR_READONLY on create and mkdir · 67750fb9
      Jeff Layton 提交于
      When creating a directory on a CIFS share without POSIX extensions,
      and the given mode has no write bits set, set the ATTR_READONLY bit.
      
      When creating a file, set ATTR_READONLY if the create mode has no write
      bits set and we're not using unix extensions.
      
      There are some comments about this being problematic due to the VFS
      splitting creates into 2 parts. I'm not sure what that's actually
      talking about, but I'm assuming that it has something to do with how
      mknod is implemented. In the simple case where we have no unix
      extensions and we're just creating a regular file, there's no reason
      we can't set ATTR_READONLY.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      67750fb9
    • J
      [CIFS] add local struct inode pointer to cifs_setattr · 02eadeff
      Jeff Layton 提交于
      Clean up cifs_setattr a bit by adding a local inode pointer, and
      changing all of the direntry->d_inode references to it. This also adds a
      bit of micro-optimization. d_inode shouldn't change over the life of
      this function, so we only need to dereference it once.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      02eadeff
    • C
      [CIFS] cifs_find_tcp_session cleanup · 1b20d672
      Cyrill Gorcunov 提交于
      This patch cleans up cifs_find_tcp_session so it become
      less indented. Also the error of skipping IPv6 matched
      addresses fixed.
      Signed-off-by: NCyrill Gorcunov <gorcunov@gmail.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      1b20d672
  9. 09 5月, 2008 4 次提交
  10. 08 5月, 2008 2 次提交
  11. 07 5月, 2008 10 次提交
  12. 05 5月, 2008 1 次提交