From: Hongbo Li <lihongbo22@huawei.com> hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/release-management/issues/ID5W1P ------------------ Fix sparse warning for mfs_lookup, mfs_dir_iops, mfs_symlink_iops and mfs_symlink_iops. Fixes: e441b7b0b27b ("mfs: Add basic metadata operation for MFS") Signed-off-by: Hongbo Li <lihongbo22@huawei.com> --- fs/mfs/inode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/mfs/inode.c b/fs/mfs/inode.c index 9894676a1da9..cbbce30db3f6 100644 --- a/fs/mfs/inode.c +++ b/fs/mfs/inode.c @@ -120,8 +120,8 @@ static int _lookup_create(struct path *lpath, struct path *parent_cpath, return ret; } -struct dentry *mfs_lookup(struct inode *dir, struct dentry *dentry, - unsigned int flag) +static struct dentry *mfs_lookup(struct inode *dir, struct dentry *dentry, + unsigned int flag) { struct path parent_lpath, parent_cpath, lpath, cpath; struct dentry *ret, *parent; @@ -217,17 +217,17 @@ static const char *mfs_get_link(struct dentry *dentry, return p; } -const struct inode_operations mfs_dir_iops = { +static const struct inode_operations mfs_dir_iops = { .lookup = mfs_lookup, .getattr = mfs_getattr, }; -const struct inode_operations mfs_symlink_iops = { +static const struct inode_operations mfs_symlink_iops = { .getattr = mfs_getattr, .get_link = mfs_get_link, }; -const struct inode_operations mfs_file_iops = { +static const struct inode_operations mfs_file_iops = { .getattr = mfs_getattr, }; -- 2.25.1