Date: Mon, 23 Jul 2007 15:03:00 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 123969 for review Message-ID: <200707231503.l6NF30fb075346@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=123969 Change 123969 by rdivacky@rdivacky_witten on 2007/07/23 15:02:42 Move bwillwrite() to such places where its not covered by any locks. Thus restoring original behaviour. Suggested by: kib Affected files ... .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_syscalls.c#49 edit Differences ... ==== //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_syscalls.c#49 (text+ko) ==== @@ -1270,16 +1270,17 @@ } if (error) return (error); + bwillwrite(); restart: if (dvp) { vfslocked = VFS_NEEDSGIANT(dvp->v_mount); vrele(dvp); VFS_UNLOCK_GIANT(vfslocked); + bwillwrite(); } error = kern_get_at(td, fd, &dvp); if (error && !kern_absolute_path(path, pathseg)) return (error); - bwillwrite(); NDINIT_AT(&nd, CREATE, ((error) ? ATBADF : 0) | LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, pathseg, path, td, dvp); if ((error = namei(&nd)) != 0) { @@ -1417,16 +1418,17 @@ struct vnode *dvp = NULL; AUDIT_ARG(mode, mode); + bwillwrite(); restart: if (dvp) { vfslocked = VFS_NEEDSGIANT(dvp->v_mount); vrele(dvp); VFS_UNLOCK_GIANT(vfslocked); + bwillwrite(); } error = kern_get_at(td, fd, &dvp); if (error && !kern_absolute_path(path, pathseg)) return (error); - bwillwrite(); NDINIT_AT(&nd, CREATE, ((error) ? ATBADF : 0) | LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, pathseg, path, td, dvp); if ((error = namei(&nd)) != 0) { @@ -1596,6 +1598,7 @@ int lvfslocked; int error; + bwillwrite(); error = kern_get_at(td, fd1, &pdvp); if (error && !kern_absolute_path(path1, segflg)) return (error); @@ -1616,7 +1619,6 @@ NDINIT_AT(&nd, CREATE, ((error) ? ATBADF : 0) | LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, segflg, path2, td, ldvp); - bwillwrite(); if ((error = namei(&nd)) != 0) goto out; vfslocked = NDHASGIANT(&nd); @@ -1739,16 +1741,17 @@ goto out; } AUDIT_ARG(text, syspath); + bwillwrite(); restart: if (dvp) { vfslocked = VFS_NEEDSGIANT(dvp->v_mount); vrele(dvp); VFS_UNLOCK_GIANT(vfslocked); + bwillwrite(); } error = kern_get_at(td, fd, &dvp); if (error && !kern_absolute_path(path2, segflg)) return (error); - bwillwrite(); NDINIT_AT(&nd, CREATE, ((error) ? ATBADF : 0) | LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, segflg, path2, td, dvp); if ((error = namei(&nd)) != 0) @@ -1917,16 +1920,17 @@ struct nameidata nd; int vfslocked; + bwillwrite(); restart: if (dvp) { vfslocked = VFS_NEEDSGIANT(dvp->v_mount); vrele(dvp); VFS_UNLOCK_GIANT(vfslocked); + bwillwrite(); } error = kern_get_at(td, fd, &dvp); if (error && !kern_absolute_path(path, pathseg)) return (error); - bwillwrite(); NDINIT_AT(&nd, DELETE, ((error) ? ATBADF : 0) | LOCKPARENT | LOCKLEAF | MPSAFE | AUDITVNODE1, pathseg, path, td, dvp); if ((error = namei(&nd)) != 0) { @@ -3881,6 +3885,7 @@ int fvfslocked; int error; + bwillwrite(); error = kern_get_at(td, oldfd, &frdvp); if (error && !kern_absolute_path(old, pathseg)) return (error); @@ -3906,7 +3911,6 @@ LOCKLEAF | NOCACHE | SAVESTART | MPSAFE | AUDITVNODE2, pathseg, new, td, todvp); - bwillwrite(); if ((error = namei(&fromnd)) != 0) goto out2; fvfslocked = NDHASGIANT(&fromnd); @@ -4064,16 +4068,17 @@ int vfslocked; AUDIT_ARG(mode, mode); + bwillwrite(); restart: if (dvp) { vfslocked = VFS_NEEDSGIANT(dvp->v_mount); vrele(dvp); VFS_UNLOCK_GIANT(vfslocked); + bwillwrite(); } error = kern_get_at(td, fd, &dvp); if (error && !kern_absolute_path(path, segflg)) return (error); - bwillwrite(); NDINIT_AT(&nd, CREATE, ((error) ? ATBADF : 0) | LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, segflg, path, td, dvp); nd.ni_cnd.cn_flags |= WILLBEDIR; @@ -4176,16 +4181,17 @@ struct nameidata nd; int vfslocked; + bwillwrite(); restart: if (dvp) { vfslocked = VFS_NEEDSGIANT(dvp->v_mount); vrele(dvp); VFS_UNLOCK_GIANT(vfslocked); + bwillwrite(); } error = kern_get_at(td, fd, &dvp); if (error && !kern_absolute_path(path, pathseg)) return (error); - bwillwrite(); NDINIT_AT(&nd, DELETE, ((error) ? ATBADF : 0) | LOCKPARENT | LOCKLEAF | MPSAFE | AUDITVNODE1, pathseg, path, td, dvp); if ((error = namei(&nd)) != 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707231503.l6NF30fb075346>
