- reiserfsfix-journaling-issue-regarding-fsync.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     reiserfs: fix journaling issue regarding fsync()

has been removed from the -mm tree.  Its filename is

     reiserfsfix-journaling-issue-regarding-fsync.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: reiserfs: fix journaling issue regarding fsync()
From: Hisashi Hifumi <hifumi.hisashi@xxxxxxxxxxxxx>

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: Hisashi Hifumi <hifumi.hisashi@xxxxxxxxxxxxx>
Cc: Jeff Mahoney <jeffm@xxxxxxxx>
Cc: Chris Mason <mason@xxxxxxxx>
Cc: Hans Reiser <reiser@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/reiserfs/file.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -puN fs/reiserfs/file.c~reiserfsfix-journaling-issue-regarding-fsync fs/reiserfs/file.c
--- a/fs/reiserfs/file.c~reiserfsfix-journaling-issue-regarding-fsync
+++ a/fs/reiserfs/file.c
@@ -860,8 +860,12 @@ static int reiserfs_submit_file_region_f
 			// this sets the proper flags for O_SYNC to trigger a commit
 			mark_inode_dirty(inode);
 			reiserfs_write_unlock(inode->i_sb);
-		} else
+		} else {
+			reiserfs_write_lock(inode->i_sb);
+			reiserfs_update_inode_transaction(inode);
 			mark_inode_dirty(inode);
+			reiserfs_write_unlock(inode->i_sb);
+		}
 
 		sd_update = 1;
 	}
_

Patches currently in -mm which might be from hifumi.hisashi@xxxxxxxxxxxxx are

origin.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux