From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from k21.active24.pl ([195.78.67.21]:55536 "EHLO k21.active24.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752062AbcFBJSp (ORCPT ); Thu, 2 Jun 2016 05:18:45 -0400 Subject: Re: freevxfs: hp-ux support. patchset r3 3/4 From: Krzysztof =?UTF-8?Q?B=C5=82aszkowski?= To: Christoph Hellwig Cc: Carlos Maiolino , linux-fsdevel@vger.kernel.org In-Reply-To: <20160602083254.GA22057@infradead.org> References: <20160602083254.GA22057@infradead.org> Content-Type: text/plain; charset="UTF-8" Date: Thu, 02 Jun 2016 11:18:38 +0200 Message-ID: <1464859118.4321.9.camel@linux-q3cb.site> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 2016-06-02 at 01:32 -0700, Christoph Hellwig wrote: > > -static inline u_long > > -dir_pages(struct inode *inode) > > -{ > > - return (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; > > -} > > This is still against a different tree than my branch, right? yes, it is. > > Othwrwise the readdir changes look fine minus a few very minor > codingstyle issues that I'll happily fix up many thanks :) > > > @@ -212,17 +190,17 @@ vxfs_lookup(struct inode *dip, struct dentry *dp, unsigned int flags) > > { > > struct inode *ip = NULL; > > ino_t ino; > > - > > + > > if (dp->d_name.len > VXFS_NAMELEN) > > return ERR_PTR(-ENAMETOOLONG); > > - > > + > > ino = vxfs_inode_by_name(dip, dp); > > if (ino) { > > ip = vxfs_iget(dip->i_sb, ino); > > if (IS_ERR(ip)) > > return ERR_CAST(ip); > > + d_add(dp, ip); > > } > > - d_add(dp, ip); > > return NULL; > > This change is unrelated to the readdir changes, and it looks incorrect > to me. If we don't find an inode for a lookup we still want to call > d_add with a NULL inode - this creates a so called negative dentry, > which tells the VFS to not bother looking up this file name next time. I see. Thank you for explanation of d_add() semantics, so you are right, it was wrong change. > -- > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Krzysztof Blaszkowski