tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git Q30 head: f0f9164de29e2603d6284d6386130c5da0d568d9 commit: 32dcd6dfe6dcb95687c5e402116b81b377fd8513 [81/89] NFS: Rename struct nfs_parsed_mount_data to struct nfs_fs_context config: x86_64-rhel-7.2 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: git checkout 32dcd6dfe6dcb95687c5e402116b81b377fd8513 # save the attached .config to linux build tree make ARCH=x86_64 Note: the vfs/Q30 HEAD f0f9164de29e2603d6284d6386130c5da0d568d9 builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): fs//nfs/super.c: In function 'nfs_remount': >> fs//nfs/super.c:1014:35: error: 'data' undeclared (first use in this function); did you mean '_data'? error = security_sb_remount(sb, data->lsm_opts); ^~~~ _data fs//nfs/super.c:1014:35: note: each undeclared identifier is reported only once for each function it appears in vim +1014 fs//nfs/super.c 48b605f8 Jeff Layton 2008-06-10 950 fbdefd64 Bryan Schumaker 2012-07-16 951 int 48b605f8 Jeff Layton 2008-06-10 952 nfs_remount(struct super_block *sb, int *flags, char *raw_data) 48b605f8 Jeff Layton 2008-06-10 953 { 48b605f8 Jeff Layton 2008-06-10 954 int error; 48b605f8 Jeff Layton 2008-06-10 955 struct nfs_server *nfss = sb->s_fs_info; 32dcd6df David Howells 2018-11-15 956 struct nfs_fs_context *ctx; 48b605f8 Jeff Layton 2008-06-10 957 struct nfs_mount_data *options = (struct nfs_mount_data *)raw_data; 48b605f8 Jeff Layton 2008-06-10 958 struct nfs4_mount_data *options4 = (struct nfs4_mount_data *)raw_data; cd100725 Trond Myklebust 2008-06-17 959 u32 nfsvers = nfss->nfs_client->rpc_ops->version; 48b605f8 Jeff Layton 2008-06-10 960 02b9984d Theodore Ts'o 2014-03-13 961 sync_filesystem(sb); 02b9984d Theodore Ts'o 2014-03-13 962 48b605f8 Jeff Layton 2008-06-10 963 /* 48b605f8 Jeff Layton 2008-06-10 964 * Userspace mount programs that send binary options generally send 48b605f8 Jeff Layton 2008-06-10 965 * them populated with default values. We have no way to know which 48b605f8 Jeff Layton 2008-06-10 966 * ones were explicitly specified. Fall back to legacy behavior and 48b605f8 Jeff Layton 2008-06-10 967 * just return success. 48b605f8 Jeff Layton 2008-06-10 968 */ 31c94469 Marc Zyngier 2008-07-17 969 if ((nfsvers == 4 && (!options4 || options4->version == 1)) || 31c94469 Marc Zyngier 2008-07-17 970 (nfsvers <= 3 && (!options || (options->version >= 1 && 31c94469 Marc Zyngier 2008-07-17 971 options->version <= 6)))) 48b605f8 Jeff Layton 2008-06-10 972 return 0; 48b605f8 Jeff Layton 2008-06-10 973 32dcd6df David Howells 2018-11-15 974 ctx = nfs_alloc_parsed_mount_data(); 32dcd6df David Howells 2018-11-15 975 if (ctx == NULL) 48b605f8 Jeff Layton 2008-06-10 976 return -ENOMEM; 48b605f8 Jeff Layton 2008-06-10 977 48b605f8 Jeff Layton 2008-06-10 978 /* fill out struct with values from existing mount */ 32dcd6df David Howells 2018-11-15 979 ctx->flags = nfss->flags; 32dcd6df David Howells 2018-11-15 980 ctx->rsize = nfss->rsize; 32dcd6df David Howells 2018-11-15 981 ctx->wsize = nfss->wsize; 32dcd6df David Howells 2018-11-15 982 ctx->retrans = nfss->client->cl_timeout->to_retries; 32dcd6df David Howells 2018-11-15 983 ctx->selected_flavor = nfss->client->cl_auth->au_flavor; 32dcd6df David Howells 2018-11-15 984 ctx->acregmin = nfss->acregmin / HZ; 32dcd6df David Howells 2018-11-15 985 ctx->acregmax = nfss->acregmax / HZ; 32dcd6df David Howells 2018-11-15 986 ctx->acdirmin = nfss->acdirmin / HZ; 32dcd6df David Howells 2018-11-15 987 ctx->acdirmax = nfss->acdirmax / HZ; 32dcd6df David Howells 2018-11-15 988 ctx->timeo = 10U * nfss->client->cl_timeout->to_initval / HZ; 32dcd6df David Howells 2018-11-15 989 ctx->nfs_server.port = nfss->port; 32dcd6df David Howells 2018-11-15 990 ctx->nfs_server.addrlen = nfss->nfs_client->cl_addrlen; 32dcd6df David Howells 2018-11-15 991 ctx->version = nfsvers; 32dcd6df David Howells 2018-11-15 992 ctx->minorversion = nfss->nfs_client->cl_minorversion; 32dcd6df David Howells 2018-11-15 993 ctx->net = current->nsproxy->net_ns; 32dcd6df David Howells 2018-11-15 994 memcpy(&ctx->nfs_server.address, &nfss->nfs_client->cl_addr, 32dcd6df David Howells 2018-11-15 995 ctx->nfs_server.addrlen); 48b605f8 Jeff Layton 2008-06-10 996 48b605f8 Jeff Layton 2008-06-10 997 /* overwrite those values with any that were specified */ 1966903f Jeff Layton 2013-10-21 998 error = -EINVAL; 32dcd6df David Howells 2018-11-15 999 if (!nfs_parse_mount_options((char *)options, ctx)) 48b605f8 Jeff Layton 2008-06-10 1000 goto out; 48b605f8 Jeff Layton 2008-06-10 1001 26c4c170 Jeff Layton 2011-04-27 1002 /* 26c4c170 Jeff Layton 2011-04-27 1003 * noac is a special case. It implies -o sync, but that's not 26c4c170 Jeff Layton 2011-04-27 1004 * necessarily reflected in the mtab options. do_remount_sb 1751e8a6 Linus Torvalds 2017-11-27 1005 * will clear SB_SYNCHRONOUS if -o sync wasn't specified in the 26c4c170 Jeff Layton 2011-04-27 1006 * remount options, so we have to explicitly reset it. 26c4c170 Jeff Layton 2011-04-27 1007 */ 32dcd6df David Howells 2018-11-15 1008 if (ctx->flags & NFS_MOUNT_NOAC) 1751e8a6 Linus Torvalds 2017-11-27 1009 *flags |= SB_SYNCHRONOUS; 26c4c170 Jeff Layton 2011-04-27 1010 48b605f8 Jeff Layton 2008-06-10 1011 /* compare new mount options with old ones */ 32dcd6df David Howells 2018-11-15 1012 error = nfs_compare_remount_data(nfss, ctx); c052e792 Al Viro 2018-12-10 1013 if (!error) 60204296 Al Viro 2018-12-13 @1014 error = security_sb_remount(sb, data->lsm_opts); 48b605f8 Jeff Layton 2008-06-10 1015 out: 32dcd6df David Howells 2018-11-15 1016 nfs_free_parsed_mount_data(ctx); 48b605f8 Jeff Layton 2008-06-10 1017 return error; 48b605f8 Jeff Layton 2008-06-10 1018 } 89d77c8f Bryan Schumaker 2012-07-30 1019 EXPORT_SYMBOL_GPL(nfs_remount); 48b605f8 Jeff Layton 2008-06-10 1020 :::::: The code at line 1014 was first introduced by commit :::::: 6020429640f1a1b81189c51f1f66caec895194e9 LSM: hide struct security_mnt_opts from any generic code :::::: TO: Al Viro <viro@xxxxxxxxxxxxxxxxxx> :::::: CC: Al Viro <viro@xxxxxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip