This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / fs / smbfs / inode.c
index f1e2141..1001a64 100644 (file)
@@ -368,6 +368,7 @@ parse_options(struct smb_mount_data_kernel *mnt, char *options)
                                &optopt, &optarg, &flags, &value)) > 0) {
 
                VERBOSE("'%s' -> '%s'\n", optopt, optarg ? optarg : "<none>");
+
                switch (c) {
                case 1:
                        /* got a "flag" option */
@@ -382,19 +383,15 @@ parse_options(struct smb_mount_data_kernel *mnt, char *options)
                        break;
                case 'u':
                        mnt->uid = value;
-                       flags |= SMB_MOUNT_UID;
                        break;
                case 'g':
                        mnt->gid = value;
-                       flags |= SMB_MOUNT_GID;
                        break;
                case 'f':
                        mnt->file_mode = (value & S_IRWXUGO) | S_IFREG;
-                       flags |= SMB_MOUNT_FMODE;
                        break;
                case 'd':
                        mnt->dir_mode = (value & S_IRWXUGO) | S_IFDIR;
-                       flags |= SMB_MOUNT_DMODE;
                        break;
                case 'i':
                        strlcpy(mnt->codepage.local_name, optarg, 
@@ -432,9 +429,9 @@ smb_show_options(struct seq_file *s, struct vfsmount *m)
                if (mnt->flags & opts[i].flag)
                        seq_printf(s, ",%s", opts[i].name);
 
-       if (mnt->flags & SMB_MOUNT_UID)
+       if (mnt->uid != 0)
                seq_printf(s, ",uid=%d", mnt->uid);
-       if (mnt->flags & SMB_MOUNT_GID)
+       if (mnt->gid != 0)
                seq_printf(s, ",gid=%d", mnt->gid);
        if (mnt->mounted_uid != 0)
                seq_printf(s, ",mounted_uid=%d", mnt->mounted_uid);
@@ -443,10 +440,8 @@ smb_show_options(struct seq_file *s, struct vfsmount *m)
         * Defaults for file_mode and dir_mode are unknown to us; they
         * depend on the current umask of the user doing the mount.
         */
-       if (mnt->flags & SMB_MOUNT_FMODE)
-               seq_printf(s, ",file_mode=%04o", mnt->file_mode & S_IRWXUGO);
-       if (mnt->flags & SMB_MOUNT_DMODE)
-               seq_printf(s, ",dir_mode=%04o", mnt->dir_mode & S_IRWXUGO);
+       seq_printf(s, ",file_mode=%04o", mnt->file_mode & S_IRWXUGO);
+       seq_printf(s, ",dir_mode=%04o", mnt->dir_mode & S_IRWXUGO);
 
        if (strcmp(mnt->codepage.local_name, CONFIG_NLS_DEFAULT))
                seq_printf(s, ",iocharset=%s", mnt->codepage.local_name);
@@ -571,13 +566,8 @@ int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
                mnt->file_mode = (oldmnt->file_mode & S_IRWXUGO) | S_IFREG;
                mnt->dir_mode = (oldmnt->dir_mode & S_IRWXUGO) | S_IFDIR;
 
-               mnt->flags = (oldmnt->file_mode >> 9) | SMB_MOUNT_UID |
-                       SMB_MOUNT_GID | SMB_MOUNT_FMODE | SMB_MOUNT_DMODE;
+               mnt->flags = (oldmnt->file_mode >> 9);
        } else {
-               mnt->file_mode = S_IRWXU | S_IRGRP | S_IXGRP |
-                               S_IROTH | S_IXOTH | S_IFREG;
-               mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP |
-                               S_IROTH | S_IXOTH | S_IFDIR;
                if (parse_options(mnt, raw_data))
                        goto out_bad_option;
        }
@@ -609,7 +599,6 @@ int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
        sb->s_root = d_alloc_root(root_inode);
        if (!sb->s_root)
                goto out_no_root;
-
        smb_new_dentry(sb->s_root);
 
        return 0;