From patchwork Thu Oct 25 11:38:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhijit Pawar X-Patchwork-Id: 1643421 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 72479DF2AB for ; Thu, 25 Oct 2012 11:38:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752662Ab2JYLif (ORCPT ); Thu, 25 Oct 2012 07:38:35 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:64612 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751694Ab2JYLid (ORCPT ); Thu, 25 Oct 2012 07:38:33 -0400 Received: by mail-pa0-f46.google.com with SMTP id hz1so1099277pad.19 for ; Thu, 25 Oct 2012 04:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-forwarded-message-id:content-type :content-transfer-encoding; bh=dHx7iD8EJMAL7+GbUARW0L1HQPCmCco/EMaIGlsVf6w=; b=e9EzkJaCarF/8GfQNgshq9YjljQF4b5WmDQtOd6/O25IHRGdhK0P3WszY8nbw30JT0 ksWBgKHt8RlkVjqCU/yjanr6W7jrBL3Qj+wHphx/5qbEoexm72K2lA2qggpvCQr6gMaf FRVO5MbUo7foXdfIGCiUzZY+8QuhH+3tCF3x9FrY2anKaGfd+9yhYl61QXCq3Z7i08L3 GDu1fOgcnxDHOnzZojNoiAYvVSYwcIQ4pz2PmK6VGmDW9sxVe/W/tu74nxGu9JQ0z1e1 PUjIjnlT/RQXJsd/iefVqwT5gT0dOh8aeOvrLVT1E4h12Px8DdOYdu4aI1JoPPhQpJ1F Nyig== Received: by 10.68.234.225 with SMTP id uh1mr19011887pbc.9.1351165112906; Thu, 25 Oct 2012 04:38:32 -0700 (PDT) Received: from [172.27.56.83] ([121.242.40.10]) by mx.google.com with ESMTPS id k9sm11163712paz.22.2012.10.25.04.38.30 (version=SSLv3 cipher=OTHER); Thu, 25 Oct 2012 04:38:32 -0700 (PDT) Message-ID: <508924AB.4060902@gmail.com> Date: Thu, 25 Oct 2012 17:08:19 +0530 From: Abhijit Pawar User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: linux-fsdevel@vger.kernel.org CC: "linux-btrfs@vger.kernel.org" , linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Subject: [RESEND PATCH] fs/super.c set_anon_super calling optimization References: In-Reply-To: X-Forwarded-Message-Id: Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Hi, set_anon_super is called by many filesystems. Some call directly and some call through the wrapper. Many of them in the wrapper's call to this function are passing the second argument to this function which is not used anywhere. This patch replaces the second variable with NULL. Thanks, Abhijit Pawar Signed-off-by: Abhijit Pawar CC: Greg Kroah-Hartman CC: linux-kernel@vger.kernel.org CC: linux-btrfs@vger.kernel.org --- return error; -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 137d503..132db90 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c @@ -61,7 +61,7 @@ static const struct super_operations v9fs_super_ops, v9fs_super_ops_dotl; static int v9fs_set_super(struct super_block *s, void *data) { s->s_fs_info = data; - return set_anon_super(s, data); + return set_anon_super(s, NULL); } /** diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 915ac14..c9994a3 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -954,7 +954,7 @@ static int btrfs_test_super(struct super_block *s, void *data) static int btrfs_set_super(struct super_block *s, void *data) { - int err = set_anon_super(s, data); + int err = set_anon_super(s, NULL); if (!err) s->s_fs_info = data; return err; diff --git a/fs/nfs/super.c b/fs/nfs/super.c index e831bce..486bf7a 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -2260,7 +2260,7 @@ static int nfs_set_super(struct super_block *s, void *data) s->s_flags = sb_mntdata->mntflags; s->s_fs_info = server; s->s_d_op = server->nfs_client->rpc_ops->dentry_ops; - ret = set_anon_super(s, server); + ret = set_anon_super(s, NULL); if (ret == 0) server->s_dev = s->s_dev; return ret; diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 71eb7e2..56d0059 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -89,7 +89,7 @@ static int sysfs_test_super(struct super_block *sb, void *data) static int sysfs_set_super(struct super_block *sb, void *data) { int error; - error = set_anon_super(sb, data); + error = set_anon_super(sb, NULL); if (!error) sb->s_fs_info = data;