Re: DCACHE Pinning Problems with rm -r on 2.2.15/2.3.99Pre3 withNWFS2.2.2

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Wed Apr 05 2000 - 12:11:10 EST


Stephen C. Tweedie wrote:
> > if (last_offset == 0)
> > __lseek (fd, -retval, SEEK_CUR);
> > else
> > __lseek (fd, last_offset, SEEK_SET);
> > last_offset = kdp->d_off;
> >
> > Ironically, an older Glibc did this right and it was changed as an
> > optimisation.
>
> Well, the -retval SEEK_CUR is completely broken. The rest looks right:
> kdp->d_off is computed by the kernel and should remain a valid seek
> point after the syscall returns.

Quite. The broken SEEK_CUR is a case that doesn't occur unless you have
a very large directory entry or a small buffer -- neither show up in the
usual tests. The other one occurs fairly often and is fine.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:15 EST