Re: [PATCH 2/3] autofs4 - expiring filesystem from under process

Ian Kent
2005-04-11T08:48:02Z

On Mon, 11 Apr 2005, Andrew Morton wrote:

> raven@themaw.net wrote:
> >
> > static inline int autofs4_ispending(struct dentry *dentry)
> > {
> > struct autofs_info *inf = autofs4_dentry_ino(dentry);
> > + int pending;
> >
> > - return (dentry->d_flags & DCACHE_AUTOFS_PENDING) ||
> > - (inf != NULL && inf->flags & AUTOFS_INF_EXPIRING);
> > + if (dentry->d_flags & DCACHE_AUTOFS_PENDING)
> > + return 1;
> > +
> > + if (inf) {
> > + spin_lock(&inf->sbi->fs_lock);
> > + pending = inf->flags & AUTOFS_INF_EXPIRING;
> > + spin_unlock(&inf->sbi->fs_lock);
> > + }
> > +
> > + return pending;
>
> This can obviously return an uninitialised variable.
>
> Were these patches very well tested?

Minimal testing in 2.6.
There's been some fairly heavy use of the 2.4 version.

Never the less this is sloppy.
Perhaps you should reject them, rather than burn your time on it, and I
will resubmit when I've gone over them and sorted out the issues.

Ian