From patchwork Fri Apr 29 14:18:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Gruenbacher X-Patchwork-Id: 8983211 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BCD5DBF29F for ; Fri, 29 Apr 2016 14:18:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F1A08201ED for ; Fri, 29 Apr 2016 14:18:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F3C44201E4 for ; Fri, 29 Apr 2016 14:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753786AbcD2OSo (ORCPT ); Fri, 29 Apr 2016 10:18:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52609 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752950AbcD2OSo (ORCPT ); Fri, 29 Apr 2016 10:18:44 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A33883F44; Fri, 29 Apr 2016 14:18:43 +0000 (UTC) Received: from nux.redhat.com (vpn1-6-50.ams2.redhat.com [10.36.6.50]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3TEIcEZ022068; Fri, 29 Apr 2016 10:18:41 -0400 From: Andreas Gruenbacher To: Alexander Viro Cc: Andreas Gruenbacher , linux-fsdevel@vger.kernel.org Subject: [PATCH 1/5] jffs2: Remove jffs2_{get,set,remove}xattr macros Date: Fri, 29 Apr 2016 16:18:33 +0200 Message-Id: <1461939517-15497-2-git-send-email-agruenba@redhat.com> In-Reply-To: <1461939517-15497-1-git-send-email-agruenba@redhat.com> References: <1461939517-15497-1-git-send-email-agruenba@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When sb->s_xattr is NULL, the generic_{get,set,remove}xattr functions produce the same result that setting the {get,set,remove}xattr inode operations to NULL produces; there is no need for these macros. Signed-off-by: Andreas Gruenbacher --- fs/jffs2/dir.c | 6 +++--- fs/jffs2/file.c | 6 +++--- fs/jffs2/symlink.c | 6 +++--- fs/jffs2/xattr.h | 6 ------ 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index 7a9579e..9130c7a 100644 --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.c @@ -61,10 +61,10 @@ const struct inode_operations jffs2_dir_inode_operations = .get_acl = jffs2_get_acl, .set_acl = jffs2_set_acl, .setattr = jffs2_setattr, - .setxattr = jffs2_setxattr, - .getxattr = jffs2_getxattr, + .setxattr = generic_setxattr, + .getxattr = generic_getxattr, .listxattr = jffs2_listxattr, - .removexattr = jffs2_removexattr + .removexattr = generic_removexattr }; /***********************************************************************/ diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c index cad86ba..bf543cb 100644 --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.c @@ -66,10 +66,10 @@ const struct inode_operations jffs2_file_inode_operations = .get_acl = jffs2_get_acl, .set_acl = jffs2_set_acl, .setattr = jffs2_setattr, - .setxattr = jffs2_setxattr, - .getxattr = jffs2_getxattr, + .setxattr = generic_setxattr, + .getxattr = generic_getxattr, .listxattr = jffs2_listxattr, - .removexattr = jffs2_removexattr + .removexattr = generic_removexattr }; const struct address_space_operations jffs2_file_address_operations = diff --git a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c index 2cabd64..afe2d75 100644 --- a/fs/jffs2/symlink.c +++ b/fs/jffs2/symlink.c @@ -16,8 +16,8 @@ const struct inode_operations jffs2_symlink_inode_operations = .readlink = generic_readlink, .get_link = simple_get_link, .setattr = jffs2_setattr, - .setxattr = jffs2_setxattr, - .getxattr = jffs2_getxattr, + .setxattr = generic_setxattr, + .getxattr = generic_getxattr, .listxattr = jffs2_listxattr, - .removexattr = jffs2_removexattr + .removexattr = generic_removexattr }; diff --git a/fs/jffs2/xattr.h b/fs/jffs2/xattr.h index 467ff37..720007b 100644 --- a/fs/jffs2/xattr.h +++ b/fs/jffs2/xattr.h @@ -99,9 +99,6 @@ extern const struct xattr_handler jffs2_user_xattr_handler; extern const struct xattr_handler jffs2_trusted_xattr_handler; extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t); -#define jffs2_getxattr generic_getxattr -#define jffs2_setxattr generic_setxattr -#define jffs2_removexattr generic_removexattr #else @@ -116,9 +113,6 @@ extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t); #define jffs2_xattr_handlers NULL #define jffs2_listxattr NULL -#define jffs2_getxattr NULL -#define jffs2_setxattr NULL -#define jffs2_removexattr NULL #endif /* CONFIG_JFFS2_FS_XATTR */