> + /* require the new mount api */ > + if (exclusive && (fc->ops == &legacy_fs_context_ops)) No need for the inner braces. > + return -EOPNOTSUPP; > + > fc->phase = FS_CONTEXT_CREATING; > + fc->exclusive = exclusive; > > ret = vfs_get_tree(fc); > - if (ret) > + if (ret) { > + fc->exclusive = false; What's the point in clearing the flag on error? > + case FSCONFIG_CMD_CREATE_EXCL: > + fallthrough; > case FSCONFIG_CMD_CREATE: > - ret = vfs_cmd_create(fc); > + ret = vfs_cmd_create(fc, cmd == FSCONFIG_CMD_CREATE_EXCL); > if (ret) > break; > return 0; Nitpick, but I always find it cleaner to do something like: case FSCONFIG_CMD_CREATE_EXCL: ret = vfs_cmd_create(fc, true) break; case FSCONFIG_CMD_CREATE: ret = vfs_cmd_create(fc, false); but that might just be preference.