Return-Path: Received: from userp2130.oracle.com ([156.151.31.86]:57872 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbeC2KSA (ORCPT ); Thu, 29 Mar 2018 06:18:00 -0400 Subject: Re: [PATCH v2 5/8] btrfs: check if the fsid in the primary sb and copy sb are same To: Nikolay Borisov , linux-btrfs@vger.kernel.org References: <20180327234000.23656-1-anand.jain@oracle.com> <20180327234000.23656-6-anand.jain@oracle.com> From: Anand Jain Message-ID: Date: Thu, 29 Mar 2018 18:18:32 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: >> - btrfs_release_disk_super(page); >> -> error_bdev_put: > > You need a check whether page_primary is set here and release it, > otherwise you are leaking it. This needs to handle both the primary sb > read failure (where page_primary might not be set) as well as any FSID > mismatch from loop. (where it will be set)> Right. I should. Will do. Thanks. Anand >> blkdev_put(bdev, flags); >> >> > -- > 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 >