From: Trond Myklebust Date: Thu, 18 Jun 2009 01:13:00 +0000 (-0700) Subject: Merge branch 'devel-for-2.6.31' into for-2.6.31 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1f84603c0940d5bed17f7e4d2e0b2a4b8b8f1b81;p=linux-beck.git Merge branch 'devel-for-2.6.31' into for-2.6.31 Conflicts: fs/nfs/client.c fs/nfs/super.c --- 1f84603c0940d5bed17f7e4d2e0b2a4b8b8f1b81 diff --cc fs/nfs/client.c index 4f75ec593be8,0e9a1f9743b0..c2d061675d80 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@@ -129,9 -135,10 +130,10 @@@ static struct nfs_client *nfs_alloc_cli clp->cl_addrlen = cl_init->addrlen; if (cl_init->hostname) { + err = -ENOMEM; clp->cl_hostname = kstrdup(cl_init->hostname, GFP_KERNEL); if (!clp->cl_hostname) - goto error_3; + goto error_cleanup; } INIT_LIST_HEAD(&clp->cl_superblocks); @@@ -156,10 -162,13 +158,10 @@@ return clp; -error_3: - if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state)) - nfs_callback_down(); -error_2: +error_cleanup: kfree(clp); error_0: - return NULL; + return ERR_PTR(err); } static void nfs4_shutdown_client(struct nfs_client *clp) diff --cc fs/nfs/super.c index 6063054455f8,b798ed1bd36d..3d460527daab --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@@ -140,23 -139,22 +140,23 @@@ static const match_table_t nfs_mount_op { Opt_fscache_uniq, "fsc=%s" }, { Opt_nofscache, "nofsc" }, - { Opt_port, "port=%u" }, - { Opt_rsize, "rsize=%u" }, - { Opt_wsize, "wsize=%u" }, - { Opt_bsize, "bsize=%u" }, - { Opt_timeo, "timeo=%u" }, - { Opt_retrans, "retrans=%u" }, - { Opt_acregmin, "acregmin=%u" }, - { Opt_acregmax, "acregmax=%u" }, - { Opt_acdirmin, "acdirmin=%u" }, - { Opt_acdirmax, "acdirmax=%u" }, - { Opt_actimeo, "actimeo=%u" }, - { Opt_namelen, "namlen=%u" }, - { Opt_mountport, "mountport=%u" }, - { Opt_mountvers, "mountvers=%u" }, - { Opt_nfsvers, "nfsvers=%u" }, - { Opt_nfsvers, "vers=%u" }, + { Opt_port, "port=%s" }, + { Opt_rsize, "rsize=%s" }, + { Opt_wsize, "wsize=%s" }, + { Opt_bsize, "bsize=%s" }, + { Opt_timeo, "timeo=%s" }, + { Opt_retrans, "retrans=%s" }, + { Opt_acregmin, "acregmin=%s" }, + { Opt_acregmax, "acregmax=%s" }, + { Opt_acdirmin, "acdirmin=%s" }, + { Opt_acdirmax, "acdirmax=%s" }, + { Opt_actimeo, "actimeo=%s" }, + { Opt_namelen, "namlen=%s" }, + { Opt_mountport, "mountport=%s" }, + { Opt_mountvers, "mountvers=%s" }, + { Opt_nfsvers, "nfsvers=%s" }, + { Opt_nfsvers, "vers=%s" }, + { Opt_minorversion, "minorversion=%u" }, { Opt_sec, "sec=%s" }, { Opt_proto, "proto=%s" }, @@@ -984,7 -976,8 +978,9 @@@ static int nfs_parse_mount_options(cha while ((p = strsep(&raw, ",")) != NULL) { substring_t args[MAX_OPT_ARGS]; - int option, token; + unsigned long option; ++ int int_option; + int token; if (!*p) continue; @@@ -1209,17 -1244,9 +1247,16 @@@ mnt->flags |= NFS_MOUNT_VER3; break; default: - errors++; - nfs_parse_invalid_value("nfsvers"); + goto out_invalid_value; } break; + case Opt_minorversion: - if (match_int(args, &option)) ++ if (match_int(args, &int_option)) + return 0; - if (option < 0 || option > NFS4_MAX_MINOR_VERSION) ++ if (int_option < 0 || int_option > NFS4_MAX_MINOR_VERSION) + return 0; - mnt->minorversion = option; ++ mnt->minorversion = int_option; + break; /* * options that take text values