瀏覽代碼

jbd2: simplify error path on allocation failure in do_get_write_access()

We were acquiring bh_state_lock when allocation of buffer failed in
do_get_write_access() only to be able to jump to a label that releases
the lock and does all other checks that don't make sense for this error
path. Just jump into the right label instead.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Jan Kara 10 年之前
父節點
當前提交
d012aa5965
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      fs/jbd2/transaction.c

+ 1 - 2
fs/jbd2/transaction.c

@@ -947,8 +947,7 @@ repeat:
 					       __func__);
 					JBUFFER_TRACE(jh, "oom!");
 					error = -ENOMEM;
-					jbd_lock_bh_state(bh);
-					goto done;
+					goto out;
 				}
 				goto repeat;
 			}