--- ./fs/nfs/inode.c.orig 2005-06-12 23:34:35.000000000 +0200 +++ ./fs/nfs/inode.c 2005-06-12 23:34:42.000000000 +0200 @@ -753,6 +753,7 @@ { struct inode *inode = dentry->d_inode; struct nfs_fattr fattr; + struct rpc_groups fsg; int error; if (attr->ia_valid & ATTR_SIZE) { @@ -773,7 +774,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-06-12 23:34:35.000000000 +0200 +++ ./fs/nfs/nfs3proc.c 2005-06-12 23:38:43.000000000 +0200 @@ -113,7 +113,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 = { @@ -124,7 +124,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; } @@ -351,7 +351,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-06-12 23:34:35.000000000 +0200 +++ ./fs/nfs/nfs4proc.c 2005-06-12 23:34:42.000000000 +0200 @@ -1114,7 +1114,7 @@ */ static int nfs4_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; int size_change = sattr->ia_valid & ATTR_SIZE; --- ./fs/nfs/proc.c.orig 2005-06-12 23:34:35.000000000 +0200 +++ ./fs/nfs/proc.c 2005-06-12 23:34:42.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-06-12 23:34:35.000000000 +0200 +++ ./include/linux/nfs_xdr.h 2005-06-12 23:34:42.000000000 +0200 @@ -673,7 +673,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 *);