aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2019-07-25 20:16:46 +0800
committerIlya Dryomov <idryomov@gmail.com>2019-09-16 12:06:24 +0200
commit81f148a910045cd0a139f589a0b42764b172f8f5 (patch)
tree1f89ef39c6b7a440490aa2293f8ec70e8ecc74cd /fs/ceph/file.c
parentceph: return -EIO if read/write against filp that lost file locks (diff)
downloadlinux-dev-81f148a910045cd0a139f589a0b42764b172f8f5.tar.xz
linux-dev-81f148a910045cd0a139f589a0b42764b172f8f5.zip
ceph: invalidate all write mode filp after reconnect
Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index fb007b75fb17..779bf68afd60 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -234,6 +234,7 @@ static int ceph_init_file_info(struct inode *inode, struct file *file,
spin_lock_init(&fi->rw_contexts_lock);
INIT_LIST_HEAD(&fi->rw_contexts);
fi->meta_err = errseq_sample(&ci->i_meta_err);
+ fi->filp_gen = READ_ONCE(ceph_inode_to_client(inode)->filp_gen);
return 0;
}