@@ -152,7 +152,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
int error;
int idx;
- if (task_active_pid_ns(current) != &init_pid_ns)
+ if (!task_is_in_root_ns(current))
return -EINVAL;
idx = get_device_index((struct coda_mount_data *) data);
@@ -270,7 +270,7 @@ static int coda_psdev_open(struct inode * inode, struct file * file)
struct venus_comm *vcp;
int idx, err;
- if (task_active_pid_ns(current) != &init_pid_ns)
+ if (!task_is_in_root_ns(current))
return -EINVAL;
if (current_user_ns() != &init_user_ns)
Replace open coded checking root PID namespace with task_is_in_root_ns(). Signed-off-by: Leo Yan <leo.yan@linaro.org> --- fs/coda/inode.c | 2 +- fs/coda/psdev.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)