ecryptfs: pass matching flags to interpose as defined and used there
[safe/jmp/linux-2.6] / fs / autofs / inode.c
index 708bdb8..e1734f2 100644 (file)
@@ -54,11 +54,12 @@ out_kill_sb:
 
 static const struct super_operations autofs_sops = {
        .statfs         = simple_statfs,
+       .show_options   = generic_show_options,
 };
 
 enum {Opt_err, Opt_fd, Opt_uid, Opt_gid, Opt_pgrp, Opt_minproto, Opt_maxproto};
 
-static match_table_t autofs_tokens = {
+static const match_table_t autofs_tokens = {
        {Opt_fd, "fd=%u"},
        {Opt_uid, "uid=%u"},
        {Opt_gid, "gid=%u"},
@@ -75,8 +76,8 @@ static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid,
        substring_t args[MAX_OPT_ARGS];
        int option;
 
-       *uid = current->uid;
-       *gid = current->gid;
+       *uid = current_uid();
+       *gid = current_gid();
        *pgrp = task_pgrp_nr(current);
 
        *minproto = *maxproto = AUTOFS_PROTO_VERSION;
@@ -140,6 +141,8 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
        int minproto, maxproto;
        pid_t pgid;
 
+       save_mount_options(s, data);
+
        sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
        if (!sbi)
                goto fail_unlock;
@@ -248,13 +251,11 @@ struct inode *autofs_iget(struct super_block *sb, unsigned long ino)
        inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
        inode->i_nlink = 2;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
-       inode->i_blocks = 0;
 
        if (ino == AUTOFS_ROOT_INO) {
                inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
                inode->i_op = &autofs_root_inode_operations;
                inode->i_fop = &autofs_root_operations;
-               inode->i_uid = inode->i_gid = 0; /* Changed in read_super */
                goto done;
        }