jbd2: don't leak modified metadata buffers on an aborted journal
authorTheodore Ts'o <tytso@mit.edu>
Sun, 5 Feb 2017 04:14:19 +0000 (23:14 -0500)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 06:02:35 +0000 (08:02 +0200)
commit45f1a95e8e169b8fc67d77b603ed2615301626f3
treed87e4f48e1283bca6bfb275a71e708883ef76c10
parent188b2ebb367591a1841825294f21f30186743186
jbd2: don't leak modified metadata buffers on an aborted journal

commit e112666b4959b25a8552d63bc564e1059be703e8 upstream.

If the journal has been aborted, we shouldn't mark the underlying
buffer head as dirty, since that will cause the metadata block to get
modified.  And if the journal has been aborted, we shouldn't allow
this since it will almost certainly lead to a corrupted file system.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/jbd2/transaction.c