From 3fbd51c11634970b0c2293287037755f24d9af51 Mon Sep 17 00:00:00 2001 From: zhangkaixiang Date: Thu, 11 May 2023 16:25:08 +0800 Subject: [PATCH] remove the check of lower_sb Signed-off-by: zhangkaixiang --- fs/sharefs/lookup.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/fs/sharefs/lookup.c b/fs/sharefs/lookup.c index fb6da6b11be3..d45cb28dd994 100644 --- a/fs/sharefs/lookup.c +++ b/fs/sharefs/lookup.c @@ -153,19 +153,9 @@ static struct dentry *__sharefs_interpose(struct dentry *dentry, struct path *lower_path) { struct inode *inode; - struct inode *lower_inode; - struct super_block *lower_sb; + struct inode *lower_inode = d_inode(lower_path->dentry); struct dentry *ret_dentry; - lower_inode = d_inode(lower_path->dentry); - lower_sb = sharefs_lower_super(sb); - - /* check that the lower file system didn't cross a mount point */ - if (lower_inode->i_sb != lower_sb) { - ret_dentry = ERR_PTR(-EXDEV); - goto out; - } - /* * We allocate our new inode below by calling sharefs_iget, * which will initialize some of the new inode's fields -- Gitee