Merge branch 'staging-next' into Linux 3.1
[pandora-kernel.git] / fs / cifs / cifsfs.c
index 8655174..54b8f1e 100644 (file)
@@ -86,24 +86,6 @@ extern mempool_t *cifs_sm_req_poolp;
 extern mempool_t *cifs_req_poolp;
 extern mempool_t *cifs_mid_poolp;
 
-void
-cifs_sb_active(struct super_block *sb)
-{
-       struct cifs_sb_info *server = CIFS_SB(sb);
-
-       if (atomic_inc_return(&server->active) == 1)
-               atomic_inc(&sb->s_active);
-}
-
-void
-cifs_sb_deactive(struct super_block *sb)
-{
-       struct cifs_sb_info *server = CIFS_SB(sb);
-
-       if (atomic_dec_and_test(&server->active))
-               deactivate_super(sb);
-}
-
 static int
 cifs_read_super(struct super_block *sb)
 {
@@ -566,6 +548,12 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb)
                struct inode *dir = dentry->d_inode;
                struct dentry *child;
 
+               if (!dir) {
+                       dput(dentry);
+                       dentry = ERR_PTR(-ENOENT);
+                       break;
+               }
+
                /* skip separators */
                while (*s == sep)
                        s++;