Skip to content

Commit

Permalink
ceph: prevent i_version from going back
Browse files Browse the repository at this point in the history
inode info from non-auth can be stale.

Signed-off-by: "Yan, Zheng" <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
  • Loading branch information
ukernel authored and idryomov committed Jun 4, 2018
1 parent fa46674 commit aae1a44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit aae1a44

Please sign in to comment.