NFSv4: setattr, close and open_downgrade should use the state_owner's credentials when they are available. Signed-off-by: Trond Myklebust --- nfs4proc.c | 4 ++++ 1 files changed, 4 insertions(+) Index: linux-2.6.9-rc1/fs/nfs/nfs4proc.c =================================================================== --- linux-2.6.9-rc1.orig/fs/nfs/nfs4proc.c 2004-09-06 15:48:42.203441614 -0400 +++ linux-2.6.9-rc1/fs/nfs/nfs4proc.c 2004-09-06 16:28:32.540209021 -0400 @@ -635,6 +635,8 @@ fattr->valid = 0; + if (state != NULL) + msg.rpc_cred = state->owner->so_cred; if (sattr->ia_valid & ATTR_SIZE) nfs4_copy_stateid(&arg.stateid, state, NULL); else @@ -681,6 +683,7 @@ .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_CLOSE], .rpc_argp = &arg, .rpc_resp = &res, + .rpc_cred = sp->so_cred, }; if (test_bit(NFS_DELEGATED_STATE, &state->flags)) @@ -734,6 +737,7 @@ .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_OPEN_DOWNGRADE], .rpc_argp = &arg, .rpc_resp = &res, + .rpc_cred = sp->so_cred, }; if (test_bit(NFS_DELEGATED_STATE, &state->flags))