if (mnt)
*mnt = mds->mds_vfsmnt;
spin_lock(&dcache_lock);
- for (lp = inode->i_dentry.next; lp != &inode->i_dentry ; lp=lp->next) {
- result = list_entry(lp,struct dentry, d_alias);
- if (! (result->d_flags & DCACHE_NFSD_DISCONNECTED)) {
+ list_for_each(lp, &inode->i_dentry) {
+ result = list_entry(lp, struct dentry, d_alias);
+ if (!(result->d_flags & DCACHE_NFSD_DISCONNECTED)) {
dget_locked(result);
result->d_vfs_flags |= DCACHE_REFERENCED;
spin_unlock(&dcache_lock);
int rc;
ENTRY;
- if (!cluuid)
+ if (!conn || !obd || !cluuid)
RETURN(-EINVAL);
MOD_INC_USE_COUNT;
+
list_for_each(p, &obd->obd_exports) {
exp = list_entry(p, struct obd_export, exp_chain);
mcd = exp->exp_mds_data.med_mcd;
- if (mcd && !memcmp(cluuid, mcd->mcd_uuid,
- sizeof(mcd->mcd_uuid))) {
+ if (!memcmp(cluuid, mcd->mcd_uuid, sizeof(mcd->mcd_uuid))) {
CDEBUG(D_INFO, "existing export for UUID '%s' at %p\n",
cluuid, exp);
LASSERT(exp->exp_obd == obd);
+
exp->exp_rconnh.addr = conn->addr;
exp->exp_rconnh.cookie = conn->cookie;
conn->addr = (__u64) (unsigned long)exp;
RETURN(0);
}
}
+
#warning shaver: we might need a real cluuid here
rc = class_connect(conn, obd, NULL);
if (rc)