From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21768363C43 for ; Mon, 24 Aug 2026 15:12:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787584380; cv=none; b=dXv3KosYeGBfuw6A9R+5ewfcAb1wLVgUKN9V4cpHJcRkjKHPK3xqB9hZtNX/6tZLR2NsKzkjz4NGZ+ETj989Ex4/KxQPi40tpmyQsKZPrwQB9h6t3KXDMXIMb/BwW6Lo9zffXNzGPRu4A0A1+zAx2OfBlNe2cP6Qpkp4j0u4FdE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787584380; c=relaxed/simple; bh=MBLu9PdNI2xaypoJcLxCt62zg3iM3LLLeUb+z0gDYN4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=C6kP63YXvzT6h73bGJeZbpE9QZgpguPvlh1lw+EBLWOQlVD2tkMKI5Xp6DpIWXDONzD7A8iCPmjcOhU/53ViIMQsaY+fMmAEoEfF9vYxm9E5jhSFB/iVmoBse4Ky3ZULqZYvK4lZazECvcQpLC7dJ99rpp9NtZsHRMXzrq3cU4I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mqNsRPL6; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mqNsRPL6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FC5D1F000E9; Mon, 24 Aug 2026 15:12:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787584378; bh=bfNTPzrQW3MYfLtOrnort7VY3Ro+LqKmQi0rNCTN4b4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=mqNsRPL6V6PHTGWqScu1tgf5GWaMZ1K13nvndmPLjzYtmUw21/bkEyutK0hhMwzIJ NHdCahlEo3v2PjPar9XEjsFySsqlgdaAqg/CaFs4O4uIWJkazVoD8R20U/jp+5jUFD BksZooILZx4FsBO2VfomwjNRc40FAhFB+0vnPCZLiNdz0NMCBOzKuw1uJTbswl3T0L 4hPSBKxu8JprKKH5TnrKeGfg19Vmh7mtlsUM1s9HlCKLL0htLlADhmcMNpAvnqkxzV Low6uZC/pVtw24tOL81v4UOOKKeuKQSsBlhUIQGDaVlWiwOC3sl/dctqalaYacNN1C GdzVqYGkoe9hA== Date: Mon, 24 Aug 2026 15:12:57 +0000 From: Jaegeuk Kim To: Wenjie Qi Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, qiwenjie@xiaomi.com Subject: Re: [PATCH v2] f2fs: don't leave the hashed inode while it's unlinked Message-ID: References: <20260818200121.2684318-1-jaegeuk@kernel.org> <20260823095648.3107875-1-qiwenjie@xiaomi.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260823095648.3107875-1-qiwenjie@xiaomi.com> Hi Wenjie, Yeah, valid points. Let me send v3. On 08/23, Wenjie Qi wrote: > Hi Jaegeuk, > > It looks like the original symlink construction error is lost here: > > err = __do_unlink(dir, inode, &dentry->d_name); > > If fscrypt_encrypt_symlink() or page_symlink() fails but __do_unlink() > succeeds, err becomes zero. f2fs_handle_failed_inode() then releases the > inode, and f2fs_symlink() returns success even though the directory entry > has been removed. > > Is this intended? Should the rollback result be stored separately, for > example in ret, while preserving the original construction error in err? > > There seems to be a similar issue in the give_up path. If rollback fails > in a DIRSYNC directory, a successful f2fs_sync_fs() can overwrite the > existing error with zero. > > Regards, > Wenjie