No change in behavior.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
                        goto out;
                }
                stidp = &dp->dl_stateid;
+               status = check_stateid_generation(stateid, stidp);
+               if (status)
+                       goto out;
        } else { /* open or lock stateid */
                stp = find_stateid(stateid, flags);
                if (!stp) {
                if (!stp->st_stateowner->so_confirmed)
                        goto out;
                stidp = &stp->st_stateid;
+               status = check_stateid_generation(stateid, stidp);
+               if (status)
+                       goto out;
        }
-       status = check_stateid_generation(stateid, stidp);
-       if (status)
-               goto out;
        if (stp) {
                status = nfs4_check_openmode(stp, flags);
                if (status)