Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934645AbcJUO7d (ORCPT ); Fri, 21 Oct 2016 10:59:33 -0400 Received: from imap.thunk.org ([74.207.234.97]:57526 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933632AbcJUO7b (ORCPT ); Fri, 21 Oct 2016 10:59:31 -0400 Date: Fri, 21 Oct 2016 10:57:20 -0400 From: "Theodore Ts'o" To: Richard Weinberger Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, dedekind1@gmail.com, adrian.hunter@intel.com, jaegeuk@kernel.org, david@sigma-star.at, wd@denx.de, sbabic@denx.de, dengler@linutronix.de Subject: Re: [PATCH 02/26] fscrypto: Constify struct inode pointer Message-ID: <20161021145720.raaeyivtonf2ynmb@thunk.org> Mail-Followup-To: Theodore Ts'o , Richard Weinberger , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, dedekind1@gmail.com, adrian.hunter@intel.com, jaegeuk@kernel.org, david@sigma-star.at, wd@denx.de, sbabic@denx.de, dengler@linutronix.de References: <1477054121-10198-1-git-send-email-richard@nod.at> <1477054121-10198-3-git-send-email-richard@nod.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1477054121-10198-3-git-send-email-richard@nod.at> User-Agent: NeoMutt/20160916 (1.7.0) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 644 Lines: 17 On Fri, Oct 21, 2016 at 02:48:17PM +0200, Richard Weinberger wrote: > Some filesystems, such as UBIFS, maintain a const pointer > for struct inode. > > /* fname.c */ > -extern int fscrypt_setup_filename(struct inode *, const struct qstr *, > - int lookup, struct fscrypt_name *); > +extern int fscrypt_setup_filename(struct inode *dir, const struct qstr *iname, > + int lookup, struct fscrypt_name *fname); Was it deliberate that you didn't add a const pointer here? I take it that ubifs is basically using const in certain places to essentially promise that those functions don't actually modify the inode structure? - Ted