0001-Fix-a-bug-in-nullfs_mount-and-nullfs_statfs.patch

ftigeot, 09/02/2011 08:01 AM

Download (1.43 KB)

View differences:

sys/vfs/nullfs/null_vfsops.c
194 194
	NULLFSDEBUG("nullfs_mount: lower %s, alias at %s\n",
195 195
		mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntfromname);
196 196

  
197
	bzero(mp->mnt_stat.f_mntonname, MNAMELEN);
198
	if (path != NULL) {
199
		(void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1,
200
			&size);
201
	}
202

  
197 203
	/*
198 204
	 * Set NCALIASED so unmount won't complain about namecache refs
199 205
	 * still existing.
......
286 292
	if (sbp != &mp->mnt_stat) {
287 293
		bcopy(&mp->mnt_stat.f_fsid, &sbp->f_fsid, sizeof(sbp->f_fsid));
288 294
		bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN);
295
		bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN);
289 296
	}
290 297
	return (0);
291 298
}
292
-