journal.c (3d7a96f5a485b7d06c2379f343d7312af89ec9e2) | journal.c (025dfdafe77f20b3890981a394774baab7b9c827) |
---|---|
1/* 2 * This file is part of UBIFS. 3 * 4 * Copyright (C) 2006-2008 Nokia Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 as published by 8 * the Free Software Foundation. --- 177 unchanged lines hidden (view full) --- 186 187 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); 188 dbg_jnl("got LEB %d for jhead %d", lnum, jhead); 189 avail = c->leb_size - wbuf->offs - wbuf->used; 190 191 if (wbuf->lnum != -1 && avail >= len) { 192 /* 193 * Someone else has switched the journal head and we have | 1/* 2 * This file is part of UBIFS. 3 * 4 * Copyright (C) 2006-2008 Nokia Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 as published by 8 * the Free Software Foundation. --- 177 unchanged lines hidden (view full) --- 186 187 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); 188 dbg_jnl("got LEB %d for jhead %d", lnum, jhead); 189 avail = c->leb_size - wbuf->offs - wbuf->used; 190 191 if (wbuf->lnum != -1 && avail >= len) { 192 /* 193 * Someone else has switched the journal head and we have |
194 * enough space now. This happens when more then one process is | 194 * enough space now. This happens when more than one process is |
195 * trying to write to the same journal head at the same time. 196 */ 197 dbg_jnl("return LEB %d back, already have LEB %d:%d", 198 lnum, wbuf->lnum, wbuf->offs + wbuf->used); 199 err = ubifs_return_leb(c, lnum); 200 if (err) 201 goto out_unlock; 202 return 0; --- 1241 unchanged lines hidden --- | 195 * trying to write to the same journal head at the same time. 196 */ 197 dbg_jnl("return LEB %d back, already have LEB %d:%d", 198 lnum, wbuf->lnum, wbuf->offs + wbuf->used); 199 err = ubifs_return_leb(c, lnum); 200 if (err) 201 goto out_unlock; 202 return 0; --- 1241 unchanged lines hidden --- |