diff options
author | Yan, Zheng <zyan@redhat.com> | 2016-06-15 10:29:18 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-07-28 02:55:40 +0200 |
commit | 9a5530c63889ac928a45c4645ab0bc23b4fbfcb8 (patch) | |
tree | 6c3d76c198fd3b26c6fe9e5c7f922ad62cbafdc7 /fs/ceph/super.h | |
parent | ceph: fix use-after-free bug in ceph_direct_read_write() (diff) | |
download | linux-9a5530c63889ac928a45c4645ab0bc23b4fbfcb8.tar.xz linux-9a5530c63889ac928a45c4645ab0bc23b4fbfcb8.zip |
ceph: wait unsafe sync writes for evicting inode
Otherwise ceph_sync_write_unsafe() may access/modify freed inode.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 50846e6f6a8c..d5b9077467a4 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -749,6 +749,7 @@ extern const struct inode_operations ceph_file_iops; extern struct inode *ceph_alloc_inode(struct super_block *sb); extern void ceph_destroy_inode(struct inode *inode); extern int ceph_drop_inode(struct inode *inode); +extern void ceph_evict_inode(struct inode *inode); extern struct inode *ceph_get_inode(struct super_block *sb, struct ceph_vino vino); @@ -927,6 +928,7 @@ extern int ceph_atomic_open(struct inode *dir, struct dentry *dentry, extern int ceph_release(struct inode *inode, struct file *filp); extern void ceph_fill_inline_data(struct inode *inode, struct page *locked_page, char *data, size_t len); +extern void ceph_sync_write_wait(struct inode *inode); /* dir.c */ extern const struct file_operations ceph_dir_fops; extern const struct file_operations ceph_snapdir_fops; |