From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53E8AC4706C for ; Fri, 12 Jan 2024 07:13:14 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rOBj5-0001rp-2V; Fri, 12 Jan 2024 07:13:11 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rOBj3-0001ri-FZ for linux-f2fs-devel@lists.sourceforge.net; Fri, 12 Jan 2024 07:13:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Sender:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VCEqIivkHRIrYsw4MOEaXLZlutGhQyNEOuISiki+wOM=; b=OZpDUJJZ1oicgYt4cQVTItyLex SWxQy5BWNAFeQXBFw7flDrL1fcVmJxY71Yqcg29LG5ETqjnwJsV8wvKVJUcNavKWWZEfTXFZd7J/j E72tzUL4UG7RRDq9snF9XTIMSpY/yoHjZ+IUxmSr6SqQmGgqae+C3mV0w7PCTVEoC6Dk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=VCEqIivkHRIrYsw4MOEaXLZlutGhQyNEOuISiki+wOM=; b=S6cqNLqPLTsFSRPqbKIwjKGXe0 +z9tl1SlVQk2YHWZqdvbpSTxsv0Ehdohi9n3h2miJTs91xTxWyFaXSKApFfLA1NimFujs9snti6aZ leLbD0Totn10N3pi/m022DKm7ed+lwDC3PPNHuh/obskNur8D0NgkjwI4c1U9PlgWnRg=; Received: from zeniv.linux.org.uk ([62.89.141.173]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rOBiw-0002j7-AS for linux-f2fs-devel@lists.sourceforge.net; Fri, 12 Jan 2024 07:13:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VCEqIivkHRIrYsw4MOEaXLZlutGhQyNEOuISiki+wOM=; b=W2B/Y4R4AIGJarjY9sQq+lbTg7 pqy5MthOXo0dJ1LTA4vrqeusN7lE70iX9dKDy5UTb7u31UkcQdzjpV+NIv19GbcENjkjQpsnDGu/K NVnI0M1bSS8WMMwupiu+VZapWMag7LrIehc0IWqTDeMev0+JreCdd/uJR0kSAyvRZaZ3+QeJjvLVG 6AF1r5uLxS6AdEbaMEsfnLiAJcICBjI0FkhpmIIChPCLRlgMVEE0/cUz6S23h1rwv+93cS4tdTYZQ Y0KFmHsbeNZQ3eTcDXGCPLBLMNNebOc1OELp4DwVB6bMnw8CY5Lfd4VqhuZiSdiyGQZFLd2oeYL1w 6Imo4YMg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rOBic-00E5Wm-1r; Fri, 12 Jan 2024 07:12:42 +0000 Date: Fri, 12 Jan 2024 07:12:42 +0000 From: Al Viro To: Linus Torvalds Message-ID: <20240112071242.GA1674809@ZenIV> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1rOBiw-0002j7-AS Subject: Re: [f2fs-dev] [GIT PULL] f2fs update for 6.8-rc1 X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jaegeuk Kim , Linux Kernel Mailing List , Linux F2FS Dev Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Thu, Jan 11, 2024 at 09:05:51PM -0800, Linus Torvalds wrote: > On Thu, 11 Jan 2024 at 10:28, Jaegeuk Kim wrote: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git tags/f2fs-for-6.8-rc1 > > Hmm. I got a somewhat confusing conflict in f2fs_rename(). > > And honestly, I really don't know what the right resolution is. What I > ended up with was this: > > if (old_is_dir) { > if (old_dir_entry) > f2fs_set_link(old_inode, old_dir_entry, > old_dir_page, new_dir); > else > f2fs_put_page(old_dir_page, 0); Where would you end up with old_dir_page != NULL and old_dir_entry == NULL? old_dir_page is initialized to NULL and the only place where it's altered is old_dir_entry = f2fs_parent_dir(old_inode, &old_dir_page); Which is immediately followed by if (!old_dir_entry) { if (IS_ERR(old_dir_page)) err = PTR_ERR(old_dir_page); goto out_old; } so we are *not* going to end up at that if (old_is_dir) in that case. Original would have been more clear as if (old_is_dir) { if (old_dir != new_dir) { /* we have .. in old_dir_page/old_dir_entry */ if (!whiteout) f2fs_set_link(old_inode, old_dir_entry, old_dir_page, new_dir); else f2fs_put_page(old_dir_page, 0); } f2fs_i_links_write(old_dir, false); } - it is equivalent to what that code used to do. And "don't update .. if we are leaving a whiteout behind" was teh bug fixed by commit in f2fs tree... The bottom line: your variant is not broken, but only because f2fs_put_page() starts with static inline void f2fs_put_page(struct page *page, int unlock) { if (!page) return; IOW, you are doing f2fs_put_page(NULL, 0), which is an explicit no-op. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel