Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp870977ybl; Wed, 4 Dec 2019 12:21:16 -0800 (PST) X-Google-Smtp-Source: APXvYqy+n7hF0c5CX4TX3JLE7znqn0kW5fYAxCEmFsq4jKQYDoR/6fzFCT+rdZ0EBOqBfUVhTbMm X-Received: by 2002:a9d:24a6:: with SMTP id z35mr3777563ota.343.1575490876909; Wed, 04 Dec 2019 12:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575490876; cv=none; d=google.com; s=arc-20160816; b=iQjivC4YwJO9zexcmrtvMYzYzQ51ulDb4ciPyZ0Esb2oV375jOTXB+UpTcXINp2Bhu p8phTXaLRDpdin/OmAYY+kB9SZz9ITZ4Z5/AYVpyloxKtvTlgPXhNQPrhhgMV2EqDFL8 snSexichpRZqPqGULDXSWz54GPzDkCSOjk5b4/BuEfZjeiBbvHnQ3C/AgDAu6utPqM5j 1clPj/lTzaelZyY2jT323f9Mgvokp4Lcy8SS19B+5b+sf5Tnlg1Cftptv3iRzbghL1VO GQy6ArD1DLJNIppxhT5EktpFyIjooHkP4PlJyBmTqkes3Y+i0TefHvp/DDMHRyICypLD Aq4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=IdpmGu8iGR4pu9wN40g1Va4Rxg/xN1WVWM43oFtOZuc=; b=KuRzCXBr784tIwOUTqz1rpN0NJJot4dIZPkQAtg2w2zQCglFboVvx4n58H/EYQBLLV QCfcbtkaZhvulwCQHy4vNWlFv81d2hcnfTw6QCfD5hWTlTySL5OwAxcJl4PtW1vycA7a FMD2U58yaoorn5SwiWE8oVd4NQHa4dBUCcyirtwgmq9LBWKZKN6RZFdyEpknx9SWKEKk kfl8w9wf3iUWEuJCRbXKq9ikItAY09mohJUT5DPsrZmlm5CXCqVt0sqp+rkr2xtp/QDA kDBJyvOEo3+TM89VI/3/7UbdaWwGt99Z6KX65EtJv5abH4TyAtUO9I3na56IwaLiL4qE E6iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GZ4USlEM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si3925447otl.54.2019.12.04.12.21.05; Wed, 04 Dec 2019 12:21:16 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GZ4USlEM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728302AbfLDUTS (ORCPT + 99 others); Wed, 4 Dec 2019 15:19:18 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:46014 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727033AbfLDUTS (ORCPT ); Wed, 4 Dec 2019 15:19:18 -0500 Received: by mail-pl1-f193.google.com with SMTP id w7so175241plz.12; Wed, 04 Dec 2019 12:19:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=IdpmGu8iGR4pu9wN40g1Va4Rxg/xN1WVWM43oFtOZuc=; b=GZ4USlEMGXv34THmiUPdaunV9mU1mXLwjquzOhYT1UTMPxHQXdwfl8TSoecTFZNaLm 4gM1RC87AWfGad075jZwJvO8b9Yfm2KDvrnt5mqrmxh4cziVMfaEQBKEZ/0AybZ/xXoz YS2Mfgigc4PcZCQvBCgFFDbxnIj2X2wAh/xCfEH1gdYUlsK+LB1CCoofz+d/jHqQJapf PSpmyHGUncjfB2tcWDiMGG4OP0iI818+PbMGW2MxVg4MIOnTEdaTSctO7ri2XtS2L3JH CHxnyvqr5Q67K1kOmvFRw4AFYG4Y8KSa7KzryXc0iaO7CoEPJC06vXsOsV6+cF/Vys/6 0HnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IdpmGu8iGR4pu9wN40g1Va4Rxg/xN1WVWM43oFtOZuc=; b=JooPbHXhDENfcvMgteyWBITjg5yWSgxtAcnD6jtkfrvUadnrBaSwJA3rZEpTLeGep1 u6nCPtByooDHRB3eW4QZ6HozKDBSZWIZ1+z+FGpMekppWuWg57p6j1LnBzw5UWRAF1O1 fiiQRFxR4QiNZwWgAcXk2yEunWNvsn16YD8lR2FdOq4oVH5TPKyIQZYF2if+NyrwsHqZ 7CgA0ZX42WdAcb8jj1oLIFDTp97lPGmtXeffGDIymMZXLobhaeqHiJoQcwJE1En4D7DY 6U0E5P7TBcRVkq/uD30Gp1gmdSSaE5nZukz7XmhTMff93Yge+QNNEYxJVv+2UzTZo1Ia wB0g== X-Gm-Message-State: APjAAAUeLkUNhvCgJcwD/9762IbJ62P45qsOiv81ogtGSeVyBSTkWDRT rs8sP1OXFEOav79MrYlf4yk= X-Received: by 2002:a17:90a:200d:: with SMTP id n13mr5388240pjc.16.1575490756959; Wed, 04 Dec 2019 12:19:16 -0800 (PST) Received: from localhost.localdomain ([2402:3a80:cdb:9473:3984:ab1:9b44:803]) by smtp.gmail.com with ESMTPSA id c2sm8882170pfn.55.2019.12.04.12.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2019 12:19:16 -0800 (PST) From: madhuparnabhowmik04@gmail.com To: clm@fb.com, josef@toxicpanda.com, paulmck@kernel.org, joel@joelfernandes.org Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, rcu@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Madhuparna Bhowmik Subject: [PATCH] fs: btrfs: volumes.h: Annotate rcu_string with __rcu Date: Thu, 5 Dec 2019 01:49:01 +0530 Message-Id: <20191204201901.22466-1-madhuparnabhowmik04@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Madhuparna Bhowmik This patch fixes the following sparse errors in fs/btrfs/super.c in function btrfs_show_devname() fs/btrfs/super.c: error: incompatible types in comparison expression (different address spaces): fs/btrfs/super.c: struct rcu_string [noderef] * fs/btrfs/super.c: struct rcu_string * The error was because of the following line in function btrfs_show_devname(): if (first_dev) seq_escape(m, rcu_str_deref(first_dev->name), " \t\n\\"); rcu_str_deref is defined in fs/btrfs/rcu-string.h And first_dev is of type struct btrfs_device. struct btrfs_device is defined in fs/btrfs/volumes.h Annotating the member "struct rcu_string *name " of struct btrfs_device with __rcu fixes the sparse error. Acked-by: Joel Fernandes (Google) Signed-off-by: Madhuparna Bhowmik --- fs/btrfs/volumes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index a7da1f3e3627..de7131ee604d 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -64,7 +64,7 @@ struct btrfs_device { struct btrfs_fs_devices *fs_devices; struct btrfs_fs_info *fs_info; - struct rcu_string *name; + struct rcu_string __rcu *name; u64 generation; -- 2.17.1