From a2c75c8143eaa8f7404dae3df98fe43ebaafce16 Mon Sep 17 00:00:00 2001 From: Gao Xiang Date: Wed, 4 Sep 2019 10:08:59 +0800 Subject: erofs: better erofs symlink stuffs Fix as Christoph suggested [1] [2], "remove is_inode_fast_symlink and just opencode it in the few places using it" and "Please just set the ops directly instead of obsfucating that in a single caller, single line inline function. And please set it instead of the normal symlink iops in the same place where you also set those." [1] https://lore.kernel.org/r/20190830163910.GB29603@infradead.org/ [2] https://lore.kernel.org/r/20190829102426.GE20598@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20190904020912.63925-13-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman --- fs/erofs/internal.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'fs/erofs/internal.h') diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h index 10497ee07cae..cc1ea98c5c89 100644 --- a/fs/erofs/internal.h +++ b/fs/erofs/internal.h @@ -479,16 +479,6 @@ extern const struct inode_operations erofs_generic_iops; extern const struct inode_operations erofs_symlink_iops; extern const struct inode_operations erofs_fast_symlink_iops; -static inline void set_inode_fast_symlink(struct inode *inode) -{ - inode->i_op = &erofs_fast_symlink_iops; -} - -static inline bool is_inode_fast_symlink(struct inode *inode) -{ - return inode->i_op == &erofs_fast_symlink_iops; -} - struct inode *erofs_iget(struct super_block *sb, erofs_nid_t nid, bool dir); int erofs_getattr(const struct path *path, struct kstat *stat, u32 request_mask, unsigned int query_flags); -- cgit v1.2.3