Merge tag 'jfs-3.7' of git://github.com/kleikamp/linux-shaggy
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Oct 2012 15:48:21 +0000 (08:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Oct 2012 15:48:21 +0000 (08:48 -0700)
Pull JFS update from Dave Kleikamp:
 "JFS TRIM support and some minor fixes"

* tag 'jfs-3.7' of git://github.com/kleikamp/linux-shaggy:
  jfs: Fix do_div precision in commit b40c2e66
  JFS: use list_move instead of list_del/list_add
  jfs: Remove obsolete email address
  fs/jfs: TRIM support for JFS Filesystem

1  2 
fs/jfs/jfs_incore.h
fs/jfs/super.c

index 680605d7bf15eed0928d762d874412804a5d75f1,4fa958ae198620cb1e66aad13eb6fccdc0c52081..cf47f09e8ac8ab692df3aa14f9420f79005d1725
@@@ -192,9 -192,10 +192,10 @@@ struct jfs_sb_info 
        uint            state;          /* mount/recovery state */
        unsigned long   flag;           /* mount time flags */
        uint            p_state;        /* state prior to going no integrity */
 -      uint            uid;            /* uid to override on-disk uid */
 -      uint            gid;            /* gid to override on-disk gid */
 +      kuid_t          uid;            /* uid to override on-disk uid */
 +      kgid_t          gid;            /* gid to override on-disk gid */
        uint            umask;          /* umask to override on-disk umask */
+       uint            minblks_trim;   /* minimum blocks, for online trim */
  };
  
  /* jfs_sb_info commit_state */
diff --cc fs/jfs/super.c
index efdf8835dfca957c8238afbf97a89825fdb86619,6f4ac1c070f0118d8dbda1a9405a2abd4f6ad426..1a543be09c793bb150efe07f73b92c5b85b4b3d1
@@@ -321,21 -322,17 +322,23 @@@ static int parse_options(char *options
                case Opt_uid:
                {
                        char *uid = args[0].from;
 -                      sbi->uid = simple_strtoul(uid, &uid, 0);
 +                      uid_t val = simple_strtoul(uid, &uid, 0);
 +                      sbi->uid = make_kuid(current_user_ns(), val);
 +                      if (!uid_valid(sbi->uid))
 +                              goto cleanup;
                        break;
                }
                case Opt_gid:
                {
                        char *gid = args[0].from;
 -                      sbi->gid = simple_strtoul(gid, &gid, 0);
 +                      gid_t val = simple_strtoul(gid, &gid, 0);
 +                      sbi->gid = make_kgid(current_user_ns(), val);
 +                      if (!gid_valid(sbi->gid))
 +                              goto cleanup;
                        break;
                }
                case Opt_umask:
                {
                        char *umask = args[0].from;