Commit aae1a442 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov

ceph: prevent i_version from going back

inode info from non-auth can be stale.
Signed-off-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent fa466743
......@@ -889,7 +889,8 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
}
/* finally update i_version */
ci->i_version = le64_to_cpu(info->version);
if (le64_to_cpu(info->version) > ci->i_version)
ci->i_version = le64_to_cpu(info->version);
inode->i_mapping->a_ops = &ceph_aops;
......
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