Commit 73ce5934 authored by Hisashi Hifumi's avatar Hisashi Hifumi Committed by Linus Torvalds
Browse files

[PATCH] reiserfs: fix journaling issue regarding fsync()

When write() extends a file(i_size is increased) and fsync() is called,
change of inode must be written to journaling area through fsync().
But,currently the i_trans_id is not correctly updated when i_size is
increased.  So fsync() does not kick the journal writer.

Reiserfs_file_write() already updates the transaction when blocks are
allocated, but the case when i_size increases and new blocks are not added
is not correctly treated.

Following patch fix this bug.
Signed-off-by: default avatarHisashi Hifumi <>
Cc: Jeff Mahoney <>
Cc: Chris Mason <>
Cc: Hans Reiser <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 0808925e
......@@ -860,8 +860,12 @@ static int reiserfs_submit_file_region_for_write(struct reiserfs_transaction_han
// this sets the proper flags for O_SYNC to trigger a commit
} else
} else {
sd_update = 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment