ctx = nfs_find_open_context(inode, FMODE_WRITE); 
ctx = nfs_find_open_context(inode, NULL, FMODE_WRITE); 
int nfs_writepage(struct page *page, struct writeback_control *wbc){	struct nfs_open_context *ctx;	struct inode *inode = page->mapping->host;	unsigned long end_index;	unsigned offset = PAGE_CACHE_SIZE;	loff_t i_size = i_size_read(inode);	int inode_referenced = 0;	int priority = wb_priority(wbc);	int err;	/*	 * Note: We need to ensure that we have a reference to the inode	 *       if we are to do asynchronous writes. If not, waiting	 *       in nfs_wait_on_request() may deadlock with clear_inode().	 *	 *       If igrab() fails here, then it is in any case safe to	 *       call nfs_wb_page(), since there will be no pending writes.	 */	if (igrab(inode) != 0)		inode_referenced = 1;	end_index = i_size >> PAGE_CACHE_SHIFT;	/* Ensure we've flushed out any previous writes */	nfs_wb_page_priority(inode, page, priority);	/* easy case */	if (page->index < end_index)		goto do_it;	/* things got complicated... */	offset = i_size & (PAGE_CACHE_SIZE-1);	/* OK, are we completely out? */	err = 0; /* potential race with truncate - ignore */	if (page->index >= end_index+1 || !offset)		goto out;do_it:	ctx = nfs_find_open_context(inode, FMODE_WRITE);	if (ctx == NULL) {		err = -EBADF;		goto out;	}	lock_kernel();	if (!IS_SYNC(inode) && inode_referenced) {		err = nfs_writepage_async(ctx, inode, page, 0, offset);		if (err >= 0) {			err = 0;			if (wbc->for_reclaim)				nfs_flush_inode(inode, 0, 0, FLUSH_STABLE);		}	} else {		err = nfs_writepage_sync(ctx, inode, page, 0,						offset, priority);		if (err >= 0) {			if (err != offset)				redirty_page_for_writepage(wbc, page);			err = 0;		}	}	unlock_kernel();	put_nfs_open_context(ctx);out:	unlock_page(page);	if (inode_referenced)		iput(inode);	return err; }
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d530838bfa507d67b40d13b00d9cbd7a46a47e78/write.c/clean/fs/nfs/write.c