From: Hannes Reinecke configfs_is_root() should not check for static structures, but use the information in the structure itself. Signed-off-by: Hannes Reinecke --- fs/configfs/mount.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index 4929f3431189..e5c01d5e4d2d 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c @@ -49,7 +49,9 @@ static struct config_group configfs_root_group = { int configfs_is_root(struct config_item *item) { - return item == &configfs_root_group.cg_item; + struct configfs_dirent *sd = + item->ci_dentry->d_fsdata; + return sd->s_type == CONFIGFS_ROOT; } static struct configfs_dirent configfs_root = { -- 2.51.0