Merge git://git.samba.org/sfrench/cifs-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Mar 2012 16:07:15 +0000 (09:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Mar 2012 16:07:15 +0000 (09:07 -0700)
Pull CIFS fixes from Steve French

* git://git.samba.org/sfrench/cifs-2.6:
  cifs: clean up ordering in exit_cifs
  cifs: clean up call to cifs_dfs_release_automount_timer()
  CIFS: Delete echo_retries module parm
  CIFS: Prepare credits code for a slot reservation
  CIFS: Make wait_for_free_request killable
  CIFS: Introduce credit-based flow control
  CIFS: Simplify inFlight logic
  cifs: fix issue mounting of DFS ROOT when redirecting from one domain controller to the next
  CIFS: Respect negotiated MaxMpxCount
  CIFS: Fix a spurious error in cifs_push_posix_locks

1  2 
fs/cifs/cifsfs.c

diff --combined fs/cifs/cifsfs.c
@@@ -76,12 -76,7 +76,7 @@@ MODULE_PARM_DESC(cifs_min_small, "Smal
  unsigned int cifs_max_pending = CIFS_MAX_REQ;
  module_param(cifs_max_pending, int, 0444);
  MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. "
-                                  "Default: 50 Range: 2 to 256");
- unsigned short echo_retries = 5;
- module_param(echo_retries, ushort, 0644);
- MODULE_PARM_DESC(echo_retries, "Number of echo attempts before giving up and "
-                              "reconnecting server. Default: 5. 0 means "
-                              "never reconnect.");
+                                  "Default: 32767 Range: 2 to 32767.");
  module_param(enable_oplocks, bool, 0644);
  MODULE_PARM_DESC(enable_oplocks, "Enable or disable oplocks (bool). Default:"
                                 "y/Y/1");
@@@ -119,10 -114,12 +114,10 @@@ cifs_read_super(struct super_block *sb
  
        if (IS_ERR(inode)) {
                rc = PTR_ERR(inode);
 -              inode = NULL;
                goto out_no_root;
        }
  
 -      sb->s_root = d_alloc_root(inode);
 -
 +      sb->s_root = d_make_root(inode);
        if (!sb->s_root) {
                rc = -ENOMEM;
                goto out_no_root;
  
  out_no_root:
        cERROR(1, "cifs_read_super: get root inode failed");
 -      if (inode)
 -              iput(inode);
 -
        return rc;
  }
  
@@@ -1111,9 -1111,9 +1106,9 @@@ init_cifs(void
        if (cifs_max_pending < 2) {
                cifs_max_pending = 2;
                cFYI(1, "cifs_max_pending set to min of 2");
-       } else if (cifs_max_pending > 256) {
-               cifs_max_pending = 256;
-               cFYI(1, "cifs_max_pending set to max of 256");
+       } else if (cifs_max_pending > CIFS_MAX_REQ) {
+               cifs_max_pending = CIFS_MAX_REQ;
+               cFYI(1, "cifs_max_pending set to max of %u", CIFS_MAX_REQ);
        }
  
        rc = cifs_fscache_register();
@@@ -1175,11 -1175,8 +1170,8 @@@ static void __exi
  exit_cifs(void)
  {
        cFYI(DBG2, "exit_cifs");
-       cifs_proc_clean();
-       cifs_fscache_unregister();
- #ifdef CONFIG_CIFS_DFS_UPCALL
+       unregister_filesystem(&cifs_fs_type);
        cifs_dfs_release_automount_timer();
- #endif
  #ifdef CONFIG_CIFS_ACL
        cifs_destroy_idmaptrees();
        exit_cifs_idmap();
  #ifdef CONFIG_CIFS_UPCALL
        unregister_key_type(&cifs_spnego_key_type);
  #endif
-       unregister_filesystem(&cifs_fs_type);
-       cifs_destroy_inodecache();
-       cifs_destroy_mids();
        cifs_destroy_request_bufs();
+       cifs_destroy_mids();
+       cifs_destroy_inodecache();
+       cifs_fscache_unregister();
+       cifs_proc_clean();
  }
  
  MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>");