diff options
author | Theodore Ts'o <tytso@mit.edu> | 2015-05-15 00:19:01 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-05-15 00:19:01 +0200 |
commit | 8f4d855839179f410fa910a26eb81d646d628f26 (patch) | |
tree | a3fd4e5b048b585cc5ecfa8713d1bce006d8b65a /fs/ext4 | |
parent | Linux 4.1-rc2 (diff) | |
download | linux-8f4d855839179f410fa910a26eb81d646d628f26.tar.xz linux-8f4d855839179f410fa910a26eb81d646d628f26.zip |
ext4: fix lazytime optimization
We had a fencepost error in the lazytime optimization which means that
timestamp would get written to the wrong inode.
Cc: stable@vger.kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to '')
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 55b187c3bac1..0554b0b5957b 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4345,7 +4345,7 @@ static void ext4_update_other_inodes_time(struct super_block *sb, int inode_size = EXT4_INODE_SIZE(sb); oi.orig_ino = orig_ino; - ino = orig_ino & ~(inodes_per_block - 1); + ino = (orig_ino & ~(inodes_per_block - 1)) + 1; for (i = 0; i < inodes_per_block; i++, ino++, buf += inode_size) { if (ino == orig_ino) continue; |