projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa46674
)
ceph: prevent i_version from going back
author
Yan, Zheng
<zyan@redhat.com>
Sat, 26 May 2018 08:54:39 +0000
(16:54 +0800)
committer
Ilya Dryomov
<idryomov@gmail.com>
Mon, 4 Jun 2018 18:46:01 +0000
(20:46 +0200)
inode info from non-auth can be stale.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/inode.c
patch
|
blob
|
history
diff --git
a/fs/ceph/inode.c
b/fs/ceph/inode.c
index 4aeccb13437bdbc4fad2dee6a6548eaece0e8188..4fda7a9d4c9d8367077a19a3f48a894897441f7e 100644
(file)
--- a/
fs/ceph/inode.c
+++ b/
fs/ceph/inode.c
@@
-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;