{
struct svc_export *exp;
struct dentry *dparent, *dchild;
+ int rv = 0;
dparent = cd->fh.fh_dentry;
exp = cd->fh.fh_export;
dchild = lookup_one_len(name, dparent, namlen);
if (IS_ERR(dchild))
return 1;
- if (d_mountpoint(dchild))
- return 1;
- if (fh_compose(fhp, exp, dchild, &cd->fh) != 0 || !dchild->d_inode)
- return 1;
- return 0;
+ if (d_mountpoint(dchild) ||
+ fh_compose(fhp, exp, dchild, &cd->fh) != 0 ||
+ !dchild->d_inode)
+ rv = 1;
+ dput(dchild);
+ return rv;
}
/*
memmove(tmp, (caddr_t)tmp+len1, len2);
/* update offset */
- if (((cd->offset - tmp) << 2) <= len1)
+ if (((cd->offset - tmp) << 2) < len1)
cd->offset = p + (cd->offset - tmp);
else
cd->offset -= len1 >> 2;