From: Evgeniy Polyakov Subject: Re: [PATCH 1/2] LogFS proper Date: Tue, 8 May 2007 20:17:03 +0400 Message-ID: <20070508161703.GA18035@2ka.mipt.ru> References: <20070507215913.GA15054@lazybastard.org> <20070507220036.GB15054@lazybastard.org> <1178608950.3042.273.camel@localhost.localdomain> <1178639681.3042.334.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Jan Engelhardt , =?utf-8?B?SsO2cm4=?= Engel , Andrew Morton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Kleikamp , David Chinner To: Thomas Gleixner Return-path: Content-Disposition: inline In-Reply-To: <1178639681.3042.334.camel@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, May 08, 2007 at 05:54:41PM +0200, Thomas Gleixner (tglx@linutro= nix.de) wrote: > On Tue, 2007-05-08 at 14:46 +0200, Jan Engelhardt wrote: > > >> +static int __logfs_readdir(struct file *file, void *buf, filldi= r_t filldir) > > >> +{ > > >> + err =3D read_dir(dir, &dd, pos); > > >> + if (err =3D=3D -EOF) > > >> + break; > > > > > > -EOF results in a return code 0 ? > >=20 > > Results in a return code -256. >=20 > Really ? It breaks out of the loop and returns 0 ! Likely it was done with intention - readdir returns 0 on EOF and NULL direntry, in J=C3=B6rn's code subsequent readdir call will return EOF=20 again and filldir callback will not be called, so NULL will be=20 returned to userspace. --=20 Evgeniy Polyakov