From: Stephen Rothwell Date: Wed, 3 Oct 2012 01:24:40 +0000 (+1000) Subject: Merge remote-tracking branch 'jfs/jfs-next' X-Git-Tag: next-20121003~81 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bd7b1f2baf5205e84dbc1104acd5ce6c257c969a;p=karo-tx-linux.git Merge remote-tracking branch 'jfs/jfs-next' --- bd7b1f2baf5205e84dbc1104acd5ce6c257c969a diff --cc fs/jfs/jfs_incore.h index 680605d7bf15,4fa958ae1986..cf47f09e8ac8 --- a/fs/jfs/jfs_incore.h +++ b/fs/jfs/jfs_incore.h @@@ -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 706692f24033,6f4ac1c070f0..53b896446e6c --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@@ -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;