]> Pileus Git - ~andy/linux/blobdiff - fs/nfsd/nfs4state.c
svcrpc: store gss mech in svc_cred
[~andy/linux] / fs / nfsd / nfs4state.c
index 316ec843dec238b027ebf94629c1d56955b60731..109b43402e820a60fbefdb5e99fcd746c70159e6 100644 (file)
@@ -1188,6 +1188,9 @@ static int copy_cred(struct svc_cred *target, struct svc_cred *source)
        target->cr_gid = source->cr_gid;
        target->cr_group_info = source->cr_group_info;
        get_group_info(target->cr_group_info);
+       target->cr_gss_mech = source->cr_gss_mech;
+       if (source->cr_gss_mech)
+               gss_mech_get(source->cr_gss_mech);
        return 0;
 }
 
@@ -1709,7 +1712,7 @@ out_new:
                status = nfserr_jukebox;
                goto out;
        }
-       new->cl_minorversion = 1;
+       new->cl_minorversion = cstate->minorversion;
 
        gen_clid(new, nn);
        add_to_unconfirmed(new);
@@ -3427,7 +3430,7 @@ grace_disallows_io(struct net *net, struct inode *inode)
 /* Returns true iff a is later than b: */
 static bool stateid_generation_after(stateid_t *a, stateid_t *b)
 {
-       return (s32)a->si_generation - (s32)b->si_generation > 0;
+       return (s32)(a->si_generation - b->si_generation) > 0;
 }
 
 static __be32 check_stateid_generation(stateid_t *in, stateid_t *ref, bool has_session)