Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756550AbdLVOcf (ORCPT ); Fri, 22 Dec 2017 09:32:35 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:44571 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756205AbdLVObb (ORCPT ); Fri, 22 Dec 2017 09:31:31 -0500 X-Google-Smtp-Source: ACJfBou/P1Sms0De6Pd+Z7jJxgUN+OEyTiuUnqumo7JSsmpqbv3SqCqvTZv6uAMcHachISl9E4vWMQ== From: Dongsu Park To: linux-kernel@vger.kernel.org Cc: containers@lists.linux-foundation.org, Alban Crequy , "Eric W . Biederman" , Miklos Szeredi , Seth Forshee , Sargun Dhillon , Dongsu Park , linux-fsdevel@vger.kernel.org Subject: [PATCH 10/11] fuse: Allow user namespace mounts Date: Fri, 22 Dec 2017 15:32:34 +0100 Message-Id: X-Mailer: git-send-email 2.13.6 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1305 Lines: 41 From: Seth Forshee To be able to mount fuse from non-init user namespaces, it's necessary to set FS_USERNS_MOUNT flag to fs_flags. Patch v4 is available: https://patchwork.kernel.org/patch/8944681/ Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Miklos Szeredi Signed-off-by: Seth Forshee [dongsu: add a simple commit messasge] Signed-off-by: Dongsu Park --- fs/fuse/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 7f6b2e55..8c98edee 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1212,7 +1212,7 @@ static void fuse_kill_sb_anon(struct super_block *sb) static struct file_system_type fuse_fs_type = { .owner = THIS_MODULE, .name = "fuse", - .fs_flags = FS_HAS_SUBTYPE, + .fs_flags = FS_HAS_SUBTYPE | FS_USERNS_MOUNT, .mount = fuse_mount, .kill_sb = fuse_kill_sb_anon, }; @@ -1244,7 +1244,7 @@ static struct file_system_type fuseblk_fs_type = { .name = "fuseblk", .mount = fuse_mount_blk, .kill_sb = fuse_kill_sb_blk, - .fs_flags = FS_REQUIRES_DEV | FS_HAS_SUBTYPE, + .fs_flags = FS_REQUIRES_DEV | FS_HAS_SUBTYPE | FS_USERNS_MOUNT, }; MODULE_ALIAS_FS("fuseblk"); -- 2.13.6