int			status; 
mode_t mode = sattr->ia_mode; int status; 
nfs3_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,		 int flags){	struct nfs_fh		fhandle;	struct nfs_fattr	fattr;	struct nfs_fattr	dir_attr;	struct nfs3_createargs	arg = {		.fh		= NFS_FH(dir),		.name		= dentry->d_name.name,		.len		= dentry->d_name.len,		.sattr		= sattr,	};	struct nfs3_diropres	res = {		.dir_attr	= &dir_attr,		.fh		= &fhandle,		.fattr		= &fattr	};	int			status;	dprintk("NFS call  create %s\n", dentry->d_name.name);	arg.createmode = NFS3_CREATE_UNCHECKED;	if (flags & O_EXCL) {		arg.createmode  = NFS3_CREATE_EXCLUSIVE;		arg.verifier[0] = jiffies;		arg.verifier[1] = current->pid;	}again:	dir_attr.valid = 0;	fattr.valid = 0;	status = rpc_call(NFS_CLIENT(dir), NFS3PROC_CREATE, &arg, &res, 0);	nfs_refresh_inode(dir, &dir_attr);	/* If the server doesn't support the exclusive creation semantics,	 * try again with simple 'guarded' mode. */	if (status == NFSERR_NOTSUPP) {		switch (arg.createmode) {			case NFS3_CREATE_EXCLUSIVE:				arg.createmode = NFS3_CREATE_GUARDED;				break;			case NFS3_CREATE_GUARDED:				arg.createmode = NFS3_CREATE_UNCHECKED;				break;			case NFS3_CREATE_UNCHECKED:				goto out;		}		goto again;	}	if (status == 0)		status = nfs_instantiate(dentry, &fhandle, &fattr);	if (status != 0)		goto out;	/* When we created the file with exclusive semantics, make	 * sure we set the attributes afterwards. */	if (arg.createmode == NFS3_CREATE_EXCLUSIVE) {		dprintk("NFS call  setattr (post-create)\n");		if (!(sattr->ia_valid & ATTR_ATIME_SET))			sattr->ia_valid |= ATTR_ATIME;		if (!(sattr->ia_valid & ATTR_MTIME_SET))			sattr->ia_valid |= ATTR_MTIME;		/* 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);		nfs_refresh_inode(dentry->d_inode, &fattr);		dprintk("NFS reply setattr (post-create): %d\n", status);	}out:	dprintk("NFS reply create: %d\n", status);	return status;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/055ffbea0596942579b0dae71d5dab78de8135f6/nfs3proc.c/buggy/fs/nfs/nfs3proc.c