diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2015-05-14 18:19:01 -0400 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-05-29 03:52:10 +0200 |
| commit | ef59f2031f065b0b2f8cf7a29f6b4f98714fa740 (patch) | |
| tree | ac123c2aeee233985c73e6cb709dbc4b51848d89 | |
| parent | 4173598c368587e4340422faa27051817a160422 (diff) | |
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>
| -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 c99637ca4..9f472c58a 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4346,7 +4346,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; |
