Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp907783pxa; Thu, 27 Aug 2020 20:35:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLLSoXi6bEjFf6n6IiPMEYQtYxuoD2KZD6RprCnI1lf+vUwQ76Z+PbuNaPngwCZKOm93D1 X-Received: by 2002:a17:906:9356:: with SMTP id p22mr23631261ejw.119.1598585741278; Thu, 27 Aug 2020 20:35:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598585741; cv=none; d=google.com; s=arc-20160816; b=JpkwnikJgAACLJPvih3VDuwuvIS+9nCaTDUY0HguEWYnOPpZ8glgflyel3qT7xnmuC YVvAi52x6Jk0Eqp7qWzSW9AwKfhJyMLXzuKjssazPRmQV28zEkiimgGJnMm5VSB8G7VY 8Vl6ONLVq5rxBTcw+pYRQ0mHM/ihdXMn1/BPGTx2pyeHqqm9vmLi5yVNgS9MqBvTeScJ NydE1jH40inKMUT/wIwAqjqpoPQPKHCFaqoY0fy18IcSX/y1uNQdMOvcKFsJIN/9MET+ 0qdvWqMLmPWWGHFIj42/WiHUi6eMPhZGYB48ZTPFdHjCDFzXHyGXWg2k7b/X7RhPxjdE nh8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=YVs6WMebFI5kx6vwWsAIbUxnYHkNJLlRR4ZqvDmrM8Q=; b=VkGHw1Aq8JIfxSCPgrPEBslygcQA3AcsDfA2pRa6WAGDVgVTSrGrzPetrvGzl/FqzS fv40wsmFbgawEfUM2Shbo+v3k1gXHZm1L63ZgAv7Z64RbEFXkN8X/LQcqZbtg9izQHSz 0wSn9rCjrYiphRtfchVykvpbS1R8eZ5UCXf01Wy1EHuJN2i1x9GNuOV032JK0pHeZGrl OqLixq8rvtDXTg+TcfFXoHM8RYwkvvKm1AlSJSRJ2iv3whC/VEIB2ergjrOX7jEleilA ZfXtg/chxah+T6ythdKcC6dFv+zbmrKEIJccxgz4msh96DiyQK64JniwmTGjvzIUcJZ6 byIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x17si2726048edi.428.2020.08.27.20.35.18; Thu, 27 Aug 2020 20:35:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728356AbgH1Ddg (ORCPT + 99 others); Thu, 27 Aug 2020 23:33:36 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:59406 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728115AbgH1Ddg (ORCPT ); Thu, 27 Aug 2020 23:33:36 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3048085FE2F224C0F4FC; Fri, 28 Aug 2020 11:33:34 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Fri, 28 Aug 2020 11:33:13 +0800 From: Zhihao Cheng To: , CC: , Subject: [PATCH] ubifs: setflags: Don't show error message when vfs_ioc_setflags_prepare() fails Date: Fri, 28 Aug 2020 11:32:50 +0800 Message-ID: <20200828033250.910168-1-chengzhihao1@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Following process will trigger ubifs_err: 1. useradd -m freg (Under root) 2. cd /home/freg && mkdir mp (Under freg) 3. mount -t ubifs /dev/ubi0_0 /home/freg/mp (Under root) 4. cd /home/freg && echo 123 > mp/a (Under root) 5. cd mp && chown freg a && chgrp freg a && chmod 777 a (Under root) 6. chattr +i a (Under freg) UBIFS error (ubi0:0 pid 1723): ubifs_ioctl [ubifs]: can't modify inode 65 attributes chattr: Operation not permitted while setting flags on a This is not an UBIFS problem, it was caused by task priviliage checking on file operations. Remove error message printing from kernel just like other filesystems (eg. ext4), since we already have enough information from userspace tools. Signed-off-by: Zhihao Cheng --- fs/ubifs/ioctl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c index 3df9be2c684c..4363d85a3fd4 100644 --- a/fs/ubifs/ioctl.c +++ b/fs/ubifs/ioctl.c @@ -134,7 +134,6 @@ static int setflags(struct inode *inode, int flags) return err; out_unlock: - ubifs_err(c, "can't modify inode %lu attributes", inode->i_ino); mutex_unlock(&ui->ui_mutex); ubifs_release_budget(c, &req); return err; -- 2.25.4