Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753371AbcK0Gtu (ORCPT ); Sun, 27 Nov 2016 01:49:50 -0500 Received: from mail-pg0-f48.google.com ([74.125.83.48]:36619 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751546AbcK0Gtm (ORCPT ); Sun, 27 Nov 2016 01:49:42 -0500 Date: Sat, 26 Nov 2016 22:49:38 -0800 From: Eric Biggers To: David Gstir Cc: Richard Weinberger , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, dedekind1@gmail.com, adrian.hunter@intel.com, tytso@mit.edu, jaegeuk@kernel.org, wd@denx.de, sbabic@denx.de, dengler@linutronix.de, mhalcrow@google.com, hch@infradead.org Subject: Re: [PATCH 01/29] fscrypt: Add in-place encryption mode Message-ID: <20161127064938.GC34163@google.com> References: <1479072072-6844-1-git-send-email-richard@nod.at> <1479072072-6844-2-git-send-email-richard@nod.at> <20161115181455.GA127180@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 659 Lines: 13 On Fri, Nov 25, 2016 at 01:09:05PM +0100, David Gstir wrote: > > > Additionally, after this change the name of the flag FS_WRITE_PATH_FL is > > misleading, since it now really indicates the presence of a bounce buffer rather > > than the "write path". > > I can see no use case for FS_WRITE_PATH_FL other than to indicate that the bounce buffer has to be free'd. Is there any reason why we should not just remove it and check the presence of a bounce buffer by a simple "if (ctx->w.bounce_page)" ? > It appears that the flag is needed because the 'w' (write) and 'r' (read) members are in union. So you can't simply check for 'ctx->w.bounce_page'. Eric