Merge branch 'for-linus' of git://git.infradead.org/~dedekind/ubi-2.6
[sfrench/cifs-2.6.git] / fs / cifs / cifsfs.c
index e9f4ec7010926fb76e4808d3e4ed1bd0ab7f7cb5..a04b17e5a9d01dbf5b8af64323b38b9ec45b20e8 100644 (file)
@@ -147,10 +147,11 @@ cifs_read_super(struct super_block *sb, void *data,
 #endif
        sb->s_blocksize = CIFS_MAX_MSGSIZE;
        sb->s_blocksize_bits = 14;      /* default 2**14 = CIFS_MAX_MSGSIZE */
-       inode = iget(sb, ROOT_I);
+       inode = cifs_iget(sb, ROOT_I);
 
-       if (!inode) {
-               rc = -ENOMEM;
+       if (IS_ERR(inode)) {
+               rc = PTR_ERR(inode);
+               inode = NULL;
                goto out_no_root;
        }
 
@@ -203,9 +204,8 @@ cifs_put_super(struct super_block *sb)
                return;
        }
        rc = cifs_umount(sb, cifs_sb);
-       if (rc) {
+       if (rc)
                cERROR(1, ("cifs_umount failed with return code %d", rc));
-       }
 #ifdef CONFIG_CIFS_DFS_UPCALL
        if (cifs_sb->mountdata) {
                kfree(cifs_sb->mountdata);
@@ -460,7 +460,7 @@ int cifs_xstate_get(struct super_block *sb, struct fs_quota_stat *qstats)
 
 static struct quotactl_ops cifs_quotactl_ops = {
        .set_xquota     = cifs_xquota_set,
-       .get_xquota     = cifs_xquota_set,
+       .get_xquota     = cifs_xquota_get,
        .set_xstate     = cifs_xstate_set,
        .get_xstate     = cifs_xstate_get,
 };
@@ -471,9 +471,7 @@ static void cifs_umount_begin(struct vfsmount *vfsmnt, int flags)
        struct cifs_sb_info *cifs_sb;
        struct cifsTconInfo *tcon;
 
-#ifdef CONFIG_CIFS_DFS_UPCALL
        dfs_shrink_umount_helper(vfsmnt);
-#endif /* CONFIG CIFS_DFS_UPCALL */
 
        if (!(flags & MNT_FORCE))
                return;
@@ -520,7 +518,6 @@ static int cifs_remount(struct super_block *sb, int *flags, char *data)
 }
 
 static const struct super_operations cifs_super_ops = {
-       .read_inode = cifs_read_inode,
        .put_super = cifs_put_super,
        .statfs = cifs_statfs,
        .alloc_inode = cifs_alloc_inode,
@@ -992,9 +989,7 @@ static int __init
 init_cifs(void)
 {
        int rc = 0;
-#ifdef CONFIG_PROC_FS
        cifs_proc_init();
-#endif
 /*     INIT_LIST_HEAD(&GlobalServerList);*/    /* BB not implemented yet */
        INIT_LIST_HEAD(&GlobalSMBSessionList);
        INIT_LIST_HEAD(&GlobalTreeConnectionList);
@@ -1095,19 +1090,15 @@ init_cifs(void)
  out_destroy_inodecache:
        cifs_destroy_inodecache();
  out_clean_proc:
-#ifdef CONFIG_PROC_FS
        cifs_proc_clean();
-#endif
        return rc;
 }
 
 static void __exit
 exit_cifs(void)
 {
-       cFYI(0, ("exit_cifs"));
-#ifdef CONFIG_PROC_FS
+       cFYI(DBG2, ("exit_cifs"));
        cifs_proc_clean();
-#endif
 #ifdef CONFIG_CIFS_DFS_UPCALL
        unregister_key_type(&key_type_dns_resolver);
 #endif