1. 23 10月, 2008 2 次提交
    • J
      cifs: fix unlinking of rename target when server doesn't support open file renames · 8d281efb
      Jeff Layton 提交于
      cifs: fix unlinking of rename target when server doesn't support open file renames
      
      The patch to make cifs_rename undoable broke renaming one file on top of
      another when the server doesn't support busy file renames. Remove the
      code that uses busy file renames to unlink the target file, and just
      have it call cifs_unlink. If the rename of the source file fails, then
      the unlink won't be undoable, but hopefully that's rare enough that it
      won't be a problem.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      8d281efb
    • 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
  2. 21 10月, 2008 3 次提交
  3. 20 10月, 2008 2 次提交
  4. 17 10月, 2008 3 次提交
    • J
      cifs: don't use CREATE_DELETE_ON_CLOSE in cifs_rename_pending_delete · dd1db2de
      Jeff Layton 提交于
      cifs: don't use CREATE_DELETE_ON_CLOSE in cifs_rename_pending_delete
      
      CREATE_DELETE_ON_CLOSE apparently has different semantics than when you
      set the DELETE_ON_CLOSE bit after opening the file. Setting it in the
      open says "delete this file as soon as this filehandle is closed". That's
      not what we want for cifs_rename_pending_delete.
      
      Don't set this bit in the CreateFlags. Experimentation shows that
      setting this flag in the SET_FILE_INFO call has no effect.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      dd1db2de
    • J
      [CIFS] eliminate usage of kthread_stop for cifsd · 469ee614
      Jeff Layton 提交于
      When cifs_demultiplex_thread was converted to a kthread based kernel
      thread, great pains were taken to make it so that kthread_stop would be
      used to bring it down. This just added unnecessary complexity since we
      needed to use a signal anyway to break out of kernel_recvmsg.
      
      Also, cifs_demultiplex_thread does a bit of cleanup as it's exiting, and
      we need to be certain that this gets done. It's possible for a kthread
      to exit before its main function is ever run if kthread_stop is called
      soon after its creation. While I'm not sure that this is a real problem
      with cifsd now, it could be at some point in the future if cifs_mount is
      ever changed to bring down the thread quickly.
      
      The upshot here is that using kthread_stop to bring down the thread just
      adds extra complexity with no real benefit. This patch changes the code
      to use the original method to bring down the thread, but still leaves it
      so that the thread is actually started with kthread_run.
      
      This seems to fix the deadlock caused by the reproducer in this bug
      report:
      
      https://bugzilla.samba.org/show_bug.cgi?id=5720Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      469ee614
    • S
      [CIFS] Add nodfs mount option · 2c1b8615
      Steve French 提交于
      Older samba server (eg. 3.0.24 from Debian etch) don't work correctly,
      if DFS paths are used. Such server claim that they support DFS, but fail
      to process some requests with DFS paths. Starting with Linux 2.6.26,
      the cifs clients starts sending DFS paths in such situations, rendering
      it unuseable with older samba servers.
      
      The nodfs mount options forces a share to be used with non DFS paths,
      even if the server claims, that it supports it.
      Signed-off-by: NMartin Koegler <mkoegler@auto.tuwien.ac.at>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Acked-by: NIgor Mammedov <niallain@gmail.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      2c1b8615
  5. 14 10月, 2008 30 次提交