Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1595119yba; Thu, 9 May 2019 20:24:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqymtVobt/iXPx+jIRHg5ayy38x0NciWOKvSqukv72tOSfWvktJT7NL9TKI9mqt3sS1SLJ2z X-Received: by 2002:a65:6116:: with SMTP id z22mr10781197pgu.50.1557458678083; Thu, 09 May 2019 20:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557458678; cv=none; d=google.com; s=arc-20160816; b=d391jPFFfTh6iGeyon6CkMtB7/9VWN2yE6HVTObJdQ6xDY9Rp+rrelqesDRcdSyN7L xnhPwxI1VSQW29j20+uPx2KKqQwc5pEsXVD9fOCqpiHGUqKOcj6tlyy+XjcTztP762lK wN2D534j+XT2JQTuIp+kaYq+sHTdITchQD4ccxHu1+yC/UqIO423dzvlVGBpxezM6lKY WXij/XoSGNMCu9tdvg9m00GgTGOpzLi3wnTvdkY5uqc2XIQcIc+Hxe6QRx//14K6ckaj KBy+8UbeiUEoAf7eSKuYFCZgr92uLdT8zjuAgATjxPnmK7+5rhJgWzEHd7bqdNhM4Bxm 2i2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=epVi/EhgaG6Oyum7wGyVBKsonaRlWOnsw2ngPNDoP3w=; b=FdOjeP1cbMEes8g1lWIETTNX6ScMF5C97s2VVd6m1zjwu8eqm0/l2Jar66ZZcgrEoV AB7NBfnWAFSHb72bYIInKzTb+p1RyXLD78k0ngWROZnR36ESCa/19HB9phsmkvQ5KF8W fqhOILy62w07N9GwbydXijgcbiyUEsBMUtIziL045eU1Rv0SSsm3cvrhWdksDApWW5ac H9mQ3SLBg7Y0GWtyVa2by9hRVoYAfNeyZgnbH35rkX4m0yT6WUgwLteG11MxT2ASDCh1 jDCmSJRwdNVr7mmfl3VEYtXv05Zmxfdb2IDUvXboP9K2iIcSWlF3VdPOdTXjtad8j7hu SYaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9si6032196pfa.282.2019.05.09.20.24.22; Thu, 09 May 2019 20:24:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726975AbfEJDW2 (ORCPT + 99 others); Thu, 9 May 2019 23:22:28 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:57108 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726806AbfEJDW1 (ORCPT ); Thu, 9 May 2019 23:22:27 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 0EDE877DFFF3D5616573; Fri, 10 May 2019 11:22:26 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Fri, 10 May 2019 11:22:16 +0800 From: YueHaibing To: , , CC: , , YueHaibing Subject: [PATCH] ubifs: Fix build error without CONFIG_UBIFS_FS_XATTR Date: Fri, 10 May 2019 11:21:44 +0800 Message-ID: <20190510032144.15060-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix gcc build error while CONFIG_UBIFS_FS_XATTR is not set fs/ubifs/dir.o: In function `ubifs_unlink': dir.c:(.text+0x260): undefined reference to `ubifs_purge_xattrs' fs/ubifs/dir.o: In function `do_rename': dir.c:(.text+0x1edc): undefined reference to `ubifs_purge_xattrs' fs/ubifs/dir.o: In function `ubifs_rmdir': dir.c:(.text+0x2638): undefined reference to `ubifs_purge_xattrs' Reported-by: Hulk Robot Fixes: 9ca2d7326444 ("ubifs: Limit number of xattrs per inode") Signed-off-by: YueHaibing --- fs/ubifs/ubifs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index 379b9f7..fd7f399 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h @@ -2015,13 +2015,17 @@ int ubifs_xattr_set(struct inode *host, const char *name, const void *value, size_t size, int flags, bool check_lock); ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf, size_t size); -int ubifs_purge_xattrs(struct inode *host); #ifdef CONFIG_UBIFS_FS_XATTR void ubifs_evict_xattr_inode(struct ubifs_info *c, ino_t xattr_inum); +int ubifs_purge_xattrs(struct inode *host); #else static inline void ubifs_evict_xattr_inode(struct ubifs_info *c, ino_t xattr_inum) { } +static inline int ubifs_purge_xattrs(struct inode *host) +{ + return 0; +} #endif #ifdef CONFIG_UBIFS_FS_SECURITY -- 2.7.4