summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorSasha Levin <sashal@kernel.org>2019-10-01 18:01:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-05 13:10:02 +0200
commit72f0fff3c450200f62bf8f6dd12033be35217d6f (patch)
tree046aab78a603ec3cbe8f1ecff21971aa9d81f881 /fs/ceph
parent98dc6d958bd9e9716e376cd13c0665f0d54f3577 (diff)
Revert "ceph: use ceph_evict_inode to cleanup inode's resource"
This reverts commit 812810399999a673d30f9d04d38659030a28051a. The backport was incorrect and was causing kernel panics. Revert and re-apply a correct backport from Jeff Layton. Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/inode.c7
-rw-r--r--fs/ceph/super.c2
-rw-r--r--fs/ceph/super.h2
3 files changed, 4 insertions, 7 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 665a86f83f4b..11f19432a74c 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -528,16 +528,13 @@ static void ceph_i_callback(struct rcu_head *head)
kmem_cache_free(ceph_inode_cachep, ci);
}
-void ceph_evict_inode(struct inode *inode)
+void ceph_destroy_inode(struct inode *inode)
{
struct ceph_inode_info *ci = ceph_inode(inode);
struct ceph_inode_frag *frag;
struct rb_node *n;
- dout("evict_inode %p ino %llx.%llx\n", inode, ceph_vinop(inode));
-
- truncate_inode_pages_final(&inode->i_data);
- clear_inode(inode);
+ dout("destroy_inode %p ino %llx.%llx\n", inode, ceph_vinop(inode));
ceph_fscache_unregister_inode_cookie(ci);
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 02528e11bf33..c5cf46e43f2e 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -827,9 +827,9 @@ static int ceph_remount(struct super_block *sb, int *flags, char *data)
static const struct super_operations ceph_super_ops = {
.alloc_inode = ceph_alloc_inode,
+ .destroy_inode = ceph_destroy_inode,
.write_inode = ceph_write_inode,
.drop_inode = ceph_drop_inode,
- .evict_inode = ceph_evict_inode,
.sync_fs = ceph_sync_fs,
.put_super = ceph_put_super,
.remount_fs = ceph_remount,
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 6e968e48e5e4..018019309790 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -854,7 +854,7 @@ static inline bool __ceph_have_pending_cap_snap(struct ceph_inode_info *ci)
extern const struct inode_operations ceph_file_iops;
extern struct inode *ceph_alloc_inode(struct super_block *sb);
-extern void ceph_evict_inode(struct inode *inode);
+extern void ceph_destroy_inode(struct inode *inode);
extern int ceph_drop_inode(struct inode *inode);
extern struct inode *ceph_get_inode(struct super_block *sb,