Date: Mon, 20 Apr 2009 14:36:01 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/ufs/ufs ufs_extern.h ufs_lookup.c ufs_vnops.c Message-ID: <200904201436.n3KEaL95056693@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2009-04-20 14:36:01 UTC FreeBSD src repository Modified files: sys/ufs/ufs ufs_extern.h ufs_lookup.c ufs_vnops.c Log: SVN rev 191315 on 2009-04-20 14:36:01Z by kib In ufs_checkpath(), recheck that '..' still points to the inode with the same inode number after VFS_VGET() and relock of the vp. If '..' changed, redo the lookup. To reduce code duplication, move the code to read '..' dirent into the static helper function ufs_dir_dd_ino(). Supply the source inode number as an argument to ufs_checkpath() instead of the source inode itself. The inode is unlocked, thus it might be reclaimed, causing accesses to the freed memory. Use vn_vget_ino() to get the '..' vnode by its inode number, instead of directly code VFS_VGET() and relock, to properly busy the mount point while vp lock is dropped. Noted and reviewed by: tegge Tested by: pho MFC after: 1 month Revision Changes Path 1.56 +1 -1 src/sys/ufs/ufs/ufs_extern.h 1.98 +51 -39 src/sys/ufs/ufs/ufs_lookup.c 1.311 +3 -1 src/sys/ufs/ufs/ufs_vnops.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904201436.n3KEaL95056693>