]> Git Repo - linux.git/blobdiff - fs/affs/super.c
Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee139...
[linux.git] / fs / affs / super.c
index c70f1e5fc0247a616d44e60c2681bbf8fc14c747..b84dc7352502df2976438435b2523f98d5d55966 100644 (file)
@@ -147,6 +147,11 @@ static int init_inodecache(void)
 
 static void destroy_inodecache(void)
 {
+       /*
+        * Make sure all delayed rcu free inodes are flushed before we
+        * destroy cache.
+        */
+       rcu_barrier();
        kmem_cache_destroy(affs_inode_cachep);
 }
 
@@ -188,7 +193,7 @@ static const match_table_t tokens = {
 };
 
 static int
-parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s32 *root,
+parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved, s32 *root,
                int *blocksize, char **prefix, char *volume, unsigned long *mount_opts)
 {
        char *p;
@@ -253,13 +258,17 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s
                case Opt_setgid:
                        if (match_int(&args[0], &option))
                                return 0;
-                       *gid = option;
+                       *gid = make_kgid(current_user_ns(), option);
+                       if (!gid_valid(*gid))
+                               return 0;
                        *mount_opts |= SF_SETGID;
                        break;
                case Opt_setuid:
                        if (match_int(&args[0], &option))
                                return 0;
-                       *uid = option;
+                       *uid = make_kuid(current_user_ns(), option);
+                       if (!uid_valid(*uid))
+                               return 0;
                        *mount_opts |= SF_SETUID;
                        break;
                case Opt_verbose:
@@ -301,8 +310,8 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
        int                      num_bm;
        int                      i, j;
        s32                      key;
-       uid_t                    uid;
-       gid_t                    gid;
+       kuid_t                   uid;
+       kgid_t                   gid;
        int                      reserved;
        unsigned long            mount_flags;
        int                      tmp_flags;     /* fix remount prototype... */
@@ -527,8 +536,8 @@ affs_remount(struct super_block *sb, int *flags, char *data)
 {
        struct affs_sb_info     *sbi = AFFS_SB(sb);
        int                      blocksize;
-       uid_t                    uid;
-       gid_t                    gid;
+       kuid_t                   uid;
+       kgid_t                   gid;
        int                      mode;
        int                      reserved;
        int                      root_block;
@@ -551,7 +560,7 @@ affs_remount(struct super_block *sb, int *flags, char *data)
                return -EINVAL;
        }
 
-       flush_delayed_work_sync(&sbi->sb_work);
+       flush_delayed_work(&sbi->sb_work);
        replace_mount_options(sb, new_opts);
 
        sbi->s_flags = mount_flags;
This page took 0.026475 seconds and 4 git commands to generate.