file.c (de4fb176622d54a82ea3ceb7362392aaf5ff0b5a) file.c (b7446e7cf15f0926866c8e5de90ab278998bf8c8)
1/*
2 * JFFS2 -- Journalling Flash File System, Version 2.
3 *
4 * Copyright © 2001-2007 Red Hat, Inc.
5 * Copyright © 2004-2010 David Woodhouse <dwmw2@infradead.org>
6 *
7 * Created by David Woodhouse <dwmw2@infradead.org>
8 *

--- 199 unchanged lines hidden (view full) ---

208 }
209
210 /*
211 * While getting a page and reading data in, lock c->alloc_sem until
212 * the page is Uptodate. Otherwise GC task may attempt to read the same
213 * page in read_cache_page(), which causes a deadlock.
214 */
215 mutex_lock(&c->alloc_sem);
1/*
2 * JFFS2 -- Journalling Flash File System, Version 2.
3 *
4 * Copyright © 2001-2007 Red Hat, Inc.
5 * Copyright © 2004-2010 David Woodhouse <dwmw2@infradead.org>
6 *
7 * Created by David Woodhouse <dwmw2@infradead.org>
8 *

--- 199 unchanged lines hidden (view full) ---

208 }
209
210 /*
211 * While getting a page and reading data in, lock c->alloc_sem until
212 * the page is Uptodate. Otherwise GC task may attempt to read the same
213 * page in read_cache_page(), which causes a deadlock.
214 */
215 mutex_lock(&c->alloc_sem);
216 pg = grab_cache_page_write_begin(mapping, index, flags);
216 pg = grab_cache_page_write_begin(mapping, index);
217 if (!pg) {
218 ret = -ENOMEM;
219 goto release_sem;
220 }
221 *pagep = pg;
222
223 /*
224 * Read in the page if it wasn't already present. Cannot optimize away

--- 119 unchanged lines hidden ---
217 if (!pg) {
218 ret = -ENOMEM;
219 goto release_sem;
220 }
221 *pagep = pg;
222
223 /*
224 * Read in the page if it wasn't already present. Cannot optimize away

--- 119 unchanged lines hidden ---