if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) && (attr->ia_gid == 0)) attr->ia_gid = getgid(); 
int hostfs_setattr(struct dentry *dentry, struct iattr *attr){	struct hostfs_iattr attrs;	char *name;	int err;	err = inode_change_ok(dentry->d_inode, attr);	if (err)		return err;	if(append)		attr->ia_valid &= ~ATTR_SIZE;	attrs.ia_valid = 0;	if(attr->ia_valid & ATTR_MODE){		attrs.ia_valid |= HOSTFS_ATTR_MODE;		attrs.ia_mode = attr->ia_mode;	}	if(attr->ia_valid & ATTR_UID){		if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) &&		   (attr->ia_uid == 0))			attr->ia_uid = getuid();		attrs.ia_valid |= HOSTFS_ATTR_UID;		attrs.ia_uid = attr->ia_uid;	}	if(attr->ia_valid & ATTR_GID){		if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) &&		   (attr->ia_gid == 0))			attr->ia_gid = getgid();		attrs.ia_valid |= HOSTFS_ATTR_GID;		attrs.ia_gid = attr->ia_gid;	}	if(attr->ia_valid & ATTR_SIZE){		attrs.ia_valid |= HOSTFS_ATTR_SIZE;		attrs.ia_size = attr->ia_size;	}	if(attr->ia_valid & ATTR_ATIME){		attrs.ia_valid |= HOSTFS_ATTR_ATIME;		attrs.ia_atime = attr->ia_atime;	}	if(attr->ia_valid & ATTR_MTIME){		attrs.ia_valid |= HOSTFS_ATTR_MTIME;		attrs.ia_mtime = attr->ia_mtime;	}	if(attr->ia_valid & ATTR_CTIME){		attrs.ia_valid |= HOSTFS_ATTR_CTIME;		attrs.ia_ctime = attr->ia_ctime;	}	if(attr->ia_valid & ATTR_ATIME_SET){		attrs.ia_valid |= HOSTFS_ATTR_ATIME_SET;	}	if(attr->ia_valid & ATTR_MTIME_SET){		attrs.ia_valid |= HOSTFS_ATTR_MTIME_SET;	}	name = dentry_name(dentry, 0);	if(name == NULL) return(-ENOMEM);	err = set_attr(name, &attrs);	kfree(name);	if(err)		return(err);	return(inode_setattr(dentry->d_inode, attr));}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/a0d43df931870997467042931e8fb7657375d327/hostfs_kern.c/buggy/fs/hostfs/hostfs_kern.c