OpenCloudOS-Kernel/fs/jbd
dingdinghua f1015c4477 jbd: fix race between write_metadata_buffer and get_write_access
The function journal_write_metadata_buffer() calls jbd_unlock_bh_state(bh_in)
too early; this could potentially allow another thread to call get_write_access
on the buffer head, modify the data, and dirty it, and allowing the wrong data
to be written into the journal.  Fortunately, if we lose this race, the only
time this will actually cause filesystem corruption is if there is a system
crash or other unclean shutdown of the system before the next commit can take
place.

Signed-off-by: dingdinghua <dingdinghua85@gmail.com>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
2009-07-21 11:54:42 +02:00
..
Kconfig fs/Kconfig: move ext2, ext3, ext4, JBD, JBD2 out 2008-10-20 11:43:59 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
checkpoint.c jbd: don't give up looking for space so easily in __log_wait_for_space 2008-11-06 22:37:59 -05:00
commit.c jbd: fix race in buffer processing in commit code 2009-06-09 16:59:03 -07:00
journal.c jbd: fix race between write_metadata_buffer and get_write_access 2009-07-21 11:54:42 +02:00
recovery.c jbd: fix error handling for checkpoint io 2008-10-23 08:55:01 -07:00
revoke.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 2009-04-24 08:37:40 -07:00
transaction.c jbd: Fix a race between checkpointing code and journal_get_write_access() 2009-07-15 21:30:07 +02:00