Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 125438
Collapse All | Expand All

(-)linux-2.6.14.7.orig/fs/nfs/direct.c (+10 lines)
Lines 57-62 Link Here
57
#define NFSDBG_FACILITY		NFSDBG_VFS
57
#define NFSDBG_FACILITY		NFSDBG_VFS
58
#define MAX_DIRECTIO_SIZE	(4096UL << PAGE_SHIFT)
58
#define MAX_DIRECTIO_SIZE	(4096UL << PAGE_SHIFT)
59
59
60
static void nfs_free_user_pages(struct page **pages, int npages, int do_dirty);
60
static kmem_cache_t *nfs_direct_cachep;
61
static kmem_cache_t *nfs_direct_cachep;
61
62
62
/*
63
/*
Lines 107-112 Link Here
107
					page_count, (rw == READ), 0,
108
					page_count, (rw == READ), 0,
108
					*pages, NULL);
109
					*pages, NULL);
109
		up_read(&current->mm->mmap_sem);
110
		up_read(&current->mm->mmap_sem);
111
		/*
112
		 * If we got fewer pages than expected from get_user_pages(),
113
		 * the user buffer runs off the end of a mapping; return EFAULT.
114
		 */
115
		if (result >= 0 && result < page_count) {
116
			nfs_free_user_pages(*pages, result, 0);
117
			*pages = NULL;
118
			result = -EFAULT;
119
		}
110
	}
120
	}
111
	return result;
121
	return result;
112
}
122
}

Return to bug 125438