From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.9]:36849 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbcFBIc4 (ORCPT ); Thu, 2 Jun 2016 04:32:56 -0400 Date: Thu, 2 Jun 2016 01:32:54 -0700 From: Christoph Hellwig To: Krzysztof B??aszkowski Cc: Christoph Hellwig , Carlos Maiolino , linux-fsdevel@vger.kernel.org Subject: Re: freevxfs: hp-ux support. patchset r3 3/4 Message-ID: <20160602083254.GA22057@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464770593.900.95.camel@linux-q3cb.site> <1464770556.900.94.camel@linux-q3cb.site> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > -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? Othwrwise the readdir changes look fine minus a few very minor codingstyle issues that I'll happily fix up > @@ -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.