On 13/10/2020 17:40, David Sterba wrote: > This can't be inside the function, the 'type' here is for inode that > does not know anything about zoned mode. The right place is after > check_fsflags in btrfs_ioctl_setflags in a helper like: > > ret = check_fsflags_compatible(fs_info, flags)); > if (ret) > goto out_unlock; > > and check_fsflags_compatible checks for zoned mode and NOCOW and returns > -EPERM, not silently unmasking it. And done as well.