Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934928AbcJUPLA (ORCPT ); Fri, 21 Oct 2016 11:11:00 -0400 Received: from b.ns.miles-group.at ([95.130.255.144]:44723 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934851AbcJUPKz (ORCPT ); Fri, 21 Oct 2016 11:10:55 -0400 Subject: Re: [PATCH 02/26] fscrypto: Constify struct inode pointer To: "Theodore Ts'o" , 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> <20161021145720.raaeyivtonf2ynmb@thunk.org> From: Richard Weinberger Message-ID: <99679ee6-ccda-0c58-3278-14fb8cb8534c@nod.at> Date: Fri, 21 Oct 2016 17:10:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <20161021145720.raaeyivtonf2ynmb@thunk.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 813 Lines: 26 Ted, On 21.10.2016 16:57, Theodore Ts'o wrote: > 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? Erm, no. Either I forgot or while rebasing my mess to something sane the change got lost. > 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? Yes. Thanks, //richard