diff options
author | marcus <marcus@FreeBSD.org> | 2009-06-05 16:44:42 +0000 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2009-06-05 16:44:42 +0000 |
commit | 3a1cf7a4502e6f37113536ad38530f5207c77866 (patch) | |
tree | b5be98579ef618790217c2c0f1053aa06801b1b5 /sys/kern/vfs_cache.c | |
parent | 78a4bbf2875db443e6d62f814cfa0932be524a77 (diff) | |
download | FreeBSD-src-3a1cf7a4502e6f37113536ad38530f5207c77866.zip FreeBSD-src-3a1cf7a4502e6f37113536ad38530f5207c77866.tar.gz |
Unlock the cache lock before returning when we run out of buffer space
trying to fill in the full path name.
Reported by: David Naylor <naylor.b.david@gmail.com>
Approved by: kib
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r-- | sys/kern/vfs_cache.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 45ffe0d..0bd7975 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1140,8 +1140,10 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir, error = vn_vptocnp_locked(&vp, buf, &buflen); if (error) return (error); - if (buflen == 0) + if (buflen == 0) { + CACHE_RUNLOCK(); return (ENOMEM); + } buf[--buflen] = '/'; slash_prefixed = 1; } @@ -1169,6 +1171,7 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir, if (error) break; if (buflen == 0) { + CACHE_RUNLOCK(); error = ENOMEM; SDT_PROBE(vfs, namecache, fullpath, return, error, startvp, NULL, 0, 0); |