--- ./fs/nfs/inode.c.orig 2005-07-29 13:51:20.000000000 +0200 +++ ./fs/nfs/inode.c 2005-07-29 14:03:51.000000000 +0200 @@ -793,6 +793,7 @@ { struct inode *inode = dentry->d_inode; struct nfs_fattr fattr; + struct rpc_groups fsg; int error; if (attr->ia_valid & ATTR_SIZE) { @@ -813,7 +814,11 @@ filemap_fdatawait(inode->i_mapping); nfs_wb_all(inode); } - error = NFS_PROTO(inode)->setattr(dentry, &fattr, attr); + fsg.ngroups = 0; + fsg.groups[fsg.ngroups++] = inode->i_gid; /* ATTR_SIZE */ + if (attr->ia_valid & ATTR_GID) + fsg.groups[fsg.ngroups++] = attr->ia_gid; + error = NFS_PROTO(inode)->setattr(dentry, &fattr, attr, &fsg); if (error == 0) { nfs_refresh_inode(inode, &fattr); if ((attr->ia_valid & ATTR_MODE) != 0) { --- ./fs/nfs/nfs3proc.c.orig 2005-07-29 14:03:07.000000000 +0200 +++ ./fs/nfs/nfs3proc.c 2005-07-29 14:03:51.000000000 +0200 @@ -114,7 +114,7 @@ static int nfs3_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, - struct iattr *sattr) + struct iattr *sattr, struct rpc_groups *fsg) { struct inode *inode = dentry->d_inode; struct nfs3_sattrargs arg = { @@ -125,7 +125,7 @@ dprintk("NFS call setattr\n"); fattr->valid = 0; - status = nfs3_rpc(NFS_CLIENT(inode), NFS3PROC_SETATTR, &arg, fattr); + status = nfs3_rpc(NFS_CLIENT(inode), NFS3PROC_SETATTR, &arg, fattr, fsg); dprintk("NFS reply setattr: %d\n", status); return status; } @@ -355,7 +355,7 @@ /* Note: we could use a guarded setattr here, but I'm * not sure this buys us anything (and I'd have * to revamp the NFSv3 XDR code) */ - status = nfs3_proc_setattr(dentry, &fattr, sattr); + status = nfs3_proc_setattr(dentry, &fattr, sattr, NULL); nfs_refresh_inode(dentry->d_inode, &fattr); dprintk("NFS reply setattr (post-create): %d\n", status); } --- ./fs/nfs/nfs4proc.c.orig 2005-07-29 14:03:07.000000000 +0200 +++ ./fs/nfs/nfs4proc.c 2005-07-29 14:03:51.000000000 +0200 @@ -1121,7 +1121,7 @@ */ static int nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, - struct iattr *sattr) + struct iattr *sattr, struct rpc_groups *fsg) { struct rpc_cred *cred; struct inode *inode = dentry->d_inode; --- ./fs/nfs/proc.c.orig 2005-07-29 14:03:07.000000000 +0200 +++ ./fs/nfs/proc.c 2005-07-29 14:03:51.000000000 +0200 @@ -129,7 +129,7 @@ static int nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, - struct iattr *sattr) + struct iattr *sattr, struct rpc_groups *fsg) { struct inode *inode = dentry->d_inode; struct nfs_sattrargs arg = { @@ -140,7 +140,7 @@ dprintk("NFS call setattr\n"); fattr->valid = 0; - status = nfs2_rpc(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr); + status = nfs2_rpc(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr, fsg); dprintk("NFS reply setattr: %d\n", status); return status; } --- ./include/linux/nfs_xdr.h.orig 2005-07-29 14:03:07.000000000 +0200 +++ ./include/linux/nfs_xdr.h 2005-07-29 14:03:51.000000000 +0200 @@ -712,7 +712,7 @@ int (*getattr) (struct nfs_server *, struct nfs_fh *, struct nfs_fattr *); int (*setattr) (struct dentry *, struct nfs_fattr *, - struct iattr *); + struct iattr *, struct rpc_groups *); int (*lookup) (struct inode *, struct qstr *, struct nfs_fh *, struct nfs_fattr *, struct rpc_groups *); int (*access) (struct inode *, struct nfs_access_entry *);