diff options
author | Luis Henriques <lhenriques@suse.com> | 2019-07-05 12:14:56 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-07-08 08:01:45 -0400 |
commit | 52dd0f1b3f94e600901ad785226e597743401245 (patch) | |
tree | bece918943a9852480d2a2e025af7f25a3d50ccf | |
parent | 87bc5b895d94a0f40fe170d4cf5771c8e8f85d15 (diff) |
ceph: use generic_delete_inode() for ->drop_inode
ceph_drop_inode() implementation is not any different from the generic
function, thus there's no point in keeping it around.
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r-- | fs/ceph/inode.c | 10 | ||||
-rw-r--r-- | fs/ceph/super.c | 2 | ||||
-rw-r--r-- | fs/ceph/super.h | 1 |
3 files changed, 1 insertions, 12 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index a565ab124282..791f84a13bb8 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -584,16 +584,6 @@ void ceph_evict_inode(struct inode *inode) | |||
584 | ceph_put_string(rcu_dereference_raw(ci->i_layout.pool_ns)); | 584 | ceph_put_string(rcu_dereference_raw(ci->i_layout.pool_ns)); |
585 | } | 585 | } |
586 | 586 | ||
587 | int ceph_drop_inode(struct inode *inode) | ||
588 | { | ||
589 | /* | ||
590 | * Positve dentry and corresponding inode are always accompanied | ||
591 | * in MDS reply. So no need to keep inode in the cache after | ||
592 | * dropping all its aliases. | ||
593 | */ | ||
594 | return 1; | ||
595 | } | ||
596 | |||
597 | static inline blkcnt_t calc_inode_blocks(u64 size) | 587 | static inline blkcnt_t calc_inode_blocks(u64 size) |
598 | { | 588 | { |
599 | return (size + (1<<9) - 1) >> 9; | 589 | return (size + (1<<9) - 1) >> 9; |
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 5f0c950ca966..84d23c896daa 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
@@ -842,7 +842,7 @@ static const struct super_operations ceph_super_ops = { | |||
842 | .alloc_inode = ceph_alloc_inode, | 842 | .alloc_inode = ceph_alloc_inode, |
843 | .free_inode = ceph_free_inode, | 843 | .free_inode = ceph_free_inode, |
844 | .write_inode = ceph_write_inode, | 844 | .write_inode = ceph_write_inode, |
845 | .drop_inode = ceph_drop_inode, | 845 | .drop_inode = generic_delete_inode, |
846 | .evict_inode = ceph_evict_inode, | 846 | .evict_inode = ceph_evict_inode, |
847 | .sync_fs = ceph_sync_fs, | 847 | .sync_fs = ceph_sync_fs, |
848 | .put_super = ceph_put_super, | 848 | .put_super = ceph_put_super, |
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 30e9a4e415cc..4196f30e5bdc 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -886,7 +886,6 @@ extern const struct inode_operations ceph_file_iops; | |||
886 | extern struct inode *ceph_alloc_inode(struct super_block *sb); | 886 | extern struct inode *ceph_alloc_inode(struct super_block *sb); |
887 | extern void ceph_evict_inode(struct inode *inode); | 887 | extern void ceph_evict_inode(struct inode *inode); |
888 | extern void ceph_free_inode(struct inode *inode); | 888 | extern void ceph_free_inode(struct inode *inode); |
889 | extern int ceph_drop_inode(struct inode *inode); | ||
890 | 889 | ||
891 | extern struct inode *ceph_get_inode(struct super_block *sb, | 890 | extern struct inode *ceph_get_inode(struct super_block *sb, |
892 | struct ceph_vino vino); | 891 | struct ceph_vino vino); |