Date: Thu, 21 Jun 2007 12:21:39 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 122091 for review Message-ID: <200706211221.l5LCLdPw053829@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=122091 Change 122091 by rdivacky@rdivacky_witten on 2007/06/21 12:21:26 Grrrrr. p4 commited previous version ;( Expand the ATBAD macro and adjust lines wrapping accordingly. Affected files ... .. //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_syscalls.c#26 edit Differences ... ==== //depot/projects/soc2007/rdivacky/linux_at/sys/kern/vfs_syscalls.c#26 (text+ko) ==== @@ -78,8 +78,6 @@ #include <vm/vm_page.h> #include <vm/uma.h> -#define ATBAD ((error) ? ATBADF : 0) - static int chroot_refuse_vdir_fds(struct filedesc *fdp); static int getutimes(const struct timeval *, enum uio_seg, struct timespec *); static int setfown(struct thread *td, struct vnode *, uid_t, gid_t); @@ -1029,7 +1027,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); - NDINIT_AT(&nd, LOOKUP, ATBAD | FOLLOW | AUDITVNODE1 | MPSAFE, pathseg, path, td, dir_vn); + NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | FOLLOW | AUDITVNODE1 + | MPSAFE, pathseg, path, td, dir_vn); if ((flags & O_ACCMODE) == O_ACCMODE) { error = EINVAL; @@ -1246,8 +1245,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); bwillwrite(); - NDINIT_AT(&nd, CREATE, ATBAD | LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, - pathseg, path, td, dir_vn); + NDINIT_AT(&nd, CREATE, ((error) ? ATBADF : 0) | LOCKPARENT | SAVENAME + | MPSAFE | AUDITVNODE1, pathseg, path, td, dir_vn); if ((error = namei(&nd)) != 0) { if (dir_vn) vrele(dir_vn); @@ -1373,8 +1372,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); bwillwrite(); - NDINIT_AT(&nd, CREATE, ATBAD | LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, - pathseg, path, td, dir_vn); + NDINIT_AT(&nd, CREATE, ((error) ? ATBADF : 0) | LOCKPARENT | SAVENAME + | MPSAFE | AUDITVNODE1, pathseg, path, td, dir_vn); if ((error = namei(&nd)) != 0) { if (dir_vn) vrele(dir_vn); @@ -1515,14 +1514,15 @@ if (error && !kern_absolute_path(path, segflg)) return (error); - NDINIT_AT(&ndp, LOOKUP, ATBAD | FOLLOW | MPSAFE | AUDITVNODE1, segflg, path, td, pdir_vn); + NDINIT_AT(&ndp, LOOKUP, ((error) ? ATBADF : 0) | FOLLOW | MPSAFE + | AUDITVNODE1, segflg, path, td, pdir_vn); error = kern_get_at(td, newdirfd, &ldir_vn); if (error && !kern_absolute_path(link, segflg)) return (error); - NDINIT_AT(&ndl, CREATE, ATBAD | LOCKPARENT | SAVENAME| MPSAFE | AUDITVNODE1, segflg, - link, td, ldir_vn); + NDINIT_AT(&ndl, CREATE, ((error) ? ATBADF : 0) | LOCKPARENT | SAVENAME + | MPSAFE | AUDITVNODE1, segflg, link, td, ldir_vn); bwillwrite(); if ((error = namei(&ndp)) != 0) @@ -1634,8 +1634,8 @@ if (error && !kern_absolute_path(link, segflg)) return (error); bwillwrite(); - NDINIT_AT(&nd, CREATE, ATBAD | LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, - segflg, link, td, dir_vn); + NDINIT_AT(&nd, CREATE, ((error) ? ATBADF : 0) | LOCKPARENT | SAVENAME + | MPSAFE | AUDITVNODE1, segflg, link, td, dir_vn); if ((error = namei(&nd)) != 0) goto out; vfslocked = NDHASGIANT(&nd); @@ -1783,8 +1783,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); bwillwrite(); - NDINIT_AT(&nd, DELETE, ATBAD | LOCKPARENT | LOCKLEAF | MPSAFE | AUDITVNODE1, - pathseg, path, td, dir_vn); + NDINIT_AT(&nd, DELETE, ((error) ? ATBADF : 0) | LOCKPARENT | LOCKLEAF + | MPSAFE | AUDITVNODE1, pathseg, path, td, dir_vn); if ((error = namei(&nd)) != 0) { if (dir_vn) vrele(dir_vn); @@ -2057,8 +2057,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); - NDINIT_AT(&nd, LOOKUP, ATBAD | FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1, - pathseg, path, td, dir_vn); + NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | FOLLOW | LOCKLEAF + | MPSAFE | AUDITVNODE1, pathseg, path, td, dir_vn); /* * Create and modify a temporary credential instead of one that @@ -2267,8 +2267,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); - NDINIT_AT(&nd, LOOKUP, ATBAD | FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1 | - MPSAFE, pathseg, path, td, dir_vn); + NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | FOLLOW | LOCKSHARED + | LOCKLEAF | AUDITVNODE1 | MPSAFE, pathseg, path, td, dir_vn); if ((error = namei(&nd)) != 0) goto out; @@ -2336,8 +2336,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); - NDINIT_AT(&nd, LOOKUP, ATBAD | NOFOLLOW | LOCKLEAF | LOCKSHARED | AUDITVNODE1 | - MPSAFE, pathseg, path, td, dir_vn); + NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | NOFOLLOW | LOCKLEAF + | LOCKSHARED | AUDITVNODE1 | MPSAFE, pathseg, path, td, dir_vn); if ((error = namei(&nd)) != 0) goto out; @@ -2529,8 +2529,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); - NDINIT_AT(&nd, LOOKUP, ATBAD | NOFOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1, pathseg, - path, td, dir_vn); + NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | NOFOLLOW | LOCKLEAF + | MPSAFE | AUDITVNODE1, pathseg, path, td, dir_vn); if ((error = namei(&nd)) != 0) goto out; @@ -2776,7 +2776,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); - NDINIT_AT(&nd, LOOKUP, ATBAD | FOLLOW | MPSAFE | AUDITVNODE1, pathseg, path, td, dir_vn); + NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | FOLLOW | MPSAFE + | AUDITVNODE1, pathseg, path, td, dir_vn); if ((error = namei(&nd)) != 0) goto out; @@ -2936,7 +2937,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); - NDINIT_AT(&nd, LOOKUP, ATBAD | FOLLOW | MPSAFE | AUDITVNODE1, pathseg, path, td, dir_vn); + NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | FOLLOW | MPSAFE + | AUDITVNODE1, pathseg, path, td, dir_vn); if ((error = namei(&nd)) != 0) goto out; @@ -2993,7 +2995,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); - NDINIT_AT(&nd, LOOKUP, ATBAD | NOFOLLOW | MPSAFE | AUDITVNODE1, pathseg, path, td, dir_vn); + NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | NOFOLLOW | MPSAFE + | AUDITVNODE1, pathseg, path, td, dir_vn); if ((error = namei(&nd)) != 0) goto out; @@ -3167,7 +3170,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); - NDINIT_AT(&nd, LOOKUP, ATBAD |FOLLOW | AUDITVNODE1 | MPSAFE, pathseg, path, td, dir_vn); + NDINIT_AT(&nd, LOOKUP, ((error) ? ATBADF : 0) | FOLLOW | AUDITVNODE1 + | MPSAFE, pathseg, path, td, dir_vn); if ((error = getutimes(tptr, tptrseg, ts)) != 0) goto out; @@ -3553,14 +3557,14 @@ return (error); #ifdef MAC - NDINIT_AT(&fromnd, DELETE, ATBAD | LOCKPARENT | LOCKLEAF | SAVESTART | MPSAFE | - AUDITVNODE1, pathseg, from, td, fdir_vn); + NDINIT_AT(&fromnd, DELETE, ((error) ? ATBADF : 0) | LOCKPARENT | LOCKLEAF + | SAVESTART | MPSAFE | AUDITVNODE1, pathseg, from, td, fdir_vn); #else - NDINIT_AT(&fromnd, DELETE, ATBAD | WANTPARENT | SAVESTART | MPSAFE | - AUDITVNODE1, pathseg, from, td, fdir_vn); + NDINIT_AT(&fromnd, DELETE, ((error) ? ATBADF : 0) | WANTPARENT | SAVESTART + | MPSAFE | AUDITVNODE1, pathseg, from, td, fdir_vn); #endif - NDINIT_AT(&tond, RENAME, ATBAD | LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART | - MPSAFE | AUDITVNODE2, pathseg, to, td, tdir_vn); + NDINIT_AT(&tond, RENAME, ((error) ? ATBADF : 0) | LOCKPARENT | LOCKLEAF + | NOCACHE | SAVESTART | MPSAFE | AUDITVNODE2, pathseg, to, td, tdir_vn); bwillwrite(); if ((error = namei(&fromnd)) != 0) @@ -3708,8 +3712,8 @@ if (error && !kern_absolute_path(path, segflg)) return (error); bwillwrite(); - NDINIT_AT(&nd, CREATE, ATBAD | LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, - segflg, path, td, dir_vn); + NDINIT_AT(&nd, CREATE, ((error) ? ATBADF : 0) | LOCKPARENT | SAVENAME + | MPSAFE | AUDITVNODE1, segflg, path, td, dir_vn); nd.ni_cnd.cn_flags |= WILLBEDIR; if ((error = namei(&nd)) != 0) { if (dir_vn) @@ -3812,8 +3816,8 @@ if (error && !kern_absolute_path(path, pathseg)) return (error); bwillwrite(); - NDINIT_AT(&nd, DELETE, ATBAD | LOCKPARENT | LOCKLEAF | MPSAFE | AUDITVNODE1, - pathseg, path, td, dir_vn); + NDINIT_AT(&nd, DELETE, ((error) ? ATBADF : 0) | LOCKPARENT | LOCKLEAF + | MPSAFE | AUDITVNODE1, pathseg, path, td, dir_vn); if ((error = namei(&nd)) != 0) return (error); vfslocked = NDHASGIANT(&nd);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706211221.l5LCLdPw053829>