]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - fs/nfs/nfs4proc.c
NFSv4: Use the open stateid if the delegation has the wrong mode
[linux-imx.git] / fs / nfs / nfs4proc.c
index 282d9fa6994af716a44a0c9792a205f776713f95..39849360f9f6069e1c6f9156f2948c3649149b12 100644 (file)
@@ -978,6 +978,7 @@ static void nfs_set_open_stateid_locked(struct nfs4_state *state, nfs4_stateid *
        if (test_bit(NFS_DELEGATED_STATE, &state->flags) == 0)
                nfs4_stateid_copy(&state->stateid, stateid);
        nfs4_stateid_copy(&state->open_stateid, stateid);
+       set_bit(NFS_OPEN_STATE, &state->flags);
        switch (fmode) {
                case FMODE_READ:
                        set_bit(NFS_O_RDONLY_STATE, &state->flags);